Skip to content

Conversation

@chenyukang
Copy link
Member

@chenyukang chenyukang commented Jan 11, 2026

@rustbot
Copy link
Collaborator

rustbot commented Jan 11, 2026

Some changes occurred in GUI tests.

cc @GuillaumeGomez

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @lolbinarycat

@rustbot rustbot added A-rustdoc-search Area: Rustdoc's search feature S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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 Jan 11, 2026
@chenyukang chenyukang force-pushed the yukang-fix-doc-search-150921 branch from ebfadd7 to 176b94a Compare January 11, 2026 12:01
@chenyukang
Copy link
Member Author

it's werid to get a failure when run all the doc tests(it's not related to my change, main branch is same with the following result):

./x.py test tests/rustdoc-gui/
Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.11s
/Users/yukang/rust/build/aarch64-apple-darwin/ci-llvm/bin/llvm-strip does not exist; skipping copy
Building stage1 compiler artifacts (stage0 -> stage1, aarch64-apple-darwin)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.44s
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Building stage1 library artifacts (stage1 -> stage1, aarch64-apple-darwin)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.03s
Building stage1 rustdoc-gui-test (stage0 -> stage1, aarch64-apple-darwin)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.15s
Building stage1 rustdoc_tool_binary (stage0 -> stage1, aarch64-apple-darwin)
   Compiling rustdoc v0.0.0 (/Users/yukang/rust/src/librustdoc)
   Compiling rustdoc-tool v0.0.0 (/Users/yukang/rust/src/tools/rustdoc)
    Finished `release` profile [optimized + debuginfo] target(s) in 2m 08s
Testing stage1 rustdoc-gui (aarch64-apple-darwin)
 Documenting settings v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/settings)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.87s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/settings/index.html
    Checking http v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/lib2/http)
 Documenting http v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/lib2/http)
    Checking implementors v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/lib2/implementors)
 Documenting implementors v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/lib2/implementors)
 Documenting lib2 v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/lib2)
warning: unexpected `cfg` condition value: `foo-method`
  --> lib.rs:29:11
   |
29 | #[doc(cfg(feature = "foo-method"))]
   |           ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected values for `feature` are: `Win32`, `Win32_System`, `Win32_System_Diagnostics`, `Win32_System_Diagnostics_Debug`, and `default`
   = help: consider adding `foo-method` as a feature in `Cargo.toml`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
   = note: `#[warn(unexpected_cfgs)]` on by default

warning: unexpected `cfg` condition value: `foo-method`
  --> lib.rs:48:11
   |
48 | #[doc(cfg(feature = "foo-method"))]
   |           ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected values for `feature` are: `Win32`, `Win32_System`, `Win32_System_Diagnostics`, `Win32_System_Diagnostics_Debug`, and `default`
   = help: consider adding `foo-method` as a feature in `Cargo.toml`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: `lib2` (lib doc) generated 2 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.31s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/lib2/index.html
 Documenting link_to_definition v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/link_to_definition)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.50s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/link_to_definition/index.html
 Documenting huge_logo v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/huge_logo)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.50s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/huge_logo/index.html
    Checking scrape_ice v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/scrape_examples_ice)
    Scraping scrape_ice v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/scrape_examples_ice)
 Documenting scrape_ice v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/scrape_examples_ice)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.93s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/scrape_ice/index.html
 Documenting macro_expansion v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/macro_expansion)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.42s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/macro_expansion/index.html
    Checking scrape_examples v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/scrape_examples)
    Scraping scrape_examples v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/scrape_examples)
 Documenting scrape_examples v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/scrape_examples)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.23s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/scrape_examples/index.html
 Documenting proc_macro_test v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/proc_macro_test)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.41s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/proc_macro_test/index.html
 Documenting staged_api v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/staged_api)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.41s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/staged_api/index.html
 Documenting extend_css v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/extend_css)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.43s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/extend_css/index.html
 Documenting theme_css v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/theme_css)
warning: theme file "custom-theme.css" is missing CSS rules from the default theme
  |
  = warning: the theme may appear incorrect when loaded
  = help: to see what rules are missing, call `rustdoc --check-theme "custom-theme.css"`

warning: `theme_css` (lib doc) generated 1 warning
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.52s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/theme_css/index.html
   Compiling test_docs v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/test_docs)
 Documenting test_docs v0.1.0 (/Users/yukang/rust/tests/rustdoc-gui/src/test_docs)
warning: unexpected `cfg` condition value: `appservice-api-c`
   --> lib.rs:562:17
    |
562 |         any(not(feature = "appservice-api-c"), not(feature = "appservice-api-s")),
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `default` and `some-feature`
    = help: consider adding `appservice-api-c` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default

warning: unexpected `cfg` condition value: `appservice-api-s`
   --> lib.rs:562:52
    |
562 |         any(not(feature = "appservice-api-c"), not(feature = "appservice-api-s")),
    |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `default` and `some-feature`
    = help: consider adding `appservice-api-s` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `client`
   --> lib.rs:563:17
    |
563 |         any(not(feature = "client"), not(feature = "server")),
    |                 ^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `default` and `some-feature`
    = help: consider adding `client` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `server`
   --> lib.rs:563:42
    |
563 |         any(not(feature = "client"), not(feature = "server")),
    |                                          ^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `default` and `some-feature`
    = help: consider adding `server` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: `test_docs` (lib doc) generated 4 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.02s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/index.html
yarn install v1.22.19
warning package.json: No license field                                                                                                                                                                      
warning ../../../../package.json: License should be a valid SPDX license expression                                                                                                                         
warning No license field                                                                                                                                                                                    
[1/4] Resolving packages...
[2/4] Fetching packages...
warning bare-fs@4.5.0: The engine "bare" appears to be invalid.                                                                                                                                             
warning bare-os@3.6.2: The engine "bare" appears to be invalid.                                                                                                                                             
[3/4] Linking dependencies...
warning Workspaces can only be enabled in private projects.                                                                                                                                                 
[4/4] Building fresh packages...
success Saved lockfile.
Done in 4.40s.
=> Running 146 doc-ui tests (on 10 threads)...

.................................................. (50/146)
.........................F........................ (100/146)
.............................................F     (146/146)

======== tests/rustdoc-gui/notable-trait.goml ========

[ERROR] line 254
    at `tests/rustdoc-gui/utils.goml` line 34: Error: The following CSS properties still don't match: [expected `block` for key `display`, found `none`]: for command `wait-for-css: ("#settings", {"display": "block"})`
    at <file:///Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/struct.NotableStructWithLongName.html#method.create_an_iterator_from_read>

======== tests/rustdoc-gui/search-filter.goml ========

[ERROR] line 21: The following errors happened: [document property `URL` (`file:///Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/index.html?search=test`) doesn't contain `&filter-crate=` (for CONTAINS check)]: for command `assert-document-property: ({"URL": "&filter-crate="}, CONTAINS)`
    at <file:///Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/index.html?search=test>
[ERROR] line 23: assert didn't fail: for command `assert-false: "#results .externcrate"`
    at <file:///Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/index.html?search=test>
[ERROR] line 25: The following errors happened (for selector `#crate-search`): [expected `lib2` for property `"value"`, found `all crates`]: for command `assert-property: ("#crate-search", {"value": "lib2"})`
    at <file:///Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/index.html?search=test>
[ERROR] line 35: assert didn't fail: for command `assert-false: "#results .externcrate"`
    at <file:///Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/index.html?search=test>
[ERROR] line 36: The following errors happened (for selector `#crate-search`): [expected `lib2` for property `"value"`, found `all crates`]: for command `assert-property: ("#crate-search", {"value": "lib2"})`
    at <file:///Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/index.html?search=test>

======== tests/rustdoc-gui/search-result-display.goml ========

[WARNING] line 39: Delta is 0 for "x", maybe try to use `compare-elements-position` instead?


<= doc-ui tests done: 144 succeeded, 2 failed, 0 filtered out

Error: ()
Build completed unsuccessfully in 0:03:57

but it's successful to run only the single test:

warning: `test_docs` (lib doc) generated 4 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.09s
   Generated /Users/yukang/rust/build/aarch64-apple-darwin/test/rustdoc-gui/doc/test_docs/index.html
yarn install v1.22.19
warning package.json: No license field                                                                                                                                                                      
warning ../../../../package.json: License should be a valid SPDX license expression                                                                                                                         
warning No license field                                                                                                                                                                                    
[1/4] Resolving packages...
[2/4] Fetching packages...
warning bare-fs@4.5.0: The engine "bare" appears to be invalid.                                                                                                                                             
warning bare-os@3.6.2: The engine "bare" appears to be invalid.                                                                                                                                             
[3/4] Linking dependencies...
warning Workspaces can only be enabled in private projects.                                                                                                                                                 
[4/4] Building fresh packages...
success Saved lockfile.
Done in 3.74s.
[WARNING] No failure or image folder set, taking first test file's folder
=> Running 1 doc-ui test (on 10 threads)...

.                                                  (1/1)

======== tests/rustdoc-gui/search-result-display.goml ========

[WARNING] line 39: Delta is 0 for "x", maybe try to use `compare-elements-position` instead?


<= doc-ui tests done: 1 succeeded, 0 failed, 0 filtered out

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 11, 2026
@notriddle
Copy link
Contributor

@chenyukang

it's werid to get a failure when run all the doc tests

Yeah, I get the same thing. The browser ui tests pass on Linux and fail on macOS. Font differences, I think.

Co-authored-by: Michael Howell <michael@notriddle.com>
@GuillaumeGomez
Copy link
Member

Just tested locally and it doesn't fix the problem with core. You can generate core docs as follows if you want to test locally: x.py doc core --stage 1 --open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustdoc-search Area: Rustdoc's search feature S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

No results when searching for == in the standard library

4 participants