Pass headers along as transitive dependencies#4298
Merged
fmeum merged 6 commits intobazel-contrib:masterfrom May 22, 2025
Merged
Pass headers along as transitive dependencies#4298fmeum merged 6 commits intobazel-contrib:masterfrom
fmeum merged 6 commits intobazel-contrib:masterfrom
Conversation
lbcjbb
reviewed
Mar 24, 2025
b2a1056 to
a8e2e5a
Compare
37d76da to
931580d
Compare
fmeum
reviewed
Mar 28, 2025
fd0a8bf to
41a5b9f
Compare
This was referenced Apr 4, 2025
Contributor
|
I don't want to deviate the PR discussion, just wondering, this change alone should fix |
Contributor
Author
In my testing, this change alone fixed |
jayconrod
reviewed
Apr 7, 2025
Member
|
@patrickmscott Friendly ping, do you have capacity to address Jay's comments? |
Contributor
Author
Yes, it just slipped off my radar. Let me see if I can address them. |
41a5b9f to
3d7c05f
Compare
This fixes github.com/cloudflare/circl relative imports by making those headers available at compile time.
The headers from dependencies _may_ be used to produce an artifact so they should be direct dependencies.
- Collect headers and transitive headers into a depset. - Provide the headers depset to emit_compilepkg - Add a compilation target that includes headers with transitive, relative include paths.
3d7c05f to
1474d3b
Compare
jvandew
added a commit
to foursquare/scala-gazelle
that referenced
this pull request
Jun 2, 2025
While this repo was previously consumable as a go dependency (which is in fact how our internal monorepo consumes it), it is also useful to allow installation via Bzlmod or WORKSPACE for repos which otherwise don't require a go environment. Support for these is added here, although Bzlmod currently requires an `--override_module` flag as we aren't published to the Bazel Central Registry. The two main bits of complexity here are: 1. Making sure the requisite go module dependencies get installed. Bzlmod handles this for us, but WORKSPACE requires that we set up Gazelle to generate a macro users can call to install them. 2. Solving the patching situation with go-tree-sitter. There is an [unreleased fix](bazel-contrib/rules_go#4298) merged to rules_go which this PR uses to remove the need for patching in this repo. However, we still require the patch being available for downstream users who might not have the rules_go fix available. In the WORKSPACE setup this is handled for them by the `scala_gazelle_deps` macro, but Bzlmod users will have to add the `go_deps.module_override` manually as it is only callable from their repo's root module.
This was referenced Jun 3, 2025
|
I've created a minimal reproducible example showing (now solved) CIRCL Bazel-Compilation. |
github-merge-queue bot
pushed a commit
to bazel-contrib/rules_python
that referenced
this pull request
Aug 17, 2025
) Update rules_go to include bazel-contrib/rules_go#4298 Update gazelle to align with the version the rules_go bzlmod will bring in, and ensure the go.mod version is the same as bzlmod version. Update go to 1.21 to include the `slices` library that some of the go.mod updates depend on. Fixes #2956.
github-merge-queue bot
pushed a commit
to bazel-contrib/rules_python
that referenced
this pull request
Aug 17, 2025
) Update rules_go to include bazel-contrib/rules_go#4298 Update gazelle to align with the version the rules_go bzlmod will bring in, and ensure the go.mod version is the same as bzlmod version. Update go to 1.21 to include the `slices` library that some of the go.mod updates depend on. Fixes #2956. --------- Co-authored-by: Douglas Thor <dougthor42@users.noreply.github.com>
albertocavalcante
added a commit
to albertocavalcante/bazelle
that referenced
this pull request
Jan 25, 2026
Add a tree-sitter abstraction layer with two pluggable backends: - CGO backend: Uses smacker/go-tree-sitter (29 languages) - Wazero backend: Uses malivvan/tree-sitter via WASM (pure Go, experimental) Features: - Backend interface for swappable implementations - Environment variable control (BAZELLE_TREESITTER_BACKEND) - Helper functions for tree traversal (FindByType, Walk, etc.) - Comprehensive test coverage for both backends Known limitations: - PHP, SQL, Markdown excluded from CGO backend due to Bazel include path issues (see smacker/go-tree-sitter#175) - Wazero backend currently only supports C/C++ Related issues: - smacker/go-tree-sitter#175 - bazel-contrib/bazel-gazelle#2059 - bazel-contrib/rules_go#4298
eukia bot
pushed a commit
to albertocavalcante/gazelle-kotlin
that referenced
this pull request
Jan 27, 2026
Add a tree-sitter abstraction layer with two pluggable backends: - CGO backend: Uses smacker/go-tree-sitter (29 languages) - Wazero backend: Uses malivvan/tree-sitter via WASM (pure Go, experimental) Features: - Backend interface for swappable implementations - Environment variable control (BAZELLE_TREESITTER_BACKEND) - Helper functions for tree traversal (FindByType, Walk, etc.) - Comprehensive test coverage for both backends Known limitations: - PHP, SQL, Markdown excluded from CGO backend due to Bazel include path issues (see smacker/go-tree-sitter#175) - Wazero backend currently only supports C/C++ Related issues: - smacker/go-tree-sitter#175 - bazel-contrib/bazel-gazelle#2059 - bazel-contrib/rules_go#4298 Bazelle-RevId: 721a2452d1f6d83d0540a4c057dbb56739bd7109
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.
This fixes github.com/cloudflare/circl relative imports by making those headers available at compile time.
What type of PR is this?
Feature
What does this PR do? Why is it needed?
Expose headers in GoArchive so that compilepkg can make them visible. This will make it possible for relative imports to find header files.
Which issues(s) does this PR fix?
Fixes #4154
Other notes for review