Skip to content

fix(dist): throw an error when a PartialVersion string doesn't start with an ASCII digit #3895

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

Merged
merged 3 commits into from
Jun 20, 2024

Conversation

rami3l
Copy link
Member

@rami3l rami3l commented Jun 20, 2024

Continuation of #3892.

There is a logical bug in the previous implementation of PartialVersion::from_str: the parser will happily accept inputs like ^1.0 exactly because it was intended to be used that way (to parse version comparators instead of partial versions), it's just that it happens to have no effect thanks to where it's called in the current codebase. I think fixing it will make me feel safer :)

@rami3l rami3l force-pushed the fix/partial-version-starts-with-digit branch 2 times, most recently from fac4782 to 00bb133 Compare June 20, 2024 10:15
@rami3l rami3l requested a review from djc June 20, 2024 10:19
@rami3l rami3l force-pushed the fix/partial-version-starts-with-digit branch from 00bb133 to 3e476d2 Compare June 20, 2024 13:22
@rami3l rami3l enabled auto-merge June 20, 2024 13:23
@rami3l rami3l disabled auto-merge June 20, 2024 13:26
@rami3l rami3l force-pushed the fix/partial-version-starts-with-digit branch from 3e476d2 to 08a0cc2 Compare June 20, 2024 13:31
@rami3l rami3l enabled auto-merge June 20, 2024 13:31
@rami3l rami3l added this pull request to the merge queue Jun 20, 2024
Merged via the queue into rust-lang:master with commit 4c3ff9c Jun 20, 2024
@rami3l rami3l deleted the fix/partial-version-starts-with-digit branch June 20, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants