Skip to content

tests/rustdoc-js can't be run at stage 0 #135603

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

Closed
jieyouxu opened this issue Jan 16, 2025 · 3 comments
Closed

tests/rustdoc-js can't be run at stage 0 #135603

jieyouxu opened this issue Jan 16, 2025 · 3 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. E-needs-investigation Call for partcipation: This issues needs some investigation to determine current status T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jieyouxu
Copy link
Member

but

if i run the test with --stage 1, then back with --stage 0, it works correctly.

looks like build artifacts are not being isolated enough or something??

Originally posted by @lolbinarycat in #135595 (comment)

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 16, 2025
@jieyouxu jieyouxu added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jan 16, 2025
@jieyouxu
Copy link
Member Author

I'm fairly sure rustdoc contributors usually only use ./x test rustdoc-js --stage 1 🤔 At --stage 0 this fails with

---- [rustdoc-js] tests/rustdoc-js/search-non-local-trait-impl.rs stdout ----

error: rustdoc-js test failed!
status: exit status: 1
command: "/home/joe/.local/share/nvm/v23.6.0/bin/node" "/home/joe/repos/rust/src/tools/rustdoc-js/tester.js" "--doc-folder" "/home/joe/repos/rust/build/x86_64-unknown-linux-gnu/test/rustdoc-js/search-non-local-trait-impl" "--crate-name" "search_non_local_trait_impl" "--test-file" "/home/joe/repos/rust/tests/rustdoc-js/search-non-local-trait-impl.js"
--- stdout -------------------------------
Error: Cannot find module '/home/joe/repos/rust/build/x86_64-unknown-linux-gnu/test/rustdoc-js/search-non-local-trait-impl/search-index.js'
Require stack:
- /home/joe/repos/rust/src/tools/rustdoc-js/tester.js
    at Function._resolveFilename (node:internal/modules/cjs/loader:1409:15)
    at defaultResolveImpl (node:internal/modules/cjs/loader:1060:19)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1065:22)
    at Function._load (node:internal/modules/cjs/loader:1214:37)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:234:24)
    at Module.require (node:internal/modules/cjs/loader:1495:12)
    at require (node:internal/modules/helpers:135:16)
    at loadSearchJS (/home/joe/repos/rust/src/tools/rustdoc-js/tester.js:403:25)
    at main (/home/joe/repos/rust/src/tools/rustdoc-js/tester.js:552:28) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/joe/repos/rust/src/tools/rustdoc-js/tester.js' ]
}
------------------------------------------
stderr: none

But running --stage 1 then --stage 0 again passes, which measn that something required is built at stage 1 but not stage 0, and that whatever that thing is isn't properly stamped.

@jieyouxu jieyouxu added A-testsuite Area: The testsuite used to check the correctness of rustc E-needs-investigation Call for partcipation: This issues needs some investigation to determine current status labels Jan 16, 2025
@jieyouxu jieyouxu changed the title tests/rustdoc-js can't be run at stage 0 tests/rustdoc-js can't be run at stage 0 Jan 17, 2025
@jieyouxu
Copy link
Member Author

cc @rust-lang/rustdoc: do you know if this test suite was ever intended to be possible to run at --stage 0?

bors added a commit to rust-lang-ci/rust that referenced this issue Jan 17, 2025
…js, r=clubby789

bootstrap: still require `COMPILETEST_FORCE_STAGE0` for `./x test rustdoc-js --stage 0`

This PR reverts rust-lang#135375, because through some more testing I found out `./x test rustdoc-js --stage 0` does not in fact build rustdoc, and all the tests fail. This can't be intended behavior, so at least require `COMPILETEST_FORCE_STAGE0` to make it less likely to run `rustdoc-js --stage 0` by accident.

The problem that `--stage 0` is not working at all for this rustdoc-js test suite is tracked over at rust-lang#135603.

cc `@lolbinarycat`

r? bootstrap
@lolbinarycat
Copy link
Contributor

related: #135597

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. E-needs-investigation Call for partcipation: This issues needs some investigation to determine current status T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants