-
Notifications
You must be signed in to change notification settings - Fork 15.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[29.x] Add missing java load #19016
[29.x] Add missing java load #19016
Conversation
The failures in presubmit seem unrelated to this PR: From upb/MacOS:
From Annotations/All Blocking Tests:
It looks like the first one is some kind of python toolchain error, and the second is a test set up specifically to fail? |
For most _native_ loads of Java rules (e.g. java_library), these can be automatically handled by Bazel 8's autoload feature. However, this is not the case when the main repository (IOW, the repository currently being built) is a rule repo itself. In those cases, module dependencies are not automatically loaded. This PR fixes a compatibility issue of OSS protobuf Bazel rules with other Bazel rule repositories such as bazelbuild/rules_android. Without this PR, builds within rules repositories with Bazel 8 will fail like so: ``` external/protobuf+/java/core/BUILD.bazel:142:13: @@protobuf+//java/core:lite: no such attribute 'srcs' in 'java_library' rule ``` PiperOrigin-RevId: 690735533
Head branch was pushed to by a user without write access
4d64e0e
to
bf5769c
Compare
The github workflows are still failing with the numpy error. @zhangskz any idea about the root cause? I still don't think my change should have caused this, and it looks like the recent other commits in the 29.x branch have been green. I do see that 7060d3d bumped the numpy version, and also bumped the MacOS version number from 12 to 13. Would that be a relevant commit to cherry-pick into 29.x? |
Went ahead and merged this -- the error you saw should've been fixed in main and backported in #19013 (due to upgrade of github to python 3.13) |
(cherry-pick of 89533c7)
For most native loads of Java rules (e.g. java_library), these can be automatically handled by Bazel 8's autoload feature.
However, this is not the case when the main repository (IOW, the repository currently being built) is a rule repo itself. In those cases, module dependencies are not automatically loaded.
This PR fixes a compatibility issue of OSS protobuf Bazel rules with other Bazel rule repositories such as bazelbuild/rules_android.
Without this PR, builds within rules repositories with Bazel 8 will fail like so:
PiperOrigin-RevId: 690735533