refactor: Pull out cargo-add MSRV code for reuse#12553
Merged
bors merged 3 commits intorust-lang:masterfrom Aug 25, 2023
Merged
refactor: Pull out cargo-add MSRV code for reuse#12553bors merged 3 commits intorust-lang:masterfrom
bors merged 3 commits intorust-lang:masterfrom
Conversation
By using the `PartialVersion` type with serde, we get the context for the error automatically.
Collaborator
|
r? @ehuss (rustbot has picked a reviewer for you, use r? to override) |
Since we have tests for a couple of cases, I figured we could improve the error messages for them.
weihanglo
reviewed
Aug 25, 2023
36cf9cd to
1701b4e
Compare
weihanglo
approved these changes
Aug 25, 2023
Member
|
Thanks! @bors r+ |
Contributor
Contributor
Contributor
|
☀️ Test successful - checks-actions |
This was referenced Aug 25, 2023
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 26, 2023
Update cargo 13 commits in 2cc50bc0b63ad20da193e002ba11d391af0104b7..925280f028db3a322935e040719a0754703947cf 2023-08-22 22:43:08 +0000 to 2023-08-25 21:16:44 +0000 - string leek is stable (rust-lang/cargo#12559) - refactor: Pull out cargo-add MSRV code for reuse (rust-lang/cargo#12553) - Contrib: Add process for security responses. (rust-lang/cargo#12487) - Support dependencies from registries for artifact dependencies, take 2 (rust-lang/cargo#12421) - fix(toml): Improve parse errors (rust-lang/cargo#12556) - Create dedicated unstable flag for asymmetric-token (rust-lang/cargo#12551) - chore(deps): update latest msrv to v1.72.0 (rust-lang/cargo#12549) - changelog: add link to CVE-2023-40030 (rust-lang/cargo#12550) - refactor(install): Move value parsing to clap (rust-lang/cargo#12547) - fix: Set MSRV for internal packages (rust-lang/cargo#12381) - doc: fix two links to tracing docs (rust-lang/cargo#12537) - use AND search when having multiple terms (rust-lang/cargo#12548) - fix(log): Use a more compact relative-time format (rust-lang/cargo#12542) r? ghost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR try to resolve?
#12078 added MSRV code in
cargo add. Our assumption when writing it is that we'd need to generalize the code before reusing it in other places, likecargo install. This PR focused purely on that refactor because I'm hopeful it will be useful for other work I'm doing. Despite not having a user for this yet, I think thecargo installcase is inevitable and I feel this does a bit to clean up MSRV related code by using a more specific type everywhere.How should we test and review this PR?
Each commit gradually progresses things along