diff options
| author | Juri Linkov | 2025-04-30 20:30:14 +0300 |
|---|---|---|
| committer | Juri Linkov | 2025-04-30 20:30:14 +0300 |
| commit | 85cd476a1408d2d87714d076144f9ad11cf3f31c (patch) | |
| tree | 842318160f5d822c7e36ad59d9ff48bf59d5e875 /test | |
| parent | dbd168823794ef2173bb6eb894174bc0c1685cd9 (diff) | |
| download | emacs-85cd476a1408d2d87714d076144f9ad11cf3f31c.tar.gz emacs-85cd476a1408d2d87714d076144f9ad11cf3f31c.zip | |
* test/infra/Dockerfile.emba: Avoid duplication of tree-sitter data.
Require ts-mode files in order to add their tree-sitter grammar sources
to 'treesit-language-source-alist'.
Diffstat (limited to 'test')
| -rw-r--r-- | test/infra/Dockerfile.emba | 42 |
1 files changed, 9 insertions, 33 deletions
diff --git a/test/infra/Dockerfile.emba b/test/infra/Dockerfile.emba index 3fbca2a38b5..80056e35a1f 100644 --- a/test/infra/Dockerfile.emba +++ b/test/infra/Dockerfile.emba | |||
| @@ -123,43 +123,19 @@ RUN make -j `nproc` bootstrap | |||
| 123 | RUN mkdir -p /root/.emacs.d/tree-sitter | 123 | RUN mkdir -p /root/.emacs.d/tree-sitter |
| 124 | RUN git config --global http.sslverify "false" | 124 | RUN git config --global http.sslverify "false" |
| 125 | # See https://github.com/emacs-tree-sitter/tree-sitter-langs/tree/master/repos | 125 | # See https://github.com/emacs-tree-sitter/tree-sitter-langs/tree/master/repos |
| 126 | # The verified versions are generated by 'treesit-admin-verify-major-mode-queries` | 126 | # The recommended versions are generated by 'treesit-admin-verify-major-mode-queries` |
| 127 | # at the comments section in ts-mode files. | 127 | # at the beginning of every ts-mode file. Loading a ts-mode file adds its |
| 128 | # grammar source to 'treesit-language-source-alist'. | ||
| 128 | RUN src/emacs -Q --batch \ | 129 | RUN src/emacs -Q --batch \ |
| 129 | --eval \ | 130 | --eval \ |
| 130 | '(message "ABI min version %d max version %d" \ | 131 | '(message "ABI min version %d max version %d" \ |
| 131 | (treesit-library-abi-version t) (treesit-library-abi-version))' \ | 132 | (treesit-library-abi-version t) (treesit-library-abi-version))' \ |
| 132 | --eval '(setq \ | 133 | --eval '(setq treesit-extra-load-path (list "/root/.emacs.d/tree-sitter"))' \ |
| 133 | treesit-extra-load-path (list "/root/.emacs.d/tree-sitter") \ | 134 | --eval '(dolist (feature (quote (c-ts-mode cmake-ts-mode csharp-mode \ |
| 134 | treesit-language-source-alist \ | 135 | dockerfile-ts-mode elixir-ts-mode go-ts-mode heex-ts-mode java-ts-mode \ |
| 135 | (quote ((bash "https://github.com/tree-sitter/tree-sitter-bash" "v0.23.3") \ | 136 | js json-ts-mode lua-ts-mode php-ts-mode python ruby-ts-mode rust-ts-mode \ |
| 136 | (c "https://github.com/tree-sitter/tree-sitter-c" "v0.23.4") \ | 137 | sh-script typescript-ts-mode css-mode html-ts-mode markdown-ts-mode \ |
| 137 | (c-sharp "https://github.com/tree-sitter/tree-sitter-c-sharp" "v0.23.1") \ | 138 | mhtml-ts-mode toml-ts-mode yaml-ts-mode treesit-x))) (require feature))' \ |
| 138 | (cmake "https://github.com/uyha/tree-sitter-cmake" "v0.5.0") \ | ||
| 139 | (cpp "https://github.com/tree-sitter/tree-sitter-cpp" "v0.23.4") \ | ||
| 140 | (css "https://github.com/tree-sitter/tree-sitter-css" "v0.23.1") \ | ||
| 141 | (elixir "https://github.com/elixir-lang/tree-sitter-elixir" "v0.3.3") \ | ||
| 142 | (go "https://github.com/tree-sitter/tree-sitter-go" "v0.23.4") \ | ||
| 143 | (gomod "https://github.com/camdencheek/tree-sitter-go-mod" "v1.1.0") \ | ||
| 144 | (gowork "https://github.com/omertuc/tree-sitter-go-work") \ | ||
| 145 | (heex "https://github.com/phoenixframework/tree-sitter-heex" "v0.7.0") \ | ||
| 146 | (html "https://github.com/tree-sitter/tree-sitter-html" "v0.23.2") \ | ||
| 147 | (java "https://github.com/tree-sitter/tree-sitter-java" "v0.23.5") \ | ||
| 148 | (javascript "https://github.com/tree-sitter/tree-sitter-javascript" "v0.23.1") \ | ||
| 149 | (jsdoc "https://github.com/tree-sitter/tree-sitter-jsdoc" "v0.23.2") \ | ||
| 150 | (json "https://github.com/tree-sitter/tree-sitter-json" "v0.24.8") \ | ||
| 151 | (lua "https://github.com/tree-sitter-grammars/tree-sitter-lua" "v0.3.0") \ | ||
| 152 | (markdown "https://github.com/tree-sitter-grammars/tree-sitter-markdown" "v0.4.1" "tree-sitter-markdown/src") \ | ||
| 153 | (markdown-inline "https://github.com/tree-sitter-grammars/tree-sitter-markdown" "v0.4.1" "tree-sitter-markdown-inline/src") \ | ||
| 154 | (php "https://github.com/tree-sitter/tree-sitter-php" "v0.23.11" "php/src") \ | ||
| 155 | (phpdoc "https://github.com/claytonrcarter/tree-sitter-phpdoc") \ | ||
| 156 | (python "https://github.com/tree-sitter/tree-sitter-python" "v0.23.6") \ | ||
| 157 | (ruby "https://github.com/tree-sitter/tree-sitter-ruby" "v0.23.1") \ | ||
| 158 | (rust "https://github.com/tree-sitter/tree-sitter-rust" "v0.23.2") \ | ||
| 159 | (toml "https://github.com/tree-sitter-grammars/tree-sitter-toml" "v0.7.0") \ | ||
| 160 | (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "v0.23.2" "tsx/src") \ | ||
| 161 | (typescript "https://github.com/tree-sitter/tree-sitter-typescript" "v0.23.2" "typescript/src") \ | ||
| 162 | (yaml "https://github.com/tree-sitter-grammars/tree-sitter-yaml" "v0.7.0"))))' \ | ||
| 163 | --eval '(dolist (lang (mapcar (quote car) treesit-language-source-alist)) \ | 139 | --eval '(dolist (lang (mapcar (quote car) treesit-language-source-alist)) \ |
| 164 | (treesit-install-language-grammar lang "/root/.emacs.d/tree-sitter"))' | 140 | (treesit-install-language-grammar lang "/root/.emacs.d/tree-sitter"))' |
| 165 | 141 | ||