Repository navigation
julia: own the Julia toolchain type and version flag so registering them does not fetch rules_julia - #14987
Merged
Conversation
TrapsterDK
force-pushed
the
lazy-julia-toolchain-type
branch
from
November 28, 2026 11:10
6dc3837 to
14b4edf
Compare
Collaborator
Author
|
/evidence platforms=["linux_x86_64"] task=test scope=//tools/testing/consumer:network_test |
Contributor
|
Evidence started on |
…hem does not fetch rules_julia rules_dx no longer registers @julia_toolchains//:all. @dx_toolchains//julia now declares the per-platform release toolchains next to the source-built one, typed by //julia:toolchain_type, gated by a rules_dx version flag, and pointing at the aliases periareon/rules_julia#54 adds to the hub. Patches make rules_julia's toolchain type and version flag aliases of ours.
TrapsterDK
force-pushed
the
lazy-julia-toolchain-type
branch
from
November 28, 2026 13:36
14b4edf to
edcfc55
Compare
This was referenced Nov 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every consumer fetched the rules_julia archive,
@julia_toolchainsandtoml.bzl, even without Julia targets.register_toolchains("@julia_toolchains//:all")needed the hub, so Bazel evaluated the rules_julia extension. The@dx_toolchains//juliasource toolchain named@rules_julia//julia:toolchain_typeand@rules_julia//julia/settings:version_<V>.Follows #14981 (.NET) and #14985 (Ruby).
//julia:toolchain_typeis a new rules_dx toolchain type.//julia/private/runtime:versionis a rules_dx-owned version flag (defaultJULIA_RUNTIME_VERSION), and:runtime_versionis theconfig_settingthe toolchains use.@dx_toolchains//julianow also declares the release toolchain of each platform (julia_stock_toolchain_targets), pointing at@julia_toolchains//:julia_<V>_<platform>_toolchain. MODULE.bazel no longer registers@julia_toolchains//:all.patches/rules_julia/toolchain_aliases.patchis Alias each toolchain's implementation in the toolchain hub periareon/rules_julia#54: the hub emits onealias()per toolchain.toolchain_type_alias.patchandversion_alias.patchmake@rules_julia//julia:toolchain_typeand@rules_julia//julia/settings:versionaliases of ours.--@rules_julia//julia/settings:version, rules_julia'sversion_<V>settings and its transitions still work. The flag no longer checks its value against the known versions, because that list lives in rules_julia.runtime/defs.bzlandtools/julia_tool.bzluse the rules_dx type and flag.julia_toolchain.toolchain(version = ...)is no longer registered automatically. A consumer that needs one registers@julia_toolchains//:allitself.rules_dx++dx_pins+rules_julia,rules_dx++julia_toolchain+julia_toolchainsandtoml.bzl+leave the go, java, java_check and rust cold-start lists.rules_juliais aFOREIGNfragment for go, java and rust.external_reposbudgets go down by three each (core 224, python 227 / 238). These numbers are predicted; CI measures them.api/labels.txtanddocs/supported-surface.mdlist the new type.Upstream: periareon/rules_julia#53 (issue), periareon/rules_julia#54 (PR). The type and flag alias patches stay rules_dx only, because both have to live outside the rules_julia repo for it to go unfetched.
No local build or test was run (builder cap). CI and
/evidenceon this PR do the verification.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xut2hvdpJxYihWhnWtH8yv