Revert "feat: add build sha to parser.c header comment" (#4475)
This reverts commitdc4e232e6e. 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 commite7f9160867)
This commit is contained in:
parent
4cac30b54a
commit
baf222f772
3 changed files with 1 additions and 40 deletions
|
|
@ -24,7 +24,6 @@ pub const ABI_VERSION_MIN: usize = 14;
|
|||
pub const ABI_VERSION_MAX: usize = tree_sitter::LANGUAGE_VERSION;
|
||||
const ABI_VERSION_WITH_RESERVED_WORDS: usize = 15;
|
||||
const BUILD_VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
const BUILD_SHA: Option<&'static str> = option_env!("BUILD_SHA");
|
||||
|
||||
macro_rules! add {
|
||||
($this: tt, $($arg: tt)*) => {{
|
||||
|
|
@ -322,13 +321,9 @@ impl Generator {
|
|||
}
|
||||
|
||||
fn add_header(&mut self) {
|
||||
let version = BUILD_SHA.map_or_else(
|
||||
|| BUILD_VERSION.to_string(),
|
||||
|build_sha| format!("{BUILD_VERSION} ({build_sha})"),
|
||||
);
|
||||
add_line!(
|
||||
self,
|
||||
"/* Automatically @generated by tree-sitter v{version} */",
|
||||
"/* Automatically @generated by tree-sitter v{BUILD_VERSION} */",
|
||||
);
|
||||
add_line!(self, "");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue