refactor(util): Pull out mod util_semver#12940
Conversation
This `mod` is a proposal for what a new package would look like. This needs to be split out so a future `util_manifest_schema` package can depend on it (rust-lang#12801). This doesn't address where `RustVersion` should live (along with `PackageIdSpec`). This builds on the work from rust-lang#12924 and rust-lang#12926
|
r? @ehuss (rustbot has picked a reviewer for you, use r? to override) |
| } | ||
|
|
||
| impl std::str::FromStr for PartialVersion { | ||
| type Err = anyhow::Error; |
There was a problem hiding this comment.
Not a blocker. Are we planning to use thiserror or custom error type instead of anyhow?
There was a problem hiding this comment.
Would be good to do at some point in this process.
| @@ -0,0 +1,195 @@ | |||
| use std::fmt::{self, Display}; | |||
There was a problem hiding this comment.
Why is OptVersionReq left out in the party? Because it is not a dependency of schema.rs?
There was a problem hiding this comment.
Not quite sure where it should live. It isn't just a simple semver extension like VersionExt or PartialVersion but is tightly coupled to specific parts of cargo, like RustVersion.
weihanglo
left a comment
There was a problem hiding this comment.
This looks fine. Let's not block on the progress and merge.
For where to put RustVersion and OptVersionReq, we can decide later.
|
@bors r+ |
|
☀️ Test successful - checks-actions |
Update cargo 12 commits in 7046d992f9f32ba209a8079f662ebccf9da8de25..6790a5127895debec95c24aefaeb18e059270df3 2023-11-08 03:24:57 +0000 to 2023-11-10 17:09:35 +0000 - refactor(source): Prepare for new PackageIDSpec syntax (rust-lang/cargo#12938) - credential: include license files in all published crates (rust-lang/cargo#12953) - fix: preserve jobserver file descriptors on rustc invocation in `fix_exec_rustc` (rust-lang/cargo#12951) - refactor(resolver): Consolidate logic in `VersionPreferences` (rust-lang/cargo#12930) - refactor(toml): Simplify code to make schema split easier (rust-lang/cargo#12948) - Filter `cargo-credential-*` dependencies by OS (rust-lang/cargo#12949) - refactor(util): Pull out `mod util_semver` (rust-lang/cargo#12940) - Fix the invalidate feature name message (rust-lang/cargo#12939) - refactor(util): Prepare for splitting out semver logic (rust-lang/cargo#12926) - feat: Make browser links out of HTML file paths (rust-lang/cargo#12889) - Do not allow empty feature name (rust-lang/cargo#12928) - fix(timings): unnecessary backslash when error happens (rust-lang/cargo#12934) r? ghost
Update cargo 12 commits in 7046d992f9f32ba209a8079f662ebccf9da8de25..6790a5127895debec95c24aefaeb18e059270df3 2023-11-08 03:24:57 +0000 to 2023-11-10 17:09:35 +0000 - refactor(source): Prepare for new PackageIDSpec syntax (rust-lang/cargo#12938) - credential: include license files in all published crates (rust-lang/cargo#12953) - fix: preserve jobserver file descriptors on rustc invocation in `fix_exec_rustc` (rust-lang/cargo#12951) - refactor(resolver): Consolidate logic in `VersionPreferences` (rust-lang/cargo#12930) - refactor(toml): Simplify code to make schema split easier (rust-lang/cargo#12948) - Filter `cargo-credential-*` dependencies by OS (rust-lang/cargo#12949) - refactor(util): Pull out `mod util_semver` (rust-lang/cargo#12940) - Fix the invalidate feature name message (rust-lang/cargo#12939) - refactor(util): Prepare for splitting out semver logic (rust-lang/cargo#12926) - feat: Make browser links out of HTML file paths (rust-lang/cargo#12889) - Do not allow empty feature name (rust-lang/cargo#12928) - fix(timings): unnecessary backslash when error happens (rust-lang/cargo#12934) r? ghost
What does this PR try to resolve?
This
modis a proposal for what a new package would look like. This needs to be split out so a futureutil_manifest_schemapackage can depend on it (#12801).This doesn't address where
RustVersionshould live (along withPackageIdSpec).How should we test and review this PR?
Additional information
This builds on the work from #12924 and #12926