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

Search page shows latest chronological version, not latest semver #708

Closed
repnop opened this issue Apr 10, 2020 · 5 comments
Closed

Search page shows latest chronological version, not latest semver #708

repnop opened this issue Apr 10, 2020 · 5 comments
Labels
A-backend Area: Webserver backend A-crate-search Area: A problem or feature request for searching crates C-enhancement Category: This is a new feature P-low Low priority issues S-needs-design Status: There's a problem here, but no obvious solution; or the solution raises other questions

Comments

@repnop
Copy link
Contributor

repnop commented Apr 10, 2020

As of the creation of this issue (2020-04-10) the search page for string-interner looks like this:

image

and directs you to the page for version 0.6.4. However, the latest version of string-interner is 0.7.1, which is detected and displays the warning banner at the top to redirect you to 0.7.1.

Perhaps this is caused by the... very awkward release dates? Somehow the latest release from a semver point of view is 0.7.1 but date-wise its actually 0.6.4

From crates.io:

Versions

    0.7.1 Sep 1, 2019
    0.7.0 Aug 7, 2018 yanked
    0.6.4 Sep 3, 2019
    0.6.3 Sep 19, 2017 yanked
    0.6.2 Aug 13, 2017 yanked
@jyn514
Copy link
Member

jyn514 commented Apr 10, 2020

Perhaps this is caused by the... very awkward release dates? Somehow the latest release from a semver point of view is 0.7.1 but date-wise its actually 0.6.4

Yes, that sounds like the cause. I don't see a great way to fix this since currently searches are done using SQL only. We could normalize the search results to the latest sem-ver version after already picking a crate to show, but I'm a little hesitant to do that without a long-term plan for improving search results.

@jyn514 jyn514 changed the title Search page shows outdated version for crate Search page shows latest chronological version, not latest semver Apr 11, 2020
@jyn514 jyn514 added the A-crate-search Area: A problem or feature request for searching crates label Apr 19, 2020
@jyn514 jyn514 added A-backend Area: Webserver backend C-enhancement Category: This is a new feature P-low Low priority issues S-needs-design Status: There's a problem here, but no obvious solution; or the solution raises other questions labels Jul 14, 2020
@syphar
Copy link
Member

syphar commented Oct 29, 2021

small addition, coming from #1521 :

for performance reasons we already have the latest version denormalized into crates.latest_version_id.

This column should not contain the latest build, but the highest non-yanked version with docs (edit: I remembered that we also show latest versions without docs)

so clicking on a crate in the release-views always brings you to a view without go to latest version link

@jyn514
Copy link
Member

jyn514 commented Nov 13, 2021

I think this may have been fixed by #1521, but I don't have an easy way to check.

@syphar
Copy link
Member

syphar commented Nov 13, 2021

I think this may have been fixed by #1521, but I don't have an easy way to check.

not really, in #1521 we still order by release-time for the version. #1546 will fix it correctly IMHO

@syphar
Copy link
Member

syphar commented Nov 30, 2021

Fixed with #1546 and #1567

@syphar syphar closed this as completed Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend Area: Webserver backend A-crate-search Area: A problem or feature request for searching crates C-enhancement Category: This is a new feature P-low Low priority issues S-needs-design Status: There's a problem here, but no obvious solution; or the solution raises other questions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants