Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[guppy] fix issue with dep matching #148

Merged
merged 2 commits into from
Nov 11, 2023

Conversation

sunshowers
Copy link
Member

@sunshowers sunshowers commented Nov 9, 2023

Make this somewhat less of a hack than it used to be, with the dep_kinds support introduced in Rust 1.41.

@sunshowers sunshowers force-pushed the push-rrwxxrovyltq branch 4 times, most recently from 2e4751f to 9b83ef1 Compare November 11, 2023 04:07
@sunshowers sunshowers changed the title [wip] attempt to fix issue with dep matching [guppy] fix issue with dep matching Nov 11, 2023
We used to use a heuristic matching algorithm which would check a renamed map
first, then check an original map. We know that that was failing to work in a
few cases, and we encountered one such case in the wild in
nextest-rs/nextest#1090.

Fix that through a few different things:

1. Match up the resolved name correctly, using the same algorithm Cargo uses.
2. Use the `dep_kinds` list introduced in Rust 1.41 (see
   rust-lang/cargo#5583).
These metadata instances are generated with a newer version of Rust, which
pulls in `dep_kinds` in the resolve map. That makes matching up requirements
more reliable.
@sunshowers sunshowers merged commit 3802662 into guppy-rs:main Nov 11, 2023
18 checks passed
@sunshowers sunshowers deleted the push-rrwxxrovyltq branch November 11, 2023 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant