-
Notifications
You must be signed in to change notification settings - Fork 220
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
[release-0.13.x] chore(Cargo.toml): Better document direct deps #495
Conversation
More infoMy verbosity is an issue for some, I've split this off and tried to condense / organize it. It's purely for reference to support and document the changes in the PR should anyone need more context. Producing a compatible
|
@@ -10,6 +10,7 @@ authors = ["Ryan Leckey <[email protected]>"] | |||
categories = ["config"] | |||
license = "MIT/Apache-2.0" | |||
edition = "2018" | |||
rust-version = "1.56.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As noted by #483 (comment)
- This should only reflect what the project can build successfully with (even if that requires managing a
Cargo.lock
with some pinning). - It should only be raised in future for explicit changes to the project (not from implicit changes from deps semver raising MSRV):
- Adding/Upgrading deps in
Cargo.toml
where pinning cannot maintain support forrust-version
. - Introducing changes that require features from newer toolchains.
- Adding/Upgrading deps in
When it comes to actual support / maintenance the MSRV policy of the project may differ. Raising rust-version
is a more granular edition
field, but with support to opt-out / ignore it by downstream.
This comment was marked as resolved.
This comment was marked as resolved.
- Slight adjustments to the version fields for compatibility with `cargo +nightly update -Z direct-minimal-versions` for MSRV `1.56.0` - Add `rust-version` field for leveraging `cargo +nightly update -Z msrv-policy` to generate a lockfile that respects the MSRV, and the benefit of downstreams. - Communicate why `dev-dependencies` are required (examples / tests). - Avoid repeating deps in `dev-dependencies`. - Raise fixed `warp` dev dep to a MSRV compatible version with common `tokio-util` implicit dep. Simplifies CI lock maintenance. Signed-off-by: Brennan Kinney <[email protected]>
b8cee00
to
519f488
Compare
- Reduces multi-versioned deps - Now compatible with Rust 1.56.1 Lock file was created with: ```bash cargo +nightly update -Z msrv-policy cargo update --package memchr --precise 2.5.0 cargo update --package ordered-multimap --precise 0.4.0 cargo update --package tokio-util --precise 0.7.8 ``` Signed-off-by: Brennan Kinney <[email protected]>
- Previously raised to `1.59.0` for CI to pass. - With an MSRV lock file committed this is no longer necessary. Signed-off-by: Brennan Kinney <[email protected]>
Full reproduction environment to verify generated lockfile: Rebased onto #496 as requested. CI passes 👍 I've additionally:
All tests pass again 👍 Awaiting approval from either @ijackson or @matthiasbeyer |
Thanks, excellent work. It's great that we now have a non-awful method for generating a working lockfile. I have reviewed the changes and verified the lockfile creation. The MSRV reduction is also nice. Please do merge this. |
I am on vacation until late tomorrow. I hope I can get to having a look on my rather long backlog for this repository after tomorrow! Please do bug me if I don't! |
These are improvements from an extensive investigation I recently did to simplify maintenance of lockfile generation for the CI to benefit from, while respecting the MSRV.
Cargo.lock
#492Commit message:
Click to view
cargo +nightly update -Z direct-minimal-versions
with the MSRV of1.56.0
.rust-version
field for leveragingcargo +nightly update -Z msrv-policy
to generate a lockfile that respects the MSRV, and the benefit of downstreams.dev-dependencies
are required (identify associated examples / tests).dev-dependencies
.warp
dev dep to an MSRV compatible version (for a commontokio-util
implicit dep version). Simplifies CI lock maintenance.