Commit graph

36 commits

Author SHA1 Message Date
Christian Clason baf222f772 Revert "feat: add build sha to parser.c header comment" (#4475)
This reverts commit dc4e232e6e.

Reason: The sha in the generated output (which most distro builds of
tree-sitter, including `cargo install`, strip) produces too many
conflicts when verifying via CI that parsers are regenerated on every
grammar change.

(cherry picked from commit e7f9160867)
2025-05-29 23:14:25 +02:00
Amaan Qureshi dda45cfbb6 docs: move assets to correct path 2024-12-25 21:23:36 -05:00
Amaan Qureshi 274e60a523
fix: clippy lints
Some checks failed
CI / sanitize (push) Failing after 14s
CI / build (push) Failing after 15s
Check Bindgen Output / check-bindgen (push) Has been cancelled
CI / checks (push) Has been cancelled
2024-11-16 03:20:59 -05:00
dundargoc a3de650024 fix: make sha generation work with submodules
More specifically, change `is_dir` to `exists` as `.git` is a file when
in a submodule.
2024-10-28 12:16:48 +01:00
dundargoc dc4e232e6e feat: add build sha to parser.c header comment 2024-10-28 12:16:48 +01:00
ObserverOfTime 413b7cbcca build(cli): get build sha via git command
Some checks failed
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 14s
CI / build (push) Failing after 14s
2024-10-26 04:41:10 +00:00
ObserverOfTime 3950dddfde fix(rust): fix new clippy warnings 2024-07-28 10:12:32 +03:00
Amaan Qureshi cdc9fbb240
fix: cli build script behavior on release 2024-03-10 17:53:35 -04:00
Amaan Qureshi eb35502f06 test: don't use TS_REUSE_ALLOCATOR on Darwin systems
For some reason, the linker seems to behave a bit differently with `-exported_symbols_list` on macOS vs other operating systems, so we'll disable this for now
2024-02-26 20:15:36 -05:00
Amaan Qureshi f1eecf9786 feat: expose the allocator and array header files for external scanners 2024-02-26 09:43:13 -05:00
Amaan Qureshi 9e5bf6591f feat: improve language bindings
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
2024-02-25 19:06:01 -05:00
Max Brunsfeld 29d3583bdf Use workspace dependencies for internal crates 2024-02-25 11:14:29 -08:00
Amaan Qureshi 04ff704bca
chore(cli): apply clippy fixes 2024-02-04 04:18:48 -05:00
Max Brunsfeld f4e2f68f14 Merge branch 'master' into wasm-language 2023-10-27 12:11:43 +01:00
Andrew Hlynskyi b1024a1493 cli: Fix build.rs in case of the current branch ref was packed
Support SHA lookup in .git/packed-refs
2023-01-03 00:44:01 +02:00
Andrew Hlynskyi c669e5ee15 Fix permanent rebuild triggering in a git worktree due to wrong git branch file path 2022-12-11 19:16:20 +02:00
Max Brunsfeld d47713ee4a Integrate WASM compilation into the CLI's Loader 2022-11-15 17:14:33 -08:00
Max Brunsfeld 4d64c2b939 Put emscripten-version file in cli directory
This lets the CLI crate build without relying on sibling directories.
2021-09-03 13:57:45 -07:00
Max Brunsfeld b938486ebe In CLI, get tree-sitter binding version from CLI's Cargo.toml 2021-09-03 13:54:47 -07:00
Max Brunsfeld 23b28f6f36 Fix 'include!' error when building the CLI outside of the repo 2021-09-03 13:45:13 -07:00
Max Brunsfeld af0ed73f76
Merge branch 'master' into fix/1032 2021-06-29 15:59:15 -07:00
Vladimir Panteleev b14ea51e3d
Refactor emscripten/emsdk version to a single file 2021-06-29 21:39:12 +00:00
Andrew Hlynskyi f22d62393b fix(cli): actual Rust binding version in generated Cargo.toml 2021-06-30 00:36:11 +03:00
Douglas Creager 66c30648c2 rust: Extract runtime language detection into separate crate
This patch adds a new `tree-sitter-loader` crate, which holds the CLI's
logic for finding and building local grammar definitions at runtime.
This allows other command-line tools to use this logic too!
2021-06-09 17:42:30 -04:00
Patrick Thomson 931d0c2600 fix warning and use implicit return here 2020-09-15 13:22:22 -04:00
Patrick Thomson 71f5908806 Max's suggestions. 2020-09-15 13:08:03 -04:00
Patrick Thomson 865f59ad74 No need for platformish logic in build.rs. 2020-09-08 09:23:54 -04:00
Patrick Thomson 660fe86300 web_ui and playground.js are always there. 2020-09-08 09:15:00 -04:00
Patrick Thomson 92a17e782f Conditionally compile with a cfg variable instead. 2020-09-02 15:32:12 -04:00
Patrick Thomson 6256110bd2 simplest changes, just error in the build 2020-09-02 13:31:29 -04:00
Matthew Krupcale 276d3cb5ad tree-sitter-cli: build: add support for git submodules (#422)
The .git file can contain a reference to the actual git directory as is commonly the case for a submodule[1]. When this is the case, read the .git file to discover the actual git directory.

 * cli/build.rs: Read the .git file to discover the git directory

[1] https://git-scm.com/docs/gitrepository-layout
2019-08-12 14:11:59 -07:00
Max Brunsfeld fa68ef4cea Make git sha optional at build time
Fixes #352
2019-06-06 13:12:53 -07:00
Max Brunsfeld 6194dfc247 Don't rely on PWD to find .git folder in build script 2019-02-05 11:55:12 -08:00
Max Brunsfeld ed195de8b6 rustfmt 2019-01-17 17:16:04 -08:00
Max Brunsfeld c204b5e728 Print help/version info when run w/ no subcommand 2019-01-17 15:17:36 -08:00
Max Brunsfeld e64f7a64a1 Start work on running test corpus tests 2019-01-11 13:31:06 -08:00