unified: Make build work in Bazel again#22069
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores bazel build //unified by removing the build-time dependency on an external Node.js binary for tree-sitter Swift parser generation and by ensuring a schema file needed by include_str! is available to Bazel’s Rust compile action.
Changes:
- Switch the
tree-sitter-generateinvocation fortree-sitter-swiftto use the embedded QuickJS runtime (“native”) instead of spawningnode, which is unavailable in Bazel’s sandbox. - Add
ast_types.ymlto the unified extractor Bazel target’scompile_dataso Rust compilation can resolveinclude_str!("../../ast_types.yml").
Show a summary per file
| File | Description |
|---|---|
| unified/extractor/tree-sitter-swift/bindings/rust/build.rs | Uses embedded JS runtime for grammar evaluation to avoid requiring Node.js under Bazel sandboxing. |
| unified/extractor/BUILD.bazel | Adds ast_types.yml to compile_data so the extractor can compile with the YAML embedded via include_str!. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Low
tausbn
approved these changes
Jun 26, 2026
tausbn
left a comment
Contributor
There was a problem hiding this comment.
Changes look reasonable to me, though I'm in no way an expert on Bazel.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes
bazel build //unifiedwork again