Skip to content

tree-sitter-grammars: update all#402457

Closed
kimburgess wants to merge 21 commits intoNixOS:masterfrom
kimburgess:tree-sitter-grammars
Closed

tree-sitter-grammars: update all#402457
kimburgess wants to merge 21 commits intoNixOS:masterfrom
kimburgess:tree-sitter-grammars

Conversation

@kimburgess
Copy link
Member

Updates all tree-sitter grammars specified in pkgs/development/tools/parsing/tree-sitter/update.nix.

When adding tree-sitter-grammars.tree-sitter-netlinx the update script flagged changes available for a number of other listed parsers. Some of these appear to gave not been updated for some time. The existence of past bulk update PRs also appears to indicate the process may not currently be automated.

Note: parser updates have not been tested or validated in any form. No maintainers are listed against any of these packages so would encourage any conversation or questions about suitability of this before merge by those more familiar with this area of Nixpkgs.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Apr 28, 2025
@siraben
Copy link
Member

siraben commented May 12, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 402457


x86_64-linux

❌ 12 packages failed to build:
  • python312Packages.tree-sitter-grammars.tree-sitter-bibtex
  • python312Packages.tree-sitter-grammars.tree-sitter-bibtex.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-comment
  • python312Packages.tree-sitter-grammars.tree-sitter-comment.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-rust
  • python312Packages.tree-sitter-grammars.tree-sitter-rust.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-bibtex
  • python313Packages.tree-sitter-grammars.tree-sitter-bibtex.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-comment
  • python313Packages.tree-sitter-grammars.tree-sitter-comment.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-rust
  • python313Packages.tree-sitter-grammars.tree-sitter-rust.dist
✅ 95 packages built:
  • diffsitter
  • python312Packages.tree-sitter-grammars.tree-sitter-cmake
  • python312Packages.tree-sitter-grammars.tree-sitter-cmake.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-commonlisp
  • python312Packages.tree-sitter-grammars.tree-sitter-commonlisp.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-cuda
  • python312Packages.tree-sitter-grammars.tree-sitter-cuda.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-dart
  • python312Packages.tree-sitter-grammars.tree-sitter-dart.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-fortran
  • python312Packages.tree-sitter-grammars.tree-sitter-fortran.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-gleam
  • python312Packages.tree-sitter-grammars.tree-sitter-gleam.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-glsl
  • python312Packages.tree-sitter-grammars.tree-sitter-glsl.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-ledger
  • python312Packages.tree-sitter-grammars.tree-sitter-ledger.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-lua
  • python312Packages.tree-sitter-grammars.tree-sitter-lua.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-markdown
  • python312Packages.tree-sitter-grammars.tree-sitter-markdown-inline
  • python312Packages.tree-sitter-grammars.tree-sitter-markdown-inline.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-markdown.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-nix
  • python312Packages.tree-sitter-grammars.tree-sitter-nix.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-nu
  • python312Packages.tree-sitter-grammars.tree-sitter-nu.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-php
  • python312Packages.tree-sitter-grammars.tree-sitter-php.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-query
  • python312Packages.tree-sitter-grammars.tree-sitter-query.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-scheme
  • python312Packages.tree-sitter-grammars.tree-sitter-scheme.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-tera
  • python312Packages.tree-sitter-grammars.tree-sitter-tera.dist
  • python312Packages.tree-sitter-grammars.tree-sitter-tiger
  • python312Packages.tree-sitter-grammars.tree-sitter-tiger.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-cmake
  • python313Packages.tree-sitter-grammars.tree-sitter-cmake.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-commonlisp
  • python313Packages.tree-sitter-grammars.tree-sitter-commonlisp.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-cuda
  • python313Packages.tree-sitter-grammars.tree-sitter-cuda.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-dart
  • python313Packages.tree-sitter-grammars.tree-sitter-dart.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-fortran
  • python313Packages.tree-sitter-grammars.tree-sitter-fortran.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-gleam
  • python313Packages.tree-sitter-grammars.tree-sitter-gleam.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-glsl
  • python313Packages.tree-sitter-grammars.tree-sitter-glsl.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-ledger
  • python313Packages.tree-sitter-grammars.tree-sitter-ledger.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-lua
  • python313Packages.tree-sitter-grammars.tree-sitter-lua.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-markdown
  • python313Packages.tree-sitter-grammars.tree-sitter-markdown-inline
  • python313Packages.tree-sitter-grammars.tree-sitter-markdown-inline.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-markdown.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-nix
  • python313Packages.tree-sitter-grammars.tree-sitter-nix.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-nu
  • python313Packages.tree-sitter-grammars.tree-sitter-nu.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-php
  • python313Packages.tree-sitter-grammars.tree-sitter-php.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-query
  • python313Packages.tree-sitter-grammars.tree-sitter-query.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-scheme
  • python313Packages.tree-sitter-grammars.tree-sitter-scheme.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-tera
  • python313Packages.tree-sitter-grammars.tree-sitter-tera.dist
  • python313Packages.tree-sitter-grammars.tree-sitter-tiger
  • python313Packages.tree-sitter-grammars.tree-sitter-tiger.dist
  • tree-sitter-grammars.tree-sitter-bibtex
  • tree-sitter-grammars.tree-sitter-cmake
  • tree-sitter-grammars.tree-sitter-comment
  • tree-sitter-grammars.tree-sitter-commonlisp
  • tree-sitter-grammars.tree-sitter-cuda
  • tree-sitter-grammars.tree-sitter-dart
  • tree-sitter-grammars.tree-sitter-fortran
  • tree-sitter-grammars.tree-sitter-gleam
  • tree-sitter-grammars.tree-sitter-glsl
  • tree-sitter-grammars.tree-sitter-ledger
  • tree-sitter-grammars.tree-sitter-lua
  • tree-sitter-grammars.tree-sitter-markdown
  • tree-sitter-grammars.tree-sitter-markdown-inline
  • tree-sitter-grammars.tree-sitter-nix
  • tree-sitter-grammars.tree-sitter-nu
  • tree-sitter-grammars.tree-sitter-php
  • tree-sitter-grammars.tree-sitter-query
  • tree-sitter-grammars.tree-sitter-rust
  • tree-sitter-grammars.tree-sitter-scheme
  • tree-sitter-grammars.tree-sitter-templ
  • tree-sitter-grammars.tree-sitter-tera
  • tree-sitter-grammars.tree-sitter-tiger

@siraben
Copy link
Member

siraben commented May 12, 2025

There are version mismatches in some of the python tree sitter grammars, it seems:

python-tree-sitter-comment> =================================== FAILURES ===================================                                                   
python-tree-sitter-comment> ________________________________ test_language _________________________________                                                     
python-tree-sitter-comment>                                                           
python-tree-sitter-comment>     def test_language():                                  
python-tree-sitter-comment>       lang = Language(language())                         
python-tree-sitter-comment>       assert lang is not None                             
python-tree-sitter-comment>       parser = Parser()                                   
python-tree-sitter-comment> >     parser.language = lang                              
python-tree-sitter-comment> E     ValueError: Incompatible Language version 15. Must be between 13 and 14      

@kimburgess
Copy link
Member Author

kimburgess commented May 13, 2025

This PR can be ignored. I'm sketching out a refactor to propose some changes to how these grammars are defined. This includes integrating nix-update-script for automating updates and the ability to tag maintainers against each grammar. Still WIP but progress here: master...kimburgess:tree-sitter.

Edit: PR with proposed changes #408414

@kimburgess kimburgess closed this May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants