Skip to content

[rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index - #166420

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
GuillaumeGomez:search-index-regen
Nov 24, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
GuillaumeGomez:search-index-regen

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Fixes #166236.

The problem was that we didn't process items with index lower than the crate's name. For performance reason maybe? Not sure.

r? @notriddle

@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Nov 23, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Nov 23, 2026
}
for i in (index + 1)..serialized_index.entry_data.len() {
for i in 0..serialized_index.entry_data.len() {
if i == index {

@GuillaumeGomez GuillaumeGomez Nov 23, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We skipped the items before the crate's name and the crate's itself. Since we now handle the items before the crate's name, I still skip the crate's. Or should I do a second loop instead? If you have a preference...

View changes since the review

@notriddle

Copy link
Copy Markdown
Contributor

@bors r+ rollup

thanks!

@rust-bors

rust-bors Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 0bd26b0 has been approved by notriddle

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Nov 24, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Nov 24, 2026
… r=notriddle

[rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index

Fixes rust-lang#166236.

The problem was that we didn't process items with index lower than the crate's name. For performance reason maybe? Not sure.

r? @notriddle
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
Rollup of 3 pull requests

Successful merges:

 - #163187 (add `scalbn` and `ilogb` methods on floats)
 - #166033 (Abby: move span out of leaf region constraint)
 - #166420 ([rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 24, 2026
… r=notriddle

[rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index

Fixes rust-lang#166236.

The problem was that we didn't process items with index lower than the crate's name. For performance reason maybe? Not sure.

r? @notriddle
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #165538 (Supertraits returns Unnormalized)
 - #166033 (Abby: move span out of leaf region constraint)
 - #166399 (Add safety section for intrinsic volatile operations)
 - #166420 ([rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index)
@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors try jobs=dist-apple-various

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
[rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index


try-job: dist-apple-various
@rust-bors

rust-bors Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 97ea5d4 (97ea5d4e89784a1fa2b7f1ffbd06929826ac4e73)
Base parent: 058c701 (058c701055c4b6f60f622d616afc0349911c38c3)

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 24, 2026
… r=notriddle

[rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index

Fixes rust-lang#166236.

The problem was that we didn't process items with index lower than the crate's name. For performance reason maybe? Not sure.

r? @notriddle
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #166340 (Revert "implement const Iterator for Range - #156216")
 - #165345 (Remove the 'eq', 'eq_trace', and 'goals_to_obligations' methods from 'At')
 - #165538 (Supertraits returns Unnormalized)
 - #165794 (`consider_impl_candidate` tweaks)
 - #160752 (Avoid inference constraints from opaque blanket impls)
 - #163187 (add `scalbn` and `ilogb` methods on floats)
 - #164541 (Add regression test for #152415)
 - #164543 (Add regression test for #151316)
 - #165920 (Introduce compute_abi helper and ComputeCallConv trait)
 - #166313 (Move `rustdoc-ui` tests in the right folder)
 - #166420 ([rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index)
 - #166485 (Allow passing `--exact-match` and `--purge` to `x perf`)
@rust-bors
rust-bors Bot merged commit 64c058c into rust-lang:main Nov 24, 2026
15 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 24, 2026
@GuillaumeGomez
GuillaumeGomez deleted the search-index-regen branch November 24, 2026 21:05
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
Rollup merge of #166420 - GuillaumeGomez:search-index-regen, r=notriddle

[rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index

Fixes #166236.

The problem was that we didn't process items with index lower than the crate's name. For performance reason maybe? Not sure.

r? @notriddle
TDecking pushed a commit to TDecking/miri that referenced this pull request Nov 25, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#166340 (Revert "implement const Iterator for Range - rust-lang/rust#156216")
 - rust-lang/rust#165345 (Remove the 'eq', 'eq_trace', and 'goals_to_obligations' methods from 'At')
 - rust-lang/rust#165538 (Supertraits returns Unnormalized)
 - rust-lang/rust#165794 (`consider_impl_candidate` tweaks)
 - rust-lang/rust#160752 (Avoid inference constraints from opaque blanket impls)
 - rust-lang/rust#163187 (add `scalbn` and `ilogb` methods on floats)
 - rust-lang/rust#164541 (Add regression test for rust-lang/rust#152415)
 - rust-lang/rust#164543 (Add regression test for rust-lang/rust#151316)
 - rust-lang/rust#165920 (Introduce compute_abi helper and ComputeCallConv trait)
 - rust-lang/rust#166313 (Move `rustdoc-ui` tests in the right folder)
 - rust-lang/rust#166420 ([rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index)
 - rust-lang/rust#166485 (Allow passing `--exact-match` and `--purge` to `x perf`)
mehmettoplu-rs pushed a commit to mehmettoplu-rs/rustc_codegen_gcc that referenced this pull request Nov 27, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#166340 (Revert "implement const Iterator for Range - rust-lang/rust#156216")
 - rust-lang/rust#165345 (Remove the 'eq', 'eq_trace', and 'goals_to_obligations' methods from 'At')
 - rust-lang/rust#165538 (Supertraits returns Unnormalized)
 - rust-lang/rust#165794 (`consider_impl_candidate` tweaks)
 - rust-lang/rust#160752 (Avoid inference constraints from opaque blanket impls)
 - rust-lang/rust#163187 (add `scalbn` and `ilogb` methods on floats)
 - rust-lang/rust#164541 (Add regression test for rust-lang/rust#152415)
 - rust-lang/rust#164543 (Add regression test for rust-lang/rust#151316)
 - rust-lang/rust#165920 (Introduce compute_abi helper and ComputeCallConv trait)
 - rust-lang/rust#166313 (Move `rustdoc-ui` tests in the right folder)
 - rust-lang/rust#166420 ([rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index)
 - rust-lang/rust#166485 (Allow passing `--exact-match` and `--purge` to `x perf`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rustdoc: search.index/ grows on every cargo doc run of an unchanged crate

4 participants