-
Notifications
You must be signed in to change notification settings - Fork 198
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
The left sidebar doesn't show all the functions when using the "latest" url #1590
Comments
Seems to be a caching issue, https://docs.rs/contour_tracing/1.0.8/contour_tracing/sidebar-items.js has last-modified cc @jsha, what is the caching behavior meant to be around sub-resources of |
Actually.... why does this not have the resource suffix added onto it? Even the |
I can imagine it's cached separately below the separate paths, so the reason is probably in the missing suffix? |
@Nemo157 @GuillaumeGomez could this be a rustdoc issue? That surfaced because we serve different versions under the same URL, while statics are always cached forever? |
It's because of |
@GuillaumeGomez thinking about rust-lang/rust#92742 and this issue: I will have to think it through again, but currently I believe:
Or am I missing something? cc @jsha |
If a crate with two different versions is built with the same compiler version, then it'll be the same issue. However, I think it'd be the same issue with EDIT: I see there is the date followed by the compiler version. Maybe we should include the time too? |
Yep, would also be an issue for other release-assets.
Wouldn't really help. To my knowledge we don't update the compiler every night, but it's only updated on deploy |
Actually, I had in mind something like this:
I think it would fix this issue but the question is: would it break something? |
ah ok. My thoughts were similar, but I wanted to add create-name and version. Though this would break on rebuilds ... I need to think it through later. |
This category of problem is supposed to be solved by enum SharedResource<'a> {
/// This file will never change, no matter what toolchain is used to build it.
///
/// It does not have a resource suffix.
Unversioned { name: &'static str },
/// This file may change depending on the toolchain.
///
/// It has a resource suffix.
ToolchainSpecific { basename: &'static str },
/// This file may change for any crate within a build, or based on the CLI arguments.
///
/// This differs from normal invocation-specific files because it has a resource suffix.
InvocationSpecific { basename: &'a str },
} In this case I think sidebar-items.js should be InvocationSpecific. However, sidebar-items.js is not generated as a SharedResource in write_shared.rs. It is generated in render/context.rs by directly writing to a file. I think we need to change it to an InvocationSpecific item. |
It seems like all invocation-specific files need an additional suffix identifying this invocation, either provided on the command line along with the toolchain-suffix, or auto-generated by rustdoc. |
Right now the invocation-specific file format appears to be:
What does that last part ( |
rustdoc commit hash I think. |
Exactly this. But without changing the suffix for toolchain specific files, otherwise these won't be cached across releases any more.
|
…ar-items, r=notriddle Add missing suffix for sidebar-items script path Fixes rust-lang/docs.rs#1590. r? `@syphar`
…ar-items, r=notriddle Add missing suffix for sidebar-items script path Fixes rust-lang/docs.rs#1590. r? ``@syphar``
@GuillaumeGomez since rust-lang/rust#92742 is merged and I'm new to that part of the process: which nightly will this feature be in? Then I would trigger a rebuild for this release here. For the general suffix issue I would create a new follow-up issue where we discuss details and approaches. IMO after the fix rust-lang/rust#92742 this can only lead to problems when one crate has multiple releases within one day. |
Normally, nothing needs to be changed in docs.rs since it's simply part of something we already use.
It's exactly the same current issue we have. Maybe adding the crate version into the suffix would enough. |
I'm not sure I follow? I would like to rebuild this specific release when docs.rs has the bugfix in its nightly.
Not really, at least not without changing more things. Adding the crate version to the suffix would also add it to the referenced toolchain-specific static files, which are built in a separate step ( add-essential-files) and served from a different location (the root path instead of the crate/release path). |
Sorry, misunderstood. So nightly is built "every night" (but doesn't precise in which timezone, see in https://doc.rust-lang.org/book/appendix-07-nightly-rust.html). The PR was merged 2 days ago, so it should in the nightly from yesterday. I assume new crates were published yesterday so you can check if the |
I just queued a rebuild for For this crate we should be fine again, I'll try to wrap up the bigger topic separately. |
@STPR could you check if this issue is fixed for you now? Then I'll close this issue, after I created a new one for the more general (and older) problem. |
@syphar |
Hello,
The left sidebar doesn't show all the functions when using the "latest" url.
For example, the following url shows the 2 functions correctly:
https://docs.rs/contour_tracing/1.0.8/contour_tracing/
While this one doesn't show the function that is part of a feature:
https://docs.rs/contour_tracing/latest/contour_tracing/
The text was updated successfully, but these errors were encountered: