cargo icon indicating copy to clipboard operation
cargo copied to clipboard

Don't squash path dependencies with same package name

Open ldm0 opened this issue 1 year ago • 3 comments
trafficstars

Fixes #13862

Dependencies with same package name in the Cargo.lock was squashed in EncodableResolve::into_resolve().

e.g. In the problem reproduction repo's Cargo.lock, there are two entries:

[[package]]
name = "once_cell"
version = "0.1.0"

[[package]]
name = "once_cell"
version = "1.19.0"

However, they were squashed in build_path_deps(), then we endup getting two package ids with same path like this:

PackageId { name: "once_cell", version: "0.1.0", source: "pwd/vendor/once_cell_1_19" }
PackageId { name: "once_cell", version: "1.19.0", source: "pwd/vendor/once_cell_1_19" }

This package version inconsistency triggers patch update introduced in https://github.com/rust-lang/cargo/pull/8248 everytime you compile this crate.

ldm0 avatar May 04 '24 23:05 ldm0

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @weihanglo (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

rustbot avatar May 04 '24 23:05 rustbot

Note: I just did a quick scan of the issue (and commit structure). I've not looked at the test or code change in detail yet

epage avatar May 06 '24 04:05 epage

It seems that CI failure is caused by check-cfg https://github.com/rust-lang/cargo/actions/runs/8964218728/job/24615675343?pr=13863 Related: https://github.com/rust-lang/cargo/pull/13571

ldm0 avatar May 06 '24 06:05 ldm0

ping @weihanglo

ldm0 avatar May 18 '24 18:05 ldm0

:umbrella: The latest upstream changes (presumably #13931) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar May 18 '24 22:05 bors

Sorry for the late reply. Thought epage was on it. Feel free to open a new one whenever ready.

weihanglo avatar May 19 '24 12:05 weihanglo