-
Notifications
You must be signed in to change notification settings - Fork 325
Run buildifier to add missing loads #7611
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I think this is a good idea. But maybe in smaller batches and I think we need to decide if we want to keep compatibility with AOSP, because this will make picks harder in future.
86bc297
to
52fc60c
Compare
load("@protobuf//bazel:java_proto_library.bzl", "java_proto_library") | ||
load("@protobuf//bazel:proto_library.bzl", "proto_library") | ||
load("@rules_java//java:defs.bzl", "java_library") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question, why are there two different kinds of loads:
load("@rules_java//java:defs.bzl", "java_library")
load("@rules_java//java:java_library.bzl", "java_library")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defs.bzl
is older (and legacy). At the moment we're advising everybody to use <symbol>.bzl
. This results in minimal loads (defs.bzl needs to load everything, and by accident there java_proto_library in rules_java, that pulls down protobuf).
If there's a preexisting use of defs.bzl
, buildifier won't touch it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this. Do we want to merge this? @ujohnny
… aspect, needs template
Since release is done, I'd suggest we merge this now? @ujohnny |
Run
buildifier --lint=fix -r -v
. This addloads
for the rules that were removed from Bazel 8. By Bazel 9 automatic loads will be disabled and all loads will need to be explicitly present.Some loads that cause test failures are omitted and should be done in a separate PRs.
See: bazelbuild/bazel#25755