Bazel has a circular source dependency on itself in the form of the java_tools distribution, such that even when bootstrapping Bazel there is a dependency on precompiled C++ artifacts from java_tools via remote_java_tools_prebuilt, and the java_tools artifacts themselves must be built using Bazel. I would like to be able to bootstrap the java_tools from source as well, but that doesn't seem to be an option currently.So, what is the expectation here? (I imagine that whatever reasons there are to support bootstrapping Bazel would also apply to the java_tools.) I assume this is required by Linux distros (ex: Debian) to support native packages, right? Is this something the Bazel Authors would support given the cycles/volunteers?
--
You received this message because you are subscribed to the Google Groups "bazel-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-dev/6c844026-4c00-4bd1-9e9f-52c94fc19a51n%40googlegroups.com.
Google Germany GmbH
Erika-Mann-Straße 33
80636 München
Geschäftsführer: Paul Manicle, Liana Sebastian
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Diese E-Mail ist vertraulich. Falls Sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.
This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.
> IIRC, when bootstrapping Bazel, we are using a different java toolchain [...] therefore the java_tools dependencies shouldn't be neededYup, saw those. :) So, IIUC it looks like there are two problems:
- As you discovered, the bootstrapping toolchain still depends on remote_java_tools.
- I think we can correct that by overriding `header_compiler`, `head_compiler_direct`, and `jacocorunner` w/ `None` in BUILD.bootstrap. Doing so eliminates the remote_java_tools references in the toolchain definition.
- However, the bootstrapped Bazel binary itself then still injects a dependency upon a prebuilt distribution of java_tools via the embedded jdk.WORKSPACE. I am now trying to figure out how to build this myself without depending on `java_tools-v11.6.zip` and `java_tools_linux-v11.6.zip`. I was expecting to be able to use the bootstrapped Bazel binary to build //src:java_tools.zip and //src:java_tools_prebuilt.zip at the java_tools-v11.6 commit (40c9b756d7f8bac20801e2a54e3d83b2112c80c6).
- Would it make sense for the bootstrapped Bazel to (perhaps optionally) bundle its locally built toolchain artifacts and a toolchain definition such that a user could specify `--extra_toolchains=@bazel_tools//tools/jdk:bootstrap_toolchain_definition` in order to build java_tools? If this is the right path forward, I'd be happy to contribute a PR.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-dev/f0b996a4-756c-4ff7-ad1a-6f0c785e4d3dn%40googlegroups.com.
The java_tools is also built from the Bazel repo, where the bootstrapping toolchain exists. Maybe we can just use the bootstrap toolchain to build the java_tools without bundling it in Bazel?
foo_tools-1.0.0-dist.zip
w/ a separate derived
tree, custom build script(s), etc., right? (Would remote_coverage_tools/coverage_output_generator fall into this category?) With this in mind, I still wonder if, instead of replicating
the "bootstrap" release deliverables to each sub-project, there ought to be a self-contained "bootstrap" flavor of Bazel which is capable of building them from source.⚠ External Email
⚠ External Email: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender.