Upgrade rules_java and add rule loads#1271
Conversation
* Upgrade to the latest rules_java 8.1.0 * Add loads for Java rules NOTE: The loads and rules_java version unforutunately are tightly related. The paths for the bzl files for Java rules changed between rules_java 7 and 8.
|
For some more context on the rule loads: This PR is supposed to make rules_jvm_external work with Bazel 8, which removes all native Java rule loads. Most users will be able to upgrade to Bazel 8 without manually adding all of these loads for Java rules. The exception is rule repository maintainers -- I'm not sure of the specifics, but it looks like rule reposotiries (rules_java, rules_android, etc) are special-cased, and autoloads from other rule repositories are disabled. I was motivated to write this PR when trying to get rules_android to work with Bazel 8. Because I'm working inside a rule repo, it looks like transitive repo deps are not autoloaded -- for example, rules_jvm_external's use of java_library/java_import rules. For more context on why rules_java 8.1.0: rules_java v8 changed where symbols such as java_binary and JavaInfo are loaded from. The old paths to various .bzl files seem to no longer exist, or at least are no longer visible. |
|
/cc @comius |
|
Wait, did you forget to update MODULE.bazel? |
|
Ah, my main repository already had rules_java bumped to 7.12.2 so I forgot I had to update it in RJE too. I see you already updated RJE's MODULE.bazel in 3ea9649. I think that should be sufficient. |
Autoload is disabled for rules_java by default on Bazel 9. Many of these were already fixed in bazel-contrib#1271, but some more are still left.
Autoload is disabled for rules_java by default on Bazel 9. Many of these were already fixed in bazel-contrib#1271, but some more are still left.
Autoload is disabled for rules_java by default on Bazel 9. Many of these were already fixed in bazel-contrib#1271, but some more are still left.
Autoload is disabled for rules_java by default on Bazel 9. Many of these were already fixed in bazel-contrib#1271, but some more are still left.
Autoload is disabled for rules_java by default on Bazel 9. Many of these were already fixed in bazel-contrib#1271, but some more are still left.
Autoload is disabled for rules_java by default on Bazel 9. Many of these were already fixed in bazel-contrib#1271, but some more are still left.
Autoload is disabled for rules_java by default on Bazel 9. Many of these were already fixed in #1271, but some more are still left.
NOTE: The loads and rules_java version unforutunately are tightly related. The paths for the bzl files for Java rules changed between rules_java 7 and 8.