Skip to content

Add missing suffix for sidebar-items script path #92742

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jan 12, 2022

Conversation

GuillaumeGomez
Copy link
Member

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jan 10, 2022
@GuillaumeGomez
Copy link
Member Author

r? @notriddle

@camelid camelid added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 10, 2022
@@ -665,7 +665,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
_ => unreachable!(),
};
let items = self.build_sidebar_items(module);
let js_dst = self.dst.join("sidebar-items.js");
let js_dst = self.dst.join(&format!("sidebar-items{}.js", self.shared.resource_suffix));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GuillaumeGomez just a thought:

docs.rs is using static file categorization like this:

let mut rustdoc_flags = vec![if create_essential_files {
    "--emit=unversioned-shared-resources,toolchain-shared-resources"
} else {
    "--emit=invocation-specific"
}

Was sidebar-items.js only missing the resource suffix? Or was/it it also in the wrong category? (correct would be invocation-specific as I understand it)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sidebar-items isn't a shared resource, or even invocation-specific. It's actually per-module. These URLs all exist, and all have different contents:

In contrast, search-index is here:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just like @notriddle said. ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the explanation!
So as I understand it these are invocation-specific, and when they are different they will be in different paths inside the docs.

@GuillaumeGomez
Copy link
Member Author

Thanks for the quick review @notriddle!

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Jan 11, 2022

📌 Commit 881b427 has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 11, 2022
@GuillaumeGomez
Copy link
Member Author

Force of habit...

@bors: r=notriddle

@bors
Copy link
Collaborator

bors commented Jan 11, 2022

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Collaborator

bors commented Jan 11, 2022

📌 Commit 881b427 has been approved by notriddle

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 11, 2022
…ar-items, r=notriddle

Add missing suffix for sidebar-items script path

Fixes rust-lang/docs.rs#1590.

r? `@syphar`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 11, 2022
…ar-items, r=notriddle

Add missing suffix for sidebar-items script path

Fixes rust-lang/docs.rs#1590.

r? ``@syphar``
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 12, 2022
…askrgr

Rollup of 14 pull requests

Successful merges:

 - rust-lang#92328 (Tweak sentence in `transmute` docs)
 - rust-lang#92432 (Error when selected impl is not const in constck)
 - rust-lang#92506 (Document Box<T> FFI guarantee in 1.41.0 release notes)
 - rust-lang#92699 (rustdoc: Display "private fields" instead of "fields omitted")
 - rust-lang#92703 (RELEASES.md: Add 1.58 release note for `File::options` stabilization)
 - rust-lang#92707 (Extended the note on the use of `no_run` attribute)
 - rust-lang#92709 (Improve documentation for File::options to give a more likely example)
 - rust-lang#92720 (Fix doc formatting for time.rs)
 - rust-lang#92732 (Add note about upstream commit musl-patch-configure.diff is derived from)
 - rust-lang#92742 (Add missing suffix for sidebar-items script path)
 - rust-lang#92748 (Eliminate "boxed" wording in `std::error::Error` documentation)
 - rust-lang#92754 (Update AsmArgs field visibility for rustfmt)
 - rust-lang#92756 (:arrow_up: rust-analyzer)
 - rust-lang#92764 (Fix rust logo style)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit bc0a165 into rust-lang:master Jan 12, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 12, 2022
@GuillaumeGomez GuillaumeGomez deleted the missing-suffix-sidebar-items branch January 12, 2022 21:22
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The left sidebar doesn't show all the functions when using the "latest" url
6 participants