-
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
Convert Java rules to use Toolchain Resolution #4592
Comments
Some work has been done already to convert JavaToolchainProvider and JavaRuntimeInfo into ToolchainInfo instances. Future work will be to centralize access to those objects, and then convert them to use toolchain resolution instead of the current late-bound-attributes for lookup. |
to be clear: I thought you were working on this. In what areas do you require my help? |
Mostly I need help in terms of code and design reviews. This isn't scheduled and I'll only be tackling it on a best-effort basis. |
Excellent, then we are on the same page. I'd love to see this happen, but I also can't commit more time than the occasional code/design review. |
Yes, this is the same as #5462, which I closed as a dupe. We have committment for work on this in 2019Q1, I will try and make sure the appropriate issue is tagged in the commits relating to the work, so that interested parties can follow along. |
Thanks!
…On Mon, 10 Dec 2018 at 17:15 katre ***@***.***> wrote:
Yes, this is the same as #5462
<#5462>, which I closed as a
dupe.
We have committment for work on this in 2019Q1, I will try and make sure
the appropriate issue is tagged in the commits relating to the work, so
that interested parties can follow along.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4592 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIF4apC33iabJ7Z8H-gp_DvW10WRAeks5u3nqlgaJpZM4R7UAr>
.
|
@katre can you please update this issue? |
All of the code is in place, but we haven't flipped the flag for Bazel because no one was available to write the toolchain rules for the Java toolchains. Once that is done we can test flipping the flag and see where downstream projects stand. |
Is this something that the community can get involved in? Is there a guide or an design doc outlining what it means to "write the toolchain rules for the Java toolchains"? I'm guessing this is more than just adding a new toolchain type and a couple of targets. |
The toolchain types exist. the big issues are still, I think, design issues: where do the toolchains live (currently it's some mix of @bazel_tools//tools/jdk, @rules_java, and several @java_tools-type repositories). I'm not sure who is actually in charge of the state of the Java rules: @lberki, can you clarify who is the decider? |
Another question is who is in charge to conduct a new
However, the last release of [1] https://github.com/bazelbuild/java_tools#release-schedule |
Design document: https://docs.google.com/document/d/1MVbBxbKVKRJJY7DnkptHpvz7ROhyAYy4a-TZ-n7Q0r4/edit A new macro remote_java_repository is defined, which creates an additional repository with BUILD file containing toolchain target and registers it. An additional repository prevents download of all JDKs (even if not used). Similarly local_java_repository rule is extended to add toolchain target. In case the local JDK is not present a fake toolchain is added in order to provide a nicer error message (without it toolchain resolution fails without giving a clear message what was wrong). Default_java_toolchain macro is extended to define toolchain rule as well. Local JDKs version is autodetected. Addresses #4592 Closes #12588. PiperOrigin-RevId: 346570811
Defining a new rule "java_runtime_version_alias", which uses a custom configuration flag transition to select a specific version of remote JDK. Added a weird "selected_java_runtime" attribute, which needs to exist until the incompatible_use_java_toolchain_resolution is flipped. Added the test for the attached runtime and fixing the test for host_javabase (now it is only modified for targets in exec configuration). Bootstrap_toolchain had to be moved to another file, because of java_runtime attribute, which is not yet released. Related to #4592 Closes #12677. PiperOrigin-RevId: 346825514
The flag is flipped for tests, old configuration options `javabase` and `java_toolchain` are marked deprecated. All the tests are fixed to execute using new toolchain resolution. Changed `local_java_repository` to generate `java_runtime` with `java_home` parameter set (instead of srcs). This behaves better, because `java_stub_template.txt` then does not need runfiles to execute produced `deploy.jar`. Kept the same version with `srcs` in the `jdk.WORKSPACE`. Related to #4592. Closes #12695. PiperOrigin-RevId: 347969628
Toolchain resolution is available in native rules. Java rules should be updated to use toolchain resolution and platforms, rather than the existing javabase and java_toolchain options in JavaOptions.
The text was updated successfully, but these errors were encountered: