Skip to content

build: use dune#105

Open
kopecs wants to merge 1 commit intomainfrom
cooper/01-16-build_use_dune
Open

build: use dune#105
kopecs wants to merge 1 commit intomainfrom
cooper/01-16-build_use_dune

Conversation

@kopecs
Copy link
Contributor

@kopecs kopecs commented Jan 27, 2026

Moves the build from being dependent on a combination of dune and make to just use dune. This should help simplify things and help make using different versions of tree-sitter a bit easier, since they could be included as different dune projects, rather than needing to handle mutating symlinks in this included as a submodule. This also helps to address some version differences that would create issues with that approach (cf. #106).

One issue with the previous approach was that the version of tree-sitter linked against may not have been the downloaded version. For the versions we have historically been on, this should be OK, since the ABI was compatible and our grammars don't have the current tree-sitter.json config file introduced in (circa) v.0.24.0, so generated code should also use ABI 14. But this may soon no longer be true and would become a barrier to updating grammars where upstream requires a more current version.

This also helps improve build caching, since dune is now aware of more of the dependency graph.

Security

  • Change has no security implications (otherwise, ping the security team)

Copy link
Contributor Author

kopecs commented Jan 27, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

This was referenced Jan 27, 2026
@kopecs kopecs force-pushed the cooper/01-16-build_use_dune branch 2 times, most recently from 40c41d5 to 461edaf Compare January 27, 2026 22:32
build:
docker:
- image: returntocorp/ocaml:ubuntu
- image: ocaml/opam:debian-ocaml-5.4
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is the preferred image here?

@kopecs kopecs marked this pull request as ready for review January 28, 2026 18:36
@kopecs
Copy link
Contributor Author

kopecs commented Jan 28, 2026

I still need to do more testing and updates for dependent repos which use this as a submodule (since there is some reliance on symlinks to certain makefiles or scripts here :/), but that shouldn't be a barrier to merging this subject to code review.

@kopecs kopecs force-pushed the cooper/01-16-build_use_dune branch from 461edaf to d21c9b5 Compare January 29, 2026 17:41
Copy link
Contributor

@yosefAlsuhaibani yosefAlsuhaibani left a comment

Choose a reason for hiding this comment

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

We went talked through this PR in person, seems good. We should think of bumping the submodule in ocaml-tree-sitter-semgrep, it would be nice if we'd wait merging this till the build there succeeds, but also that's just me being paranoid.

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