-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Force loading the Java rules from the rules_java repo #8741
Comments
Not sure If I should report issues here or rather in #8746 (or open a new issue). I'm trying to migrate Gerrit (stable-2.14 branch) to this change, using buildifier 0.28.0 with After performing the changes in BUILD and in *.bzl files, build is failing on Bazel 0.28.1 and on Bazel@HEAD (019586a):
Update I figured out what change caused this error. It is one single @aehlig @laurentlb Any idea how can I further investigate this problem? [1] https://gerrit-review.googlesource.com/c/gerrit/+/232534 |
…_bzl bazelbuild#8741 Closes bazelbuild#10150. PiperOrigin-RevId: 278594979
Force loading the Java rules from the rules_java repo, as pointed out in: [1]. Note that even with this change, gerrit cannot be built with --incompatible_load_java_rules_from_bzl option passed yet: $ bazel build --incompatible_load_java_rules_from_bzl :release The other transitive dependencies must be fixed first, most notably rules_closure: [2], or more generally, Bazel's own: jvm_import_external and java_import_external rules: [3]. [1] bazelbuild/bazel#8741 [2] bazelbuild/rules_closure#449 [3] bazelbuild/bazel#10046 Bug: Issue 11738 Change-Id: I153b6d3c14d6df465034041c3bf81c245df0aa04
I know there were some thoughts on offering automatic migrations for certain flags any chance this flag has this? Alternatively is there a buildozer magic to add a load whenever there’s a usage? |
You can use buildifier right now to add load statements
or do you mean something that runs automatically when the flag is set? |
Awesome! This is exactly what I meant 😁 thanks! |
Cool 😄 There's a list of all supported warnings. |
Update: We decided not to require everyone to add a load() statement to every single BUILD file because it's too much churn. The current plan is to "pretend" that the eventual C++/Java rules written in Starlark are load()ed everywhere. We might revisit this decision once they are reasonably stable and once we decide where exactly they need to be load()ed from, but now is not the time. |
This big breaking change will force users of the Java rules to use the Starlark rules from the rules_java repository. The rules there are currently only wrappers around native rules, but they will soon be rewritten.
To save our users from this big migration after Bazel 1.0, we will implement an incompatible flag and provide migration instructions before 1.0, and we will flip this flag for 1.0.
The text was updated successfully, but these errors were encountered: