-
Notifications
You must be signed in to change notification settings - Fork 212
Broken links: platform-specific crate doc links to the same platform of a dependency even if it doesn't exist #2684
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
Comments
This would also work in this case, there is only 1 target in serde json, but it seems to be broken as well |
@GuillaumeGomez was there a change in how rustdoc search works here? |
just checked the code, we don't do this, but the search should work. |
Not that I know of. |
So, the old behaviour is restored now (#2690). Generally this touches to very old (and organically grown to the current state) code , needing some refactor. |
Thanks! Maybe when the refactoring phase comes, it could add using the default target before trying to resort to search because search loses type info, eg, in the example above, you wouldn't know that you clicked on "enum Value" unless you read the link, the search would show all "Value"s |
I remember rustdoc search also supports limiting the type you search for, we might just do that :) |
Nice, that would just leave the inconvenience of an extra click, though hopefully you'd only find a single item and then seach Then the only issue is whethe it's worth alerting the use somehow that the platform changed? |
Example: there is a
x86_64-apple-darwin
crate that references a dependency that is not platform-specific, those links would refer to thex86_64-apple-darwin
category of that dependency even if there is no such categorySource crate: https://docs.rs/osakit/latest/osakit/type.Value.html
Link to serde_json: (click on
Value
) https://docs.rs/serde_json/1.0.133/x86_64-apple-darwin/serde_json/value/enum.Value.htmlBut serde_json only has 1 platform, so the proper link would've been https://docs.rs/serde_json/1.0.133/serde_json/enum.Value.html
Think that in such cases maybe docs should redirect to whatever platform is the default for the dep crate?
mdevils/rust-osakit#1
The text was updated successfully, but these errors were encountered: