-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
cargo doc
no longer generates a nav list of all dependencies in the sidebar
#85301
Comments
Appears to be a regression from #84150, the call to |
Checking https://doc.rust-lang.org/beta/std/ it looks like this has made it onto the 1.53 beta. |
cc @jsha |
I think the ideal fix is around rust/src/librustdoc/html/render/mod.rs Lines 1748 to 1753 in 1025db8
initSidebarItems({}) . And remove that comment, since we now have dynamic crate loading.
A quicker fix is to just move the call to addSidebarCrates so it gets called independently from initSidebarItems. I like that less since the crates really are a sidebar item and should be treated as such. |
I can do that if no one else wants to do it! |
Go for it! I'm happy to review. |
Assigning |
It's actually something I fixed in #84834 (still waiting for approval/review). |
See #85304 (comment) - after some discussion, @GuillaumeGomez and @Nemo157 concluded to merge #85304 as our quick fix. To explain why I proposed to add a tiny sidebar-item.js: We have one main.js that's loaded by a variety of different pages. It also potentially has many different entry points. For instance, the primary entry point is that when main.js itself is loaded, it runs various functions, adding event handlers and so on. Another entry point is that when sidebar-items.js loads, it calls It's a bit inelegant to have a small file whose purpose is only to call a known function. But I think that inelegance is balanced against the improved maintainability of having most doc pages follow closer to the same code path through main.js. The more code paths, the more chances for bugs and the more complexity in testing. Another way to address this longer-term would be to eliminate the Yet another way to address this would be to separate out |
Since i don't know which version, when running
cargo doc
on a project, the left sidebar of the docs no longer has a nav for all crates in the dependency graph. However, the documentation for all dependencies is still compiled.Steps to reproduce
cargo doc --open
Version it worked on
It most recently worked on: I honestly don't remember. I update my nightly before every dev session. Allegedly that bug is 27 days old.
Version with regression
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: