fix: derive all toolchain repo names from a single base name - #74
Open
sallustfire wants to merge 1 commit into
Open
fix: derive all toolchain repo names from a single base name#74sallustfire wants to merge 1 commit into
sallustfire wants to merge 1 commit into
Conversation
|
jq_host_alias_repo(name = "jq") builds its symlink using rctx.attr.name,
producing ../jq_{platform}/jq. But the extension created platform repos
with prefix "jq_toolchains", so the actual sibling was
jq_toolchains_{platform} — a dangling symlink.
Introduce a local `name` variable in the extension and derive all repo
names from it, so the platform repo prefix, the toolchains repo
user_repository_name, and the host alias name are always consistent.
sallustfire
force-pushed
the
fix/jq-host-alias-dangling-symlink
branch
from
March 13, 2026 03:16
00e3a2c to
56f48f2
Compare
Author
|
@alexeagle Any chance you or someone else can look at what's hopefully an innocuous bugfix or at least make sure it doesn't get lost in the rennovate backlog? |
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.

When jq.bzl is consumed as a standalone bazel_dep,
use_repo(toolchains, "jq")produces a@jqrepo with a dangling symlink.The _toolchains_extension creates platform repos with prefix jq_toolchains (e.g. jq_toolchains_linux_amd64), but jq_host_alias_repo(name = "jq") constructs its symlink using rctx.attr.name, targeting ../jq_linux_amd64/jq which doesn't exist.
This is masked when jq.bzl is consumed through aspect_bazel_lib, which creates platform repos with the jq prefix.
The fix introduces a single local variable in the extension from which all repo names are derived, so the platform repo prefix, the user_repository_name passed to jq_toolchains_repo, and the host alias name are always consistent.
Changes are visible to end-users: yes
Test plan
@jqhost alias repo via use_repo(toolchains, "jq"), verifying the symlink resolves and the binary executes