crate_universe: move build-script dep to extra_deps#4090
Open
ashi009 wants to merge 1 commit into
Open
Conversation
6bd7223 to
6375a24
Compare
b249c70 to
a26ab8f
Compare
2130c41 to
4de1b19
Compare
4de1b19 to
bb334f7
Compare
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.
8409390 to
c6b4a30
Compare
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.)