Skip to content
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

x/website/internal/dl: version sorting doesn't sort pre-release versions #47367

Open
nd opened this issue Jul 24, 2021 · 1 comment
Open

x/website/internal/dl: version sorting doesn't sort pre-release versions #47367

nd opened this issue Jul 24, 2021 · 1 comment
Labels
Milestone

Comments

@nd
Copy link
Contributor

@nd nd commented Jul 24, 2021

What did you do?

Ran curl "https://golang.org/dl/?mode=json&include=all" in console

What did you expect to see?

go1.17rc1 before go1.17beta1

What did you see instead?

go1.17rc1 after go1.17beta1

nd added a commit to nd/delve that referenced this issue Jul 24, 2021
@dmitshur dmitshur changed the title dl: site returns rc versions after beta x/website/internal/dl: API lists rc versions after beta Jul 24, 2021
@gopherbot gopherbot added this to the Unreleased milestone Jul 24, 2021
@dmitshur dmitshur changed the title x/website/internal/dl: API lists rc versions after beta x/website/internal/dl: version sorting doesn't sort pre-release versions Jul 24, 2021
@dmitshur
Copy link
Contributor

@dmitshur dmitshur commented Jul 24, 2021

Thanks for the report.

The dl package implements fileOrder sorting, and versionLess is used to compare two versions. When both are pre-release versions with same major, minor components, the pre-release part of the version isn't being sorted.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants