Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working on Manjaro #22

Closed
kemelzaidan opened this issue Oct 1, 2024 · 6 comments
Closed

not working on Manjaro #22

kemelzaidan opened this issue Oct 1, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@kemelzaidan
Copy link

When trying to run termux-language-server or termux-language-server --convert PKGBUILD the app does not work and in both cases present the following error:

Traceback (most recent call last):
  File "/usr/sbin/termux-language-server", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.12/site-packages/termux_language_server/__main__.py", line 87, in main
    from .finders import DIAGNOSTICS_FINDER_CLASSES, FORMAT_FINDER_CLASSES
  File "/usr/lib/python3.12/site-packages/termux_language_server/finders.py", line 28, in <module>
    from .utils import get_query, get_schema
  File "/usr/lib/python3.12/site-packages/termux_language_server/utils.py", line 18, in <module>
    parser.set_language(language)
    ^^^^^^^^^^^^^^^^^^^
AttributeError: 'tree_sitter.Parser' object has no attribute 'set_language'

I'm on Manjaro using version 0.0.25

@Freed-Wu
Copy link
Collaborator

Freed-Wu commented Oct 2, 2024

What is your python-tree-sitter version? Looks like Freed-Wu/autotools-language-server#11

@Freed-Wu Freed-Wu self-assigned this Oct 2, 2024
@Freed-Wu Freed-Wu added the bug Something isn't working label Oct 2, 2024
@kemelzaidan
Copy link
Author

Humm... the arch package list 2 python-tree-sitter dependencies:

  1. python-tree-sitter-bash: 0.21.0
  2. python-lsp-tree-sitter: 0.0.16

python-tree-sitter which is a dependency of the first one is on version 0.23.0.

@TomJo2000
Copy link
Member

That's bound to happen with AUR packages on Manjaro.

AUR package builds are written to work with up to date dependencies from the Arch repos.

Manjaro arbitrarily holding back packages by 2 weeks for "stability" tends to break AUR builds expecting up to date versions of dependencies.

Manjaro does not officially support the AUR for this exact reason.
Though they do still recklessly recommend it regardless.

The bug here is Manjaro.

@kemelzaidan
Copy link
Author

Thanks for that. I'll try to move to main Arch as soon as possible.

@syyyr
Copy link

syyyr commented Oct 4, 2024

Hi, I think the reason this happens is that python-tree-sitter removed the set_language method in its newest release: https://github.com/tree-sitter/py-tree-sitter/releases/tag/v0.23.0 Downgrading to 0.22.3 fixes the issue, it's just that termux-language-server is not yet compatible with 0.23.0.

Side note: this has nothing to do with Manjaro as python-tree-sitter is an AUR package and not an Arch repo dependency. I'm using Arch and the same problem appears.

@kemelzaidan
Copy link
Author

Hi, I think the reason this happens is that python-tree-sitter removed the set_language method in its newest release: https://github.com/tree-sitter/py-tree-sitter/releases/tag/v0.23.0 Downgrading to 0.22.3 fixes the issue, it's just that termux-language-server is not yet compatible with 0.23.0.

Side note: this has nothing to do with Manjaro as python-tree-sitter is an AUR package and not an Arch repo dependency. I'm using Arch and the same problem appears.

They seemed to have released a fix for that just about 2 hours ago, and it's available on AUR already: https://github.com/termux/termux-language-server/releases/tag/0.0.26. I'll report here if that doesn't work.

Thanks @syyyr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants