taiki-e / cargo-hack

Cargo subcommand to provide various options useful for testing and continuous integration.
Apache License 2.0
628 stars 28 forks source link

fix: Select MSRV based on selected packages #211

Closed epage closed 1 year ago

epage commented 1 year ago

Currently, cargo-hack calculates the MSRV based on all packages and if they disagree, it errors. While we want to make the MSRV calculation to be per-package, this is an intermediate step wards that by at least making it so cargo-hack won't error if the selected set of packages agree on an MSRV.

To allow the selected packages to be used in the expansion of a range into versions, the range expansion code was pulled out of the Context.

For testing this, I made the rust-version fixture have multiple versions and the tests show that this works while also failing in some cases. The failure is not in a _failure test because the intention is to get that case working in a follow up PR.