tree-sitter.grammars: pin known bad with pythonPackages.tree-sitter 0.24

This commit prevents the update script from touching the files listed
under `pinnedGrammars`. This way breakages cannot accidentally be caused
again (re: #414233 breaking the heck out of staging-next et al)
This commit is contained in:
Tom van Dijk 2025-07-16 14:55:18 +02:00
parent 24889e5e6a
commit 8aecb65a2d
No known key found for this signature in database
GPG Key ID: 7A984C8207ADBA51
2 changed files with 20 additions and 0 deletions

View File

@ -494,6 +494,21 @@ let
};
};
pinnedGrammars = [
"tree-sitter-bash"
"tree-sitter-bibtex"
"tree-sitter-c"
"tree-sitter-comment"
"tree-sitter-fortran"
"tree-sitter-hcl"
"tree-sitter-hyprlang"
"tree-sitter-llvm"
"tree-sitter-markdown"
"tree-sitter-query"
"tree-sitter-rust"
];
pinnedGrammarsJson = jsonFile pinnedGrammars;
allGrammars =
let
treeSitterOrgaGrammars = lib.listToAttrs (
@ -523,6 +538,7 @@ let
inherit
knownTreeSitterOrgGrammarRepos
ignoredTreeSitterOrgRepos
pinnedGrammars
;
}
(

View File

@ -96,6 +96,10 @@ def fetchRepo() -> None:
"outputDir": outputDir,
"nixRepoAttrName": nixRepoAttrName,
}:
if repo in args["pinnedGrammars"]:
log(f"Grammar {repo} is pinned, skipping upgrade...")
return
token: str | None = os.environ.get("GITHUB_TOKEN", None)
out = run_cmd(
curl_github_args(