Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Incorrect semantic versioning parsing for beta versions #147

Closed
msdrigg opened this issue Sep 29, 2021 · 6 comments
Closed

Incorrect semantic versioning parsing for beta versions #147

msdrigg opened this issue Sep 29, 2021 · 6 comments

Comments

@msdrigg
Copy link
Contributor

msdrigg commented Sep 29, 2021

Describe the bug
This crate incorrectly parses semantic versioning for beta versions. For example, it places 1.0.0-beta.2 as more recent than 1.0.0-beta.10

To Reproduce
Steps to reproduce the behavior:

  1. Create a Cargo.toml with the following dependency: tracing-actix-web = "0.4.0-beta.13"
  2. Open this file in vs-code
  3. Make sure to enable "List Pre Releases" in settings for this extension.
  4. Notice that the crates extension marks this dependency as out-of-date because there is a "newer" version 0.4.0-beta.9

Expected behavior
I would expect the version 1.0.0-beta.13 to be shown as more recent than 1.0.0-beta.9

https://semver.org defines how beta versions should be ranked under SemVer Specification 11.4:

Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0

Screenshots
image

Desktop (please complete the following information):

  • OS: Ubuntu
  • Version 0.5.9
@msdrigg
Copy link
Contributor Author

msdrigg commented Sep 29, 2021

Note, the config has loaded beta.13 version, but it places it below beta.9. See this screenshot:

image

serayuzgur added a commit that referenced this issue Oct 5, 2021
@msdrigg msdrigg closed this as completed Oct 5, 2021
@kotx
Copy link

kotx commented Oct 31, 2021

This doesn't seem to respect release candidate versions.
image

@msdrigg
Copy link
Contributor Author

msdrigg commented Oct 31, 2021

Did you check the box for 'List Pre Releases' in the extension settings?

@kotx
Copy link

kotx commented Oct 31, 2021

Did you check the box for 'List Pre Releases' in the extension settings?

That worked, thanks! Though, it's sort of strange that pre-release versions show up as an "x".

@msdrigg
Copy link
Contributor Author

msdrigg commented Oct 31, 2021

Yea I would agree it’s unexpected behavior. Maybe file an issue for it

@kotx
Copy link

kotx commented Oct 31, 2021

Opened #151

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants