Skip to content

Don't build rustdoc in more than one stage #59844

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

Conversation

Mark-Simulacrum
Copy link
Member

This also introduces a check that if we're attempting to build rustdoc in more than one stage we bail out and abort the build. It shouldn't ever be necessary to do so within one build (it may be necessary locally, primarily, where you don't want a full stage 2 compiler), so just bail out if it happens.

r? @alexcrichton

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 10, 2019
@Mark-Simulacrum
Copy link
Member Author

This might not pass CI -- I've not thoroughly tested -- but it'll give us information on the failures which we can then fix. I think I've fixed the case we know about, though.

@alexcrichton
Copy link
Member

Hm this doesn't feel quite right because in theory we should be able to request documentation from any stage of rustdoc, but is it a bug that stage1 docs are requested somewhere or something like that?

@rust-highfive
Copy link
Contributor

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:0225c4a8:start=1554914663959517361,finish=1554914664852855989,duration=893338628
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
make -j 4 check
[01:02:45]     Finished dev [unoptimized] target(s) in 0.36s
[01:02:46] thread 'main' panicked at 'assertion failed: `(left == right)`
[01:02:46]   left: `2`,
[01:02:46]  right: `1`: Only ever build one copy of rustdoc per run, currently built in stages [2, 1]', src/bootstrap/tool.rs:464:17
[01:02:46] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:02:46] Build completed unsuccessfully in 0:00:02
[01:02:46] Build completed unsuccessfully in 0:00:02
[01:02:47] make: *** [check] Error 1
[01:02:47] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:00bd1ccf
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Wed Apr 10 17:47:24 UTC 2019

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@Mark-Simulacrum
Copy link
Member Author

Hm this doesn't feel quite right because in theory we should be able to request documentation from any stage of rustdoc, but is it a bug that stage1 docs are requested somewhere or something like that?

Hm, yeah, now that I think a little more about it I think that this change is wrong. We should be using the requested stage, not just stage 2. (To be clear, prior to #58897, we would always use top_stage for rustdoc which then did the right thing for documentation as well). I'll look into the relevant fix (and what caused CI to fail).

This prevents silent regressions where rustdoc is accidentally compiled
in more than one stage. We should always be building it just once
(likely in the final stage).
There's no reason to prefer stage 1 when building docs
@rust-highfive
Copy link
Contributor

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:05e485c0:start=1555199546374667017,finish=1555199547111449582,duration=736782565
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
travis_time:start:test_assembly
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:13:41] 
[01:13:41] running 9 tests
[01:13:41] iiiiiiiii
[01:13:41] 
[01:13:41]  finished in 0.154
[01:13:41] travis_fold:end:test_assembly

---
travis_time:start:test_debuginfo
Check compiletest suite=debuginfo mode=debuginfo-both (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:13:58] 
[01:13:58] running 121 tests
[01:14:23] .iiiii...i.....i..i...i..i.i.i..i.ii...i.....i..i....i..........iiii..........i...ii...i.......ii.i. 100/121
[01:14:28] i.i......iii.i.....ii
[01:14:28] 
[01:14:28]  finished in 30.513
[01:14:28] travis_fold:end:test_debuginfo

---
travis_time:start:test_stage2-test
Testing test stage2 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:21:56]    Compiling getopts v0.2.17
[01:21:59]    Compiling test v0.0.0 (/checkout/src/libtest)
[01:21:59] error[E0523]: found two different crates with name `getopts` that are not distinguished by differing `-C metadata`. This will result in symbol conflicts between the two.
[01:21:59]    |
[01:21:59] 34 | use getopts;
[01:21:59]    |     ^^^^^^^
[01:21:59] 
---
[01:21:59] warning: build failed, waiting for other jobs to finish...
[01:22:09] error: build failed
[01:22:09] 
[01:22:09] 
[01:22:09] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--manifest-path" "/checkout/src/libtest/Cargo.toml" "-p" "test" "--" "--quiet"
[01:22:09] 
[01:22:09] 
[01:22:09] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:22:09] Build completed unsuccessfully in 0:20:12
[01:22:09] Build completed unsuccessfully in 0:20:12
[01:22:09] Makefile:48: recipe for target 'check' failed
[01:22:09] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:06ef1ad4
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sun Apr 14 01:14:47 UTC 2019

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@Dylan-DPC-zz
Copy link

ping from triage @Mark-Simulacrum tests are failing can you address that?

@Dylan-DPC-zz Dylan-DPC-zz 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 May 6, 2019
@Mark-Simulacrum Mark-Simulacrum deleted the rustdoc-not-stage1 branch June 8, 2019 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants