Skip to content

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

Merged
rami3l merged 3 commits intorust-lang:masterfrom
rami3l:fix/partial-version-starts-with-digit
Jun 20, 2024
Merged

fix(dist): throw an error when a PartialVersion string doesn't start with an ASCII digit#3895
rami3l merged 3 commits intorust-lang:masterfrom
rami3l:fix/partial-version-starts-with-digit

Conversation

@rami3l
Copy link
Copy Markdown
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 :)

Comment thread src/dist/mod.rs
Comment thread src/dist/mod.rs
@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