Changeset View
Changeset View
Standalone View
Standalone View
README.md
Show All 22 Lines | - Debian-like host | |||||||||
[another debian repository is required to be | [another debian repository is required to be | |||||||||
configured](https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html#deb-repo) | configured](https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html#deb-repo) | |||||||||
- Non Debian-like host | - Non Debian-like host | |||||||||
The tests expect: | The tests expect: | |||||||||
- `/usr/share/elasticsearch/jdk/bin/java` to exist. | - `/usr/share/elasticsearch/jdk/bin/java` to exist. | |||||||||
- `org.elasticsearch.bootstrap.Elasticsearch` to be in java's classpath. | - `org.elasticsearch.bootstrap.Elasticsearch` to be in java's classpath. | |||||||||
- The `tree-sitter` module is required in the python venv to launch the yarn build. To install it, run: | ||||||||||
```bash | ||||||||||
ardumontUnsubmitted Not Done Inline Actions
ardumont: | ||||||||||
Done Inline Actionsthanks good catch :) vsellier: thanks good catch :) | ||||||||||
pip install tree-sitter==0.19.0 | ||||||||||
``` | ||||||||||
- Emscripten is required for generating tree-sitter WASM module. The following commands need to be executed for the setup: | - Emscripten is required for generating tree-sitter WASM module. The following commands need to be executed for the setup: | |||||||||
```bash | ```bash | |||||||||
cd /opt && git clone https://github.com/emscripten-core/emsdk.git && cd emsdk && \ | cd /opt && git clone https://github.com/emscripten-core/emsdk.git && cd emsdk && \ | |||||||||
./emsdk install latest && ./emsdk activate latest | ./emsdk install latest && ./emsdk activate latest | |||||||||
PATH="${PATH}:/opt/emsdk/upstream/emscripten" | PATH="${PATH}:/opt/emsdk/upstream/emscripten" | |||||||||
``` | ``` | |||||||||
**Note:** If emsdk isn't found in the PATH, the tree-sitter cli automatically pulls `emscripten/emsdk` image from docker hub when `make ts-build-wasm` or `make ts-build` is used. | **Note:** If emsdk isn't found in the PATH, the tree-sitter cli automatically pulls `emscripten/emsdk` image from docker hub when `make ts-build-wasm` or `make ts-build` is used. | |||||||||
Show All 18 Lines | ||||||||||
* **ts-test**: executes TreeSitter's native tests | * **ts-test**: executes TreeSitter's native tests | |||||||||
* **ts-build-so**: Generates `swh_ql.so` file from the previously generated parser using py-tree-sitter | * **ts-build-so**: Generates `swh_ql.so` file from the previously generated parser using py-tree-sitter | |||||||||
* **ts-build-so**: Generates `swh_ql.wasm` file from the previously generated parser using emscripten | * **ts-build-so**: Generates `swh_ql.wasm` file from the previously generated parser using emscripten | |||||||||
* **ts-build**: Executes both **ts-build-so** and **ts-build-so** | * **ts-build**: Executes both **ts-build-so** and **ts-build-so** | |||||||||