Fix dep of artifact dep same deactivated target - #1
Draft
elchukc wants to merge 17 commits into
Draft
Conversation
refactor(rustfix): minor refactors
refactor: use `Iterator::is_sorted`
docs(ci): Don't constrainty latest_deps job by MSRV Missed this in rust-lang#14639
elchukc
force-pushed
the
fix_dep_of_artifact_dep_same_deactivated_target
branch
from
October 21, 2024 16:10
266b04c to
5d044a6
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.
What does this PR try to resolve?
Fixes
cargo tree -Z bindepspanic in 10593 (comment).Essentially,
no entry found for keyhappens because artifact deps for deactivated platforms are not properly filtered out when adding a package to the graph. Adding--target alltocargo tree -Z bindepsmakes this bug go away.As I understand, expected behaviour is to treat artifact deps like any other dep and only include ones targeting the host platform unless specified in
--target <triple>.i.e. if
baris the artifact dep, we expectcargo tree -Z bindepsto output:While
cargo tree -Z bindeps --target alloutputs:How should we test and review this PR?
Test case changed in this PR is sufficient.
Additional information
This bugfix is separate from implementing the design changes in issue this [comment], which is still WIP.