Skip to content

python3Packages.tree-sitter-grammars: init at 0.22.5#320783

Merged
fricklerhandwerk merged 4 commits intoNixOS:stagingfrom
ngi-nix:treesitter-python-generated-grammars
Apr 2, 2025
Merged

python3Packages.tree-sitter-grammars: init at 0.22.5#320783
fricklerhandwerk merged 4 commits intoNixOS:stagingfrom
ngi-nix:treesitter-python-generated-grammars

Conversation

@sarcasticadmin
Copy link
Member

Description of changes

As request in ngi-nix/ngipkgs#139

This generates a python binding package for each tree-sitter-grammar that exists in tree-sitter.builtGrammars.

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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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 6.topic: python Python is a high-level, general-purpose programming language. 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` labels Jun 18, 2024
@sarcasticadmin sarcasticadmin force-pushed the treesitter-python-generated-grammars branch from 6937418 to 253c53f Compare June 18, 2024 13:59
@mightyiam mightyiam force-pushed the treesitter-python-generated-grammars branch from 253c53f to 1ff067a Compare June 18, 2024 14:06
@GetPsyched GetPsyched force-pushed the treesitter-python-generated-grammars branch from 1ff067a to fe9e96c Compare June 18, 2024 14:12
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jun 18, 2024
@mightyiam mightyiam force-pushed the treesitter-python-generated-grammars branch 2 times, most recently from 4eeaa9e to 8c63440 Compare June 19, 2024 13:52
@stepbrobd stepbrobd force-pushed the treesitter-python-generated-grammars branch from 8c63440 to 0550b06 Compare June 20, 2024 07:22
@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Jun 20, 2024
@ofborg ofborg bot requested review from mightyiam and stepbrobd June 20, 2024 07:59
@ofborg ofborg bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jun 20, 2024
@A-jay98 A-jay98 force-pushed the treesitter-python-generated-grammars branch from 0550b06 to 5947cdb Compare June 20, 2024 08:07
@adfaure adfaure force-pushed the treesitter-python-generated-grammars branch from 5947cdb to ea460ca Compare June 20, 2024 08:28
@ofborg ofborg bot requested a review from mightyiam June 20, 2024 09:12
@mightyiam
Copy link

For the record, this is already ready for review, even though it's marked as draft.

@sarcasticadmin sarcasticadmin marked this pull request as ready for review June 20, 2024 12:07
@sarcasticadmin sarcasticadmin force-pushed the treesitter-python-generated-grammars branch from ea460ca to d3890e6 Compare June 20, 2024 13:51
@mightyiam mightyiam force-pushed the treesitter-python-generated-grammars branch 2 times, most recently from be0a31b to 93a9562 Compare June 20, 2024 14:23
@github-actions github-actions bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Mar 19, 2025
@adisbladis adisbladis removed their request for review March 20, 2025 11:41
@jian-lin jian-lin removed their request for review March 20, 2025 15:24
@ambroisie ambroisie mentioned this pull request Mar 20, 2025
13 tasks
@fricklerhandwerk fricklerhandwerk changed the base branch from master to staging March 25, 2025 07:58
@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Mar 25, 2025
@adfaure adfaure force-pushed the treesitter-python-generated-grammars branch 2 times, most recently from b11917a to d92aaca Compare March 25, 2025 08:37
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Mar 25, 2025
@adfaure adfaure force-pushed the treesitter-python-generated-grammars branch from d92aaca to 0e1596f Compare March 25, 2025 08:45
@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Mar 25, 2025
@adfaure adfaure force-pushed the treesitter-python-generated-grammars branch from 0e1596f to b69b50a Compare March 25, 2025 09:09
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Mar 25, 2025
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Stray newline

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, it should be fixed now.

@adfaure adfaure force-pushed the treesitter-python-generated-grammars branch from b69b50a to 5f355d2 Compare March 29, 2025 20:57
@fricklerhandwerk
Copy link
Contributor

I think this is good and will merge it in the next few days. If anyone has complaints after that, we're here to fix forward.

adfaure and others added 4 commits April 1, 2025 09:17
Co-authored-by: Robert James Hernandez <[email protected]>
Co-authored-by: Yifei Sun <[email protected]>
Co-authored-by: Ali Jamadi <[email protected]>
Co-authored-by: yakampe <[email protected]>
Co-authored-by: GetPsyched <[email protected]>
Co-authored-by: Adrien Faure <[email protected]>
Co-authored-by: Shahar "Dawn" Or <[email protected]>

python3Packages.tree-sitter-grammars: Filtering uncompatible grammars

py-tree-sitter is still not up to date to latest tree-sitter (0.25).
py-tree-sitter gets tree-sitter from a submodule which is at version 0.24.

Therefore all grammar with a langage version greater that 14 are not
compatible (language version is most of the time commited into the
source of the grammar, so we don't have a lot of control over it).

For now it concerns two grammars:
- sql grammar gets generated during the build and therefore ends up with
the latest language version (15) not compatible with py-tree-sitter
- templ grammar is already at version 15 in the upstream source.
@adfaure adfaure force-pushed the treesitter-python-generated-grammars branch from 5f355d2 to 7b1f63b Compare April 1, 2025 08:09
@fricklerhandwerk fricklerhandwerk merged commit a9cf004 into NixOS:staging Apr 2, 2025
27 of 29 checks passed
@mightyiam mightyiam deleted the treesitter-python-generated-grammars branch April 2, 2025 07:55
@mightyiam
Copy link

Congratulations!

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/ngi-nix-report-for-2025q1-2025-01-13-2025-04-15/63859/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 8.has: documentation This PR adds or changes documentation 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.