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

Invalid version syntax: ‘emacs-tree-sitter@0.18.0 #250

Open
mmuggli opened this issue Feb 5, 2023 · 2 comments
Open

Invalid version syntax: ‘emacs-tree-sitter@0.18.0 #250

mmuggli opened this issue Feb 5, 2023 · 2 comments

Comments

@mmuggli
Copy link

mmuggli commented Feb 5, 2023

I'm on CentOS 7.9.2009 and the prebuilt binaries result in a libc compatibility error, so I did:

(setq tsc-dyn-get-from `(:compilation))

Then installed from melpa using package-list-packages. I was then able to use tree-sitter-hl-mode in this session. On quitting and restarting emacs, I got a debug stack trace when running (global-tree-sitter-mode) in my init file. It produced the message "Invalid version syntax: ‘emacs-tree-sitter@0.18.0"

Somewhere in the call stack, I found this:
(version< "0.18.0" "emacs-tree-sitter@0.18.0")

I was able to work around this as follows:
I found "emacs-tree-sitter@0.18.0 in ~/.emacs.d/elpa/tsc-20220212.1632/DYN-VERSION
I changed it to "0.18.0", then rebuilt

~/.emacs.d/elpa/tsc-20220212.1632$ cargo build
~/.emacs.d/elpa/tsc-20220212.1632$ cargo build --release

(I'm guessing tsc only uses the release mode, but these are the actual steps I took that worked, so for completeness, I included the debug build step that I did as well).

It appears there is a format mismatch between DYN-VERSION and
tsc.el:27: (defconst tsc--dyn-version "0.18.0"

@sogaiu
Copy link
Contributor

sogaiu commented Feb 5, 2023

May be this is related?

@meedstrom
Copy link

meedstrom commented Apr 23, 2024

If you're still getting the error, it may be on account of Doom Emacs pinning the release version.

Made a PR there doomemacs/doomemacs#7842

(Pinning is supposed to prevent this kind of problem, but I suppose it can't pin Cargo, which is why Guix/Nix makes more sense than Straight.el for packages that rely on external utilities.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants