Skip to content

Conversation

@mkatychev
Copy link
Member

@mkatychev mkatychev commented Mar 6, 2025

Use official grammar repo for OpenSCAD

References Leathong/openscad-LSP#35

Description

tree-sitter-openscad has moved to the https://github.com/openscad org where the NPM package, crate, and python lib are pushed from. This PR updates the grammar location in languages.ncl and flake.nix to point to https://github.com/openscad/tree-sitter-openscad/

Checklist

Checklist before merging, wherever relevant:

@mkatychev mkatychev changed the title Point to OpenSCAD org repo for OpenSCAD grammar Use official grammar repo for OpenSCAD Mar 6, 2025
@mkatychev
Copy link
Member Author

@Xophmeister should I avoid manually updating flake.lock? #888

@mkatychev mkatychev changed the title Use official grammar repo for OpenSCAD chore: Use official grammar repo for OpenSCAD Mar 6, 2025
@mkatychev mkatychev marked this pull request as ready for review March 6, 2025 17:14
@mkatychev
Copy link
Member Author

@Xophmeister
Copy link
Member

should I avoid manually updating flake.lock? #888

It's fine to update it outside of the automation we now have 👍 In fact, it's probably necessary for the CI to run on this PR.

Seems there's compatibility issues: https://github.com/tweag/topiary/actions/runs/13704201091/job/38325408688?pr=896#step:9:618

Have the grammars changed between your version and this official version? I haven't looked into them, but that's the only thing I can think of (not that much has happened since your original OpenSCAD contribution was merged).

@mkatychev
Copy link
Member Author

Have the grammars changed between your version and this official version? I haven't looked into them, but that's the only thing I can think of (not that much has happened since your original OpenSCAD contribution was merged).

Yes it looks like tree-sitter 0.25 was a breaking change in the ABI:
Release v0.25.0 · tree-sitter/tree-sitter

The internal ABI was bumped to 15. The main benefits this brings is that the language name, version, supertype info, and reserved words are added to the parsers. To use ABI 15, you must have a tree-sitter.json file in your repository, since the version information for the parser is pulled from this file.

@Xophmeister Xophmeister force-pushed the chore/move-openscad-repo branch from 52be462 to 8e4230e Compare March 12, 2025 17:00
@Xophmeister
Copy link
Member

Xophmeister commented Mar 12, 2025

Apologies: I messed up the merge conflict, so rebased and tried again... I will approve this, once the tests have passed 👍 but please double-check I haven't messed it up again, before you merge 😅

@mkatychev
Copy link
Member Author

@Xophmeister everything LGTM!

@Xophmeister Xophmeister merged commit 486ad33 into tweag:main Mar 14, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants