rules_java icon indicating copy to clipboard operation
rules_java copied to clipboard

README.md lacks basic usage and clarity about built-in java support vs. what's provided by rules_java

Open reddaly opened this issue 3 years ago • 1 comments

I'm not clear on how users are supposed to use rules_java vs. the java rules that seem to come built into Bazel. The README.md could clarify this.

The special treatment is mentioned here, but I don't follow what's going on exactly https://github.com/bazelbuild/bazel/issues/14370:

rules_java is still an external repository and it is imported by default via workspace prefix mechanism. The version of rules_java that is imported has not changed since 2019-07-03.

There is a "builtin" java_library implementation. But this does not change how rules_java are imported. So if you are loading a different version of rules_java in your WORKSPACE you should continue to do so.

What is the "workspace prefix mechanism?" How can I update or see what verison of rules_java are being imported implicitly? Why are such rules available using @bazel_tools rather than @rules_java?

reddaly avatar Dec 19 '22 23:12 reddaly

Related to https://github.com/bazelbuild/bazel/issues/4301

reddaly avatar Dec 20 '22 00:12 reddaly