-
Notifications
You must be signed in to change notification settings - Fork 15
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
Download GraalVM distributions lazily #66
Comments
@fmeum With regard to Java toolchains, I believe two repos are already configured -- the repo structure looks like: flowchart TD
A(graalvm) -->|Alias| B(graalvm_toolchain_config_repo)
B-->C[Java toolchain]
A-->|toolchain target|D[GVM toolchain]
toolchain(
name = "toolchain_gvm",
toolchain_type = "//graalvm/toolchain:toolchain",
exec_compatible_with = [],
target_compatible_with = [],
toolchain = "@_main~graalvm~graalvm//:gvm",
) graalvm_sdk(
name = "gvm",
native_image_bin = "@_main~graalvm~graalvm//:native-image",
gvm_files = "@_main~graalvm~graalvm//:files",
) So, is the above correct with regard to the Java toolchain, or are you referring to the GVM toolchain used to resolve |
Yes, I was specifically referring to the toolchain for |
@fmeum understood, sorry, I was only clarifying because I was wondering if this pattern I saw with Java Toolchains was one and the same with what you're talking about. I should be able to have this change in quickly. |
- fix: add `gvm` toolchain to toolchain config repo - fix: add aliases from `graalvm` → toolchain targets - fix: adjust instructions for registering toolchains - fix: adjust workspace toolchain registration logic Breaking change: When registering toolchains in a Bzlmod installation of these rules, the target `@graalvm//:all` must be changed to two toolchain registrations, based on the desired functionality: Register the Java toolchain: register_toolchains("@graalvm//:jvm") Register the GVM toolchain: register_toolchains("@graalvm//:sdk") Fixes and closes #66. Relates-To: #66 Signed-off-by: Sam Gammon <[email protected]>
- fix: add `gvm` toolchain to toolchain config repo - fix: add aliases from `graalvm` → toolchain targets - fix: adjust instructions for registering toolchains - fix: adjust workspace toolchain registration logic Breaking change: When registering toolchains in a Bzlmod installation of these rules, the target `@graalvm//:all` must be changed to two toolchain registrations, based on the desired functionality: Register the Java toolchain: register_toolchains("@graalvm//:jvm") Register the GVM toolchain: register_toolchains("@graalvm//:sdk") Fixes and closes #66. Relates-To: #66 Signed-off-by: Sam Gammon <[email protected]>
- fix: add `gvm` toolchain to toolchain config repo - fix: add aliases from `graalvm` → toolchain targets - fix: adjust instructions for registering toolchains - fix: adjust workspace toolchain registration logic Breaking change: When registering toolchains in a Bzlmod installation of these rules, the target `@graalvm//:all` must be changed to two toolchain registrations, based on the desired functionality: Register the Java toolchain: register_toolchains("@graalvm//:jvm") Register the GVM toolchain: register_toolchains("@graalvm//:sdk") Fixes and closes #66. Relates-To: #66 Signed-off-by: Sam Gammon <[email protected]>
- fix: add `gvm` toolchain to toolchain config repo - fix: add aliases from `graalvm` → toolchain targets - fix: adjust instructions for registering toolchains - fix: adjust workspace toolchain registration logic Breaking change: When registering toolchains in a Bzlmod installation of these rules, the target `@graalvm//:all` must be changed to two toolchain registrations, based on the desired functionality: Register the Java toolchain: register_toolchains("@graalvm//:jvm") Register the GVM toolchain: register_toolchains("@graalvm//:sdk") Fixes and closes #66. Relates-To: #66 Signed-off-by: Sam Gammon <[email protected]>
- fix: add `gvm` toolchain to toolchain config repo - fix: add aliases from `graalvm` → toolchain targets - fix: adjust instructions for registering toolchains - fix: adjust workspace toolchain registration logic Breaking change: When registering toolchains in a Bzlmod installation of these rules, the target `@graalvm//:all` must be changed to two toolchain registrations, based on the desired functionality: Register the Java toolchain: register_toolchains("@graalvm//:jvm") Register the GVM toolchain: register_toolchains("@graalvm//:sdk") Fixes and closes #66. Relates-To: #66 Signed-off-by: Sam Gammon <[email protected]>
- fix: add `gvm` toolchain to toolchain config repo - fix: add aliases from `graalvm` → toolchain targets - fix: adjust instructions for registering toolchains - fix: adjust workspace toolchain registration logic Breaking change: When registering toolchains in a Bzlmod installation of these rules, the target `@graalvm//:all` must be changed to two toolchain registrations, based on the desired functionality: Register the Java toolchain: register_toolchains("@graalvm//:jvm") Register the GVM toolchain: register_toolchains("@graalvm//:sdk") Fixes and closes #66. Relates-To: #66 Signed-off-by: Sam Gammon <[email protected]>
Bazel only fetches repositories when they are actually needed during the build. By moving the
toolchain
definitions into a separate repo from the actual files comprising the toolchains, this can be used to prevent fetches of large toolchains (such as GraalVM distributions) when not used for a particular build (because the toolchain is never selected).It would be great if rules_graalvm could support this, potentially by splitting
rules_graalvm/internal/graalvm_bindist.bzl
Lines 462 to 552 in 43adbdc
into two separate repository rules that are instantiated by a macro.
Context: I am trying to add rules_graalvm to Bazel's remote java tools, but currently this would require anyone who builds Bazel (or really any target in the repo) to also download GraalVM.
The text was updated successfully, but these errors were encountered: