Go: fix standalone build of the Go extractor#21371
Merged
Conversation
#21276 worked together with the internal changes but broke the standalone build of the Go extractor of this repo in isolation. The root cause was the lack of an auto-loaded `java_library` rule definition. This fixes it. I also checked this doesn't happen anywhere else.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a build breakage in the standalone Go extractor that was introduced by the Bazel 9.0.0 upgrade in PR #21276. The issue arose because Bazel 9 removed native.java_* rules from Starlark scope, requiring explicit imports from rules_java. While the internal build worked (likely due to auto-loading configurations), the standalone build of the Go extractor failed without the explicit load statement.
Changes:
- Add explicit
load("@rules_java//java:defs.bzl", "java_library")statement togo/extractor/BUILD.bazel
mbg
approved these changes
Feb 25, 2026
redsun82
added a commit
that referenced
this pull request
Feb 25, 2026
Turns out in #21371 I was right about `java_*` rules not relying on autoload anywhere, but it turns out some `cc_*` rules still relied on autoload. This autoload is currently configured in the internal repository, but we want to remove it eventually. This patch: * adds explicit loads to `rules_cc` * removes an obsolete file (that depedency has its own bazel module since some time, we just forgot to remove the old file)
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.
#21276 worked together with the internal changes but broke the standalone build of the Go extractor of this repo in isolation.
The root cause was the lack of an auto-loaded
java_libraryrule definition. This fixes it.I also checked this doesn't happen anywhere else.