crate_universe: move build-script dep to extra_deps#4090
Open
ashi009 wants to merge 1 commit into
Open
Conversation
ashi009
force-pushed
the
fix-self-buildscript-member-alias
branch
2 times, most recently
from
June 23, 2026 05:23
6bd7223 to
6375a24
Compare
ashi009
force-pushed
the
fix-self-buildscript-member-alias
branch
4 times, most recently
from
June 23, 2026 07:15
b249c70 to
a26ab8f
Compare
ashi009
marked this pull request as draft
June 23, 2026 07:15
ashi009
force-pushed
the
fix-self-buildscript-member-alias
branch
2 times, most recently
from
June 23, 2026 07:52
2130c41 to
4de1b19
Compare
ashi009
force-pushed
the
fix-self-buildscript-member-alias
branch
from
June 23, 2026 07:54
4de1b19 to
bb334f7
Compare
ashi009
marked this pull request as ready for review
June 23, 2026 08:03
ashi009
force-pushed
the
fix-self-buildscript-member-alias
branch
from
June 23, 2026 08:49
bb334f7 to
8409390
Compare
A crate with a build script depends on its own `build_script_build` target. That edge was stored in `common_attrs.deps`, which `Context::workspace_member_deps()` collects to emit crate-hub aliases — so a library crate with a build script got a dead crate-hub alias for itself. Move it to `common_attrs.extra_deps`, which `workspace_member_deps()` does not read, so the self-reference no longer yields an alias. `extra_deps` holds resolved labels, so the edge becomes a relative `:build_script_build` (same target, same package). Fixes bazelbuild#4089.
ashi009
force-pushed
the
fix-self-buildscript-member-alias
branch
from
June 23, 2026 08:52
8409390 to
c6b4a30
Compare
Contributor
|
FWIW this was fixed a while ago in https://github.com/hermeticbuild/rules_rs :) |
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.
Fixes #4089.
A crate with a build script depends on its own
build_script_buildtarget. That edge was stored incommon_attrs.deps, whichContext::workspace_member_deps()collects to emit crate-hub aliases — so a library crate with a build script got a dead crate-hub alias for itself.Store the edge in
common_attrs.extra_depsinstead:workspace_member_deps()does not readextra_deps, so the self-reference no longer yields an alias. (extra_depsholds resolved labels, so the edge becomes a relative:build_script_build— same target, same package.)