From 339bad2de4696e79aaec629b9ef569f7b0b22f0e Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 16 Sep 2025 10:53:54 +0200 Subject: [PATCH] feat(generate): don't embed tree-sitter CLI version in parser Problem: embedding the CLI version used to generate a parser triggers CI failures on all grammars for every (patch) release of tree-sitter, even if there are no actual parser changes. Solution: do not embed the version; instead rely on whether the update introduces actual (presumably desirable) changes in the parser to indicate regeneration is necessary. --- crates/generate/src/render.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/crates/generate/src/render.rs b/crates/generate/src/render.rs index 826d0919..e4aea008 100644 --- a/crates/generate/src/render.rs +++ b/crates/generate/src/render.rs @@ -24,7 +24,6 @@ const SMALL_STATE_THRESHOLD: usize = 64; pub const ABI_VERSION_MIN: usize = 14; pub const ABI_VERSION_MAX: usize = LANGUAGE_VERSION; const ABI_VERSION_WITH_RESERVED_WORDS: usize = 15; -const BUILD_VERSION: &str = env!("CARGO_PKG_VERSION"); #[clippy::format_args] macro_rules! add { @@ -324,10 +323,7 @@ impl Generator { } fn add_header(&mut self) { - add_line!( - self, - "/* Automatically @generated by tree-sitter v{BUILD_VERSION} */", - ); + add_line!(self, "/* Automatically @generated by tree-sitter */",); add_line!(self, ""); }