robinst / linkify

Rust library to find links such as URLs and email addresses in plain text, handling surrounding punctuation correctly
https://robinst.github.io/linkify/
Apache License 2.0
206 stars 12 forks source link

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

Closed robinst closed 2 years ago

robinst commented 2 years ago

Some newer versions of transitive dev-dependencies don't work with the minimum supported Rust version (1.46.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 https://github.com/matklad/once_cell/issues/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.