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

Use Cargo.lock for testing against MSRV instead of pinning #102

Merged
merged 1 commit into from Sep 30, 2022

Conversation

robinst
Copy link
Contributor

@robinst robinst commented Sep 30, 2022

Some newer versions of transitive dev-dependencies don't work with the minimum supported Rust version (1.42.0), so I used to pin them in Cargo.toml whenever the MSRV build would break (tedious work). The disadvantage of that is that older versions of those deps are used even on newer Rust versions.

The latest breakage is matklad/once_cell#201, but instead of pinning that to an older version too, this instead introduces a Cargo.lock file that is only used for the MSRV build.

So newer Rust versions will continue to test against latest dependencies, while the MSRV build should continue to work with the older versions. One disadvantage with this is that consumers will need to figure out their own Cargo.lock with precise versions that work with older Rust versions, but that is expected to be a small number - especially because in this case they are all dev-dependencies anyway.

Some newer versions of transitive dev-dependencies don't work with the
minimum supported Rust version (1.42.0), so I used to pin them in
`Cargo.toml` whenever the MSRV build would break (tedious work). The
disadvantage of that is that older versions of those deps are used even
on newer Rust versions.

The latest breakage is matklad/once_cell#201,
but instead of pinning that to an older version too, this instead
introduces a `Cargo.lock` file that is only used for the MSRV build.

So newer Rust versions will continue to test against latest
dependencies, while the MSRV build should continue to work with the
older versions. One disadvantage with this is that consumers will need
to figure out their own `Cargo.lock` with precise versions that work
with older Rust versions, but that is expected to be a small number -
especially because in this case they are all dev-dependencies anyway.
@robinst robinst merged commit f594a9b into main Sep 30, 2022
@robinst robinst deleted the msrv-cargo-lock branch September 30, 2022 13:22
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.

None yet

1 participant