Backport: Fix tree-sitter tests on Emba
* test/infra/Dockerfile.emba: Use tree-sitter-rust v0.23.3 in
order to match ABI version of libtree-sitter0.
(cherry picked from commit 788c9cfb62
)
This commit is contained in:
parent
2b535a9c77
commit
8792d3431b
1 changed files with 25 additions and 20 deletions
|
@ -117,33 +117,38 @@ RUN ./autogen.sh autoconf
|
||||||
RUN ./configure --with-tree-sitter
|
RUN ./configure --with-tree-sitter
|
||||||
RUN make -j `nproc` bootstrap
|
RUN make -j `nproc` bootstrap
|
||||||
|
|
||||||
# Install language grammars.
|
# Install language grammars. The ABI versions of libtree-sitter0 and
|
||||||
|
# the respective grammars must match. The grammar ABI version is determined by
|
||||||
|
# grep LANGUAGE_VERSION /path/to/grammar-repo/src/parser.c
|
||||||
RUN mkdir -p /root/.emacs.d/tree-sitter
|
RUN mkdir -p /root/.emacs.d/tree-sitter
|
||||||
RUN git config --global http.sslverify "false"
|
RUN git config --global http.sslverify "false"
|
||||||
# See https://github.com/emacs-tree-sitter/tree-sitter-langs/tree/master/repos
|
# See https://github.com/emacs-tree-sitter/tree-sitter-langs/tree/master/repos
|
||||||
RUN src/emacs -Q --batch \
|
RUN src/emacs -Q --batch \
|
||||||
|
--eval \
|
||||||
|
'(message "ABI min version %d max version %d" \
|
||||||
|
(treesit-library-abi-version t) (treesit-library-abi-version))' \
|
||||||
--eval '(setq \
|
--eval '(setq \
|
||||||
treesit-extra-load-path (list "/root/.emacs.d/tree-sitter") \
|
treesit-extra-load-path (list "/root/.emacs.d/tree-sitter") \
|
||||||
treesit-language-source-alist \
|
treesit-language-source-alist \
|
||||||
(quote ((bash "https://github.com/tree-sitter/tree-sitter-bash") \
|
(quote ((bash "https://github.com/tree-sitter/tree-sitter-bash") \
|
||||||
(c "https://github.com/tree-sitter/tree-sitter-c") \
|
(c "https://github.com/tree-sitter/tree-sitter-c") \
|
||||||
(c-sharp "https://github.com/tree-sitter/tree-sitter-c-sharp") \
|
(c-sharp "https://github.com/tree-sitter/tree-sitter-c-sharp") \
|
||||||
(cpp "https://github.com/tree-sitter/tree-sitter-cpp") \
|
(cpp "https://github.com/tree-sitter/tree-sitter-cpp") \
|
||||||
(css "https://github.com/tree-sitter/tree-sitter-css") \
|
(css "https://github.com/tree-sitter/tree-sitter-css") \
|
||||||
(elixir "https://github.com/elixir-lang/tree-sitter-elixir") \
|
(elixir "https://github.com/elixir-lang/tree-sitter-elixir") \
|
||||||
(go "https://github.com/tree-sitter/tree-sitter-go") \
|
(go "https://github.com/tree-sitter/tree-sitter-go") \
|
||||||
(gomod "https://github.com/camdencheek/tree-sitter-go-mod") \
|
(gomod "https://github.com/camdencheek/tree-sitter-go-mod") \
|
||||||
(heex "https://github.com/phoenixframework/tree-sitter-heex") \
|
(heex "https://github.com/phoenixframework/tree-sitter-heex") \
|
||||||
(html "https://github.com/tree-sitter/tree-sitter-html") \
|
(html "https://github.com/tree-sitter/tree-sitter-html") \
|
||||||
(java "https://github.com/tree-sitter/tree-sitter-java") \
|
(java "https://github.com/tree-sitter/tree-sitter-java") \
|
||||||
(javascript "https://github.com/tree-sitter/tree-sitter-javascript") \
|
(javascript "https://github.com/tree-sitter/tree-sitter-javascript") \
|
||||||
(json "https://github.com/tree-sitter/tree-sitter-json") \
|
(json "https://github.com/tree-sitter/tree-sitter-json") \
|
||||||
(lua "https://github.com/tree-sitter-grammars/tree-sitter-lua") \
|
(lua "https://github.com/tree-sitter-grammars/tree-sitter-lua") \
|
||||||
(python "https://github.com/tree-sitter/tree-sitter-python") \
|
(python "https://github.com/tree-sitter/tree-sitter-python") \
|
||||||
(ruby "https://github.com/tree-sitter/tree-sitter-ruby") \
|
(ruby "https://github.com/tree-sitter/tree-sitter-ruby") \
|
||||||
(rust "https://github.com/tree-sitter/tree-sitter-rust") \
|
(rust "https://github.com/tree-sitter/tree-sitter-rust" "v0.23.3") \
|
||||||
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src") \
|
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src") \
|
||||||
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src"))))' \
|
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src"))))' \
|
||||||
--eval '(dolist (lang (mapcar (quote car) treesit-language-source-alist)) \
|
--eval '(dolist (lang (mapcar (quote car) treesit-language-source-alist)) \
|
||||||
(treesit-install-language-grammar lang "/root/.emacs.d/tree-sitter"))'
|
(treesit-install-language-grammar lang "/root/.emacs.d/tree-sitter"))'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue