-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat!: optional strict parsing of matchspec and versionspec #552
Conversation
93f8666
to
dde5209
Compare
Looks good to me! I wonder if we should expose |
I used an enum because I expect that in the future we might possibly introduce more modes. |
## 🤖 New release * `rattler`: 0.19.0 -> 0.19.1 (✓ API compatible changes) * `rattler_conda_types`: 0.19.0 -> 0.20.0 (✓ API compatible changes) * `rattler_digest`: 0.19.0 -> 0.19.1 (✓ API compatible changes) * `rattler_macros`: 0.19.0 -> 0.19.1 * `rattler_package_streaming`: 0.19.0 -> 0.19.1 (✓ API compatible changes) * `rattler_networking`: 0.19.0 -> 0.19.1 (✓ API compatible changes) * `rattler_lock`: 0.19.0 -> 0.20.0 (⚠️ API breaking changes) * `rattler_repodata_gateway`: 0.19.0 -> 0.19.1 (✓ API compatible changes) * `rattler_solve`: 0.19.0 -> 0.20.0 (✓ API compatible changes) * `rattler_libsolv_c`: 0.19.0 -> 0.19.1 (✓ API compatible changes) * `rattler_virtual_packages`: 0.19.0 -> 0.19.1 (✓ API compatible changes) * `rattler_index`: 0.19.0 -> 0.19.1 (✓ API compatible changes) * `rattler_shell`: 0.19.0 -> 0.19.1 (✓ API compatible changes) ###⚠️ `rattler_lock` breaking changes ``` --- failure enum_variant_added: enum variant added on exhaustive enum --- Description: A publicly-visible enum without #[non_exhaustive] has a new variant. ref: https://doc.rust-lang.org/cargo/reference/semver.html#enum-variant-new impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.29.1/src/lints/enum_variant_added.ron Failed in: variant ParseCondaLockError:InvalidPypiPackageName in /tmp/.tmpLu7Njp/rattler/crates/rattler_lock/src/parse/mod.rs:37 ``` <details><summary><i><b>Changelog</b></i></summary><p> ## `rattler` <blockquote> ## [0.19.1](rattler-v0.19.0...rattler-v0.19.1) - 2024-03-06 ### Added - generalised CLI authentication ([#537](#537)) ### Fixed - removal of multiple packages that clobber each other ([#556](#556)) - dont use workspace dependencies for local crates ([#546](#546)) ### Other - every crate should have its own version ([#557](#557)) </blockquote> ## `rattler_conda_types` <blockquote> ## [0.20.0](rattler_conda_types-v0.19.0...rattler_conda_types-v0.20.0) - 2024-03-06 ### Added - [**breaking**] optional strict parsing of matchspec and versionspec ([#552](#552)) ### Fixed - patch unsupported glob operators ([#551](#551)) - dont use workspace dependencies for local crates ([#546](#546)) ### Other - every crate should have its own version ([#557](#557)) </blockquote> ## `rattler_digest` <blockquote> ## [0.19.1](rattler_digest-v0.19.0...rattler_digest-v0.19.1) - 2024-03-06 ### Other - every crate should have its own version ([#557](#557)) </blockquote> ## `rattler_macros` <blockquote> ## [0.19.1](rattler_macros-v0.19.0...rattler_macros-v0.19.1) - 2024-03-06 ### Other - every crate should have its own version ([#557](#557)) </blockquote> ## `rattler_package_streaming` <blockquote> ## [0.19.1](rattler_package_streaming-v0.19.0...rattler_package_streaming-v0.19.1) - 2024-03-06 ### Fixed - dont use workspace dependencies for local crates ([#546](#546)) ### Other - every crate should have its own version ([#557](#557)) </blockquote> ## `rattler_networking` <blockquote> ## [0.19.1](rattler_networking-v0.19.0...rattler_networking-v0.19.1) - 2024-03-06 ### Fixed - add snapshot test and use btreemap in file backend ([#543](#543)) ### Other - every crate should have its own version ([#557](#557)) </blockquote> ## `rattler_lock` <blockquote> ## [0.20.0](rattler_lock-v0.19.0...rattler_lock-v0.20.0) - 2024-03-06 ### Added - sort extras by name and urls by filename ([#540](#540)) ### Fixed - dont use workspace dependencies for local crates ([#546](#546)) ### Other - every crate should have its own version ([#557](#557)) - bump pep508_rs and pep440_rs ([#549](#549)) </blockquote> ## `rattler_repodata_gateway` <blockquote> ## [0.19.1](rattler_repodata_gateway-v0.19.0...rattler_repodata_gateway-v0.19.1) - 2024-03-06 ### Fixed - correct condition to downweigh track-feature packages ([#545](#545)) - dont use workspace dependencies for local crates ([#546](#546)) ### Other - every crate should have its own version ([#557](#557)) </blockquote> ## `rattler_solve` <blockquote> ## [0.20.0](rattler_solve-v0.19.0...rattler_solve-v0.20.0) - 2024-03-06 ### Added - [**breaking**] optional strict parsing of matchspec and versionspec ([#552](#552)) ### Fixed - removal of multiple packages that clobber each other ([#556](#556)) - correct condition to downweigh track-feature packages ([#545](#545)) - dont use workspace dependencies for local crates ([#546](#546)) ### Other - every crate should have its own version ([#557](#557)) </blockquote> ## `rattler_libsolv_c` <blockquote> ## [0.19.1](rattler_libsolv_c-v0.19.0...rattler_libsolv_c-v0.19.1) - 2024-03-06 ### Other - every crate should have its own version ([#557](#557)) </blockquote> ## `rattler_virtual_packages` <blockquote> ## [0.19.1](rattler_virtual_packages-v0.19.0...rattler_virtual_packages-v0.19.1) - 2024-03-06 ### Fixed - dont use workspace dependencies for local crates ([#546](#546)) ### Other - every crate should have its own version ([#557](#557)) </blockquote> ## `rattler_index` <blockquote> ## [0.19.1](rattler_index-v0.19.0...rattler_index-v0.19.1) - 2024-03-06 ### Fixed - dont use workspace dependencies for local crates ([#546](#546)) ### Other - every crate should have its own version ([#557](#557)) </blockquote> ## `rattler_shell` <blockquote> ## [0.19.1](rattler_shell-v0.19.0...rattler_shell-v0.19.1) - 2024-03-06 ### Fixed - dont use workspace dependencies for local crates ([#546](#546)) ### Other - every crate should have its own version ([#557](#557)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/). Signed-off-by: Bas <4995967+baszalmstra@users.noreply.github.com> Co-authored-by: Bas <4995967+baszalmstra@users.noreply.github.com>
Adds a mode to all
from_str
functions forMatchSpec
,NamelessMatchSpec
,VersionSpec
, andConstraint
.Strict mode disallows some ambigous syntax like:
>=1.*
should just be>=1
*.*
should just be*
All parsing functions accept a
ParseStrictness
that can either beStrict
orLenient
.Lenient
mode should be used when parsing repodata etc, butStrict
mode can be used to validate new user input.