Skip to content

Conversation

syphar
Copy link
Member

@syphar syphar commented Oct 9, 2025

So, I think this is the fix for #2922.

Initially thought this has to be an issue with our search-fallback logic (web::rustdoc::path_for_version).

But then I found our that the version redirect links are generated wrong.

We have this page in the issue: https://docs.rs/toml/0.5.11/src/toml/de.rs.html. The expected version-links in the topbar should be https://docs.rs/crate/toml/0.9.6/target-redirect/x86_64-unknown-linux-gnu/src/toml/de.rs.html, but they are https://docs.rs/crate/toml/0.9.6/target-redirect/x86_64-unknown-linux-gnu/toml/toml/de.rs.html.

See the difference?

Generally this seems to be a regression from one of #2355, #2113 or something else.

Looking deeper I found an oddness, but not yet how that happened to me:

There is only one place where the /menus/releases/ partial is loaded, which is the topbar. And there it's only loaded when we have docs. So, if I'm not missing something, there is no place where the partial is loaded without target or without inner-path. So IMO quite a bit of the complexity in get_all_releases can be removed.

The changed tests are for things I believe that also can't happen in prod.

Or am I missing something?

@syphar syphar requested a review from a team as a code owner October 9, 2025 20:23
@github-actions github-actions bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Oct 9, 2025
@syphar syphar force-pushed the wrong-version-dropdown branch 2 times, most recently from 91063ca to 0188537 Compare October 9, 2025 20:26
@syphar syphar changed the title regression fix wrong target-redifect links in topbar release list partial Oct 9, 2025
@syphar syphar self-assigned this Oct 9, 2025
@syphar syphar force-pushed the wrong-version-dropdown branch from 0188537 to e494409 Compare October 9, 2025 20:27
@GuillaumeGomez
Copy link
Member

Seems good to me.

@syphar syphar force-pushed the wrong-version-dropdown branch from e494409 to 8906853 Compare October 9, 2025 20:33
@syphar
Copy link
Member Author

syphar commented Oct 9, 2025

Seems good to me.

I hope so :)

if not, we know what to revert :)

@syphar syphar merged commit e5fe3cb into rust-lang:master Oct 9, 2025
6 of 7 checks passed
@github-actions github-actions bot added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Oct 9, 2025
@syphar syphar deleted the wrong-version-dropdown branch October 9, 2025 20:36
@github-actions github-actions bot mentioned this pull request Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants