Invalid version syntax: ‘emacs-tree-sitter@0.18.0
mmuggli opened this issue · comments
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"