Skip to content
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

Fix lints handling in rustdoc #60908

Merged
merged 3 commits into from
May 20, 2019
Merged

Fix lints handling in rustdoc #60908

merged 3 commits into from
May 20, 2019

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented May 17, 2019

Part of #60664: now lints are handled just like any other lints you would setup in rustc. Still remains to handle missing code examples and missing_docs as part of the same group.

r? @oli-obk

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 17, 2019
Copy link
Contributor

@oli-obk oli-obk left a comment

Choose a reason for hiding this comment

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

just a nit, then this lgtm

@@ -336,18 +338,22 @@ pub fn look_for_tests<'tcx>(
find_testable_code(&dox, &mut tests, ErrorCodes::No);

if check_missing_code == true && tests.found_tests == 0 {
let mut sp = span_of_attrs(&item.attrs);
Copy link
Contributor

Choose a reason for hiding this comment

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

this + the if below can be

let sp = span_of_attrs(&item.attrs).substitute_dummy(item.source.span());

https://doc.rust-lang.org/nightly/nightly-rustc/syntax_pos/struct.Span.html#method.substitute_dummy

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh awesome!

@GuillaumeGomez
Copy link
Member Author

Updated! Let's just wait for CI first, a test is incomplete, I can't make it run locally so I'm waiting for CI to give me the stderr. :-°

@rust-highfive
Copy link
Collaborator

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:070cb8bc:start=1558083170502891338,finish=1558083274223892979,duration=103721001641
$ 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_codegen
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:21:45] 
[01:21:45] running 143 tests
[01:21:48] i..iii.....iii..iiii.....i......................i..i.................i.....i..........ii.i..i..i.ii. 100/143
[01:21:50] test result: ok. 113 passed; 0 failed; 30 ignored; 0 measured; 0 filtered out
[01:21:50] 
[01:21:50]  finished in 4.646
[01:21:50] travis_fold:end:test_codegen
---
travis_time:start:test_assembly
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:21:52] 
[01:21:52] running 9 tests
[01:21:52] iiiiiiiii
[01:21:52] 
[01:21:52]  finished in 0.154
[01:21:52] 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:22:08] 
[01:22:08] running 122 tests
[01:22:33] .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....i..........iiii..........i...ii...i.......ii.i 100/122
[01:22:38] .i.i......iii.i.....ii
[01:22:38] 
[01:22:38]  finished in 30.129
[01:22:38] travis_fold:end:test_debuginfo

---
travis_time:start:test_rustdoc-ui
Check compiletest suite=rustdoc-ui mode=ui (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:46:51] 
[01:46:51] running 27 tests
[01:47:05] .............F..........F..
[01:47:05] failures:
[01:47:05] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:47:05] 
[01:47:05] ---- [ui] rustdoc-ui/doc-without-codeblock.rs stdout ----
[01:47:05] ---- [ui] rustdoc-ui/doc-without-codeblock.rs stdout ----
[01:47:05] diff of stderr:
[01:47:05] 
[01:47:05] 1 error: Missing code example in this documentation
[01:47:05] +   --> $DIR/doc-without-codeblock.rs:3:1
[01:47:05] +    |
[01:47:05] + LL | / #![deny(missing_doc_code_examples)]
[01:47:05] + LL | |
[01:47:05] + LL | | /// Some docs.
[01:47:05] + LL | |
[01:47:05] + ...  |
[01:47:05] + LL | |     pub fn bar() {}
[01:47:05] + LL | | }
[01:47:05] 2    |
[01:47:05] 3 note: lint level defined here
[01:47:05] 4   --> $DIR/doc-without-codeblock.rs:3:9
[01:47:05] 
[01:47:05] 
[01:47:05] 
[01:47:05] The actual stderr differed from the expected stderr.
[01:47:05] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/doc-without-codeblock/doc-without-codeblock.stderr
[01:47:05] To update references, rerun the tests and pass the `--bless` flag
[01:47:05] To only update this specific test, also pass `--test-args doc-without-codeblock.rs`
[01:47:05] error: 1 errors occurred comparing output.
[01:47:05] status: exit code: 1
[01:47:05] status: exit code: 1
[01:47:05] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "/checkout/src/test/rustdoc-ui/doc-without-codeblock.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/doc-without-codeblock" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/doc-without-codeblock/auxiliary"
[01:47:05] ------------------------------------------
[01:47:05] 
[01:47:05] ------------------------------------------
[01:47:05] stderr:
[01:47:05] stderr:
[01:47:05] ------------------------------------------
[01:47:05] error: Missing code example in this documentation
[01:47:05]   --> /checkout/src/test/rustdoc-ui/doc-without-codeblock.rs:3:1
[01:47:05]    |
[01:47:05] LL | / #![deny(missing_doc_code_examples)]
[01:47:05] LL | | /// Some docs.
[01:47:05] LL | | //~^ ERROR Missing code example in this documentation
[01:47:05] ...  |
[01:47:05] LL | |     pub fn bar() {}
---
[01:47:05] 
[01:47:05] error: Missing code example in this documentation
[01:47:05]   --> /checkout/src/test/rustdoc-ui/doc-without-codeblock.rs:9:1
[01:47:05]    |
[01:47:05] LL | /// And then, the princess died.
[01:47:05] 
[01:47:05] error: Missing code example in this documentation
[01:47:05]   --> /checkout/src/test/rustdoc-ui/doc-without-codeblock.rs:12:5
[01:47:05]    |
[01:47:05]    |
[01:47:05] LL |     /// Or maybe not because she saved herself!
[01:47:05] 
[01:47:05] error: aborting due to 4 previous errors
[01:47:05] 
[01:47:05] 
---
[01:47:05] normalized stderr:
[01:47:05] error: Missing code example in this documentation
[01:47:05]   --> $DIR/lint-missing-doc-code-example.rs:19:1
[01:47:05]    |
[01:47:05] LL | / mod module1 {
[01:47:05]    | |_^
[01:47:05]    |
[01:47:05] note: lint level defined here
[01:47:05]   --> $DIR/lint-missing-doc-code-example.rs:2:9
---
[01:47:05] 
[01:47:05] 
[01:47:05] 
[01:47:05] The actual stderr differed from the expected stderr.
[01:47:05] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/lint-missing-doc-code-example/lint-missing-doc-code-example.stderr
[01:47:05] To update references, rerun the tests and pass the `--bless` flag
[01:47:05] To only update this specific test, also pass `--test-args lint-missing-doc-code-example.rs`
[01:47:05] error: 1 errors occurred comparing output.
[01:47:05] status: exit code: 1
[01:47:05] status: exit code: 1
[01:47:05] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "/checkout/src/test/rustdoc-ui/lint-missing-doc-code-example.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/lint-missing-doc-code-example" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/lint-missing-doc-code-example/auxiliary"
[01:47:05] ------------------------------------------
[01:47:05] 
[01:47:05] ------------------------------------------
[01:47:05] stderr:
[01:47:05] stderr:
[01:47:05] ------------------------------------------
[01:47:05] error: Missing code example in this documentation
[01:47:05]   --> /checkout/src/test/rustdoc-ui/lint-missing-doc-code-example.rs:19:1
[01:47:05]    |
[01:47:05] LL | / mod module1 {
[01:47:05]    | |_^
[01:47:05]    |
[01:47:05] note: lint level defined here
[01:47:05]   --> /checkout/src/test/rustdoc-ui/lint-missing-doc-code-example.rs:2:9
---
[01:47:05] test result: FAILED. 25 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out
[01:47:05] 
[01:47:05] 
[01:47:05] 
[01:47:05] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/rustdoc-ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:47:05] 
[01:47:05] 
[01:47:05] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:47:05] Build completed unsuccessfully in 0:37:17
[01:47:05] Build completed unsuccessfully in 0:37:17
[01:47:05] Makefile:48: recipe for target 'check' failed
[01:47:05] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:001dc180
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Fri May 17 10:41:49 UTC 2019
---
travis_time:end:24f41cb0:start=1558089710924000297,finish=1558089710929381346,duration=5381049
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:3cc035cd
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true

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)

@GuillaumeGomez
Copy link
Member Author

@pietroalbini Any idea why we don't have highfive starting rustdoc UI test in here? :'(

@rust-highfive
Copy link
Collaborator

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:075e2efd:start=1558093230783266399,finish=1558093326652699327,duration=95869432928
$ 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_codegen
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:26:14] 
[01:26:14] running 143 tests
[01:26:17] i..iii.....iii..iiii.....i......................i..i.................i.....i..........ii.i..i..i.ii. 100/143
[01:26:19] test result: ok. 113 passed; 0 failed; 30 ignored; 0 measured; 0 filtered out
[01:26:19] 
[01:26:19]  finished in 5.078
[01:26:19] travis_fold:end:test_codegen
---
travis_time:start:test_assembly
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:26:21] 
[01:26:21] running 9 tests
[01:26:21] iiiiiiiii
[01:26:21] 
[01:26:21]  finished in 0.157
[01:26:21] 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:26:38] 
[01:26:38] running 122 tests
[01:27:05] .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....i..........iiii..........i...ii...i.......ii.i 100/122
[01:27:11] .i.i......iii.i.....ii
[01:27:11] 
[01:27:11]  finished in 32.371
[01:27:11] travis_fold:end:test_debuginfo

---
[01:52:42] 
[01:52:42] running 27 tests
[01:52:57] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:512:22
[01:52:57] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:52:57] .............F...........F.
[01:52:57] 
[01:52:57] ---- [ui] rustdoc-ui/doc-without-codeblock.rs stdout ----
[01:52:57] diff of stderr:
[01:52:57] 
---
[01:52:57] 13   --> $DIR/doc-without-codeblock.rs:3:9
[01:52:57] 
[01:52:57] 
[01:52:57] The actual stderr differed from the expected stderr.
[01:52:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/doc-without-codeblock/doc-without-codeblock.stderr
[01:52:57] To update references, rerun the tests and pass the `--bless` flag
[01:52:57] To only update this specific test, also pass `--test-args doc-without-codeblock.rs`
[01:52:57] error: 1 errors occurred comparing output.
[01:52:57] status: exit code: 1
[01:52:57] status: exit code: 1
[01:52:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "/checkout/src/test/rustdoc-ui/doc-without-codeblock.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/doc-without-codeblock" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/doc-without-codeblock/auxiliary"
[01:52:57] ------------------------------------------
[01:52:57] 
[01:52:57] ------------------------------------------
[01:52:57] stderr:
[01:52:57] stderr:
[01:52:57] ------------------------------------------
[01:52:57] error: Missing code example in this documentation
[01:52:57]   --> /checkout/src/test/rustdoc-ui/doc-without-codeblock.rs:3:1
[01:52:57]    |
[01:52:57] LL | / #![deny(missing_doc_code_examples)]
[01:52:57] LL | | /// Some docs.
[01:52:57] LL | | //~^ ERROR Missing code example in this documentation
[01:52:57] ...  |
[01:52:57] LL | |     pub fn bar() {}
---
[01:52:57] 
[01:52:57] error: Missing code example in this documentation
[01:52:57]   --> /checkout/src/test/rustdoc-ui/doc-without-codeblock.rs:9:1
[01:52:57]    |
[01:52:57] LL | /// And then, the princess died.
[01:52:57] 
[01:52:57] error: Missing code example in this documentation
[01:52:57]   --> /checkout/src/test/rustdoc-ui/doc-without-codeblock.rs:12:5
[01:52:57]    |
[01:52:57]    |
[01:52:57] LL |     /// Or maybe not because she saved herself!
[01:52:57] 
[01:52:57] error: aborting due to 4 previous errors
[01:52:57] 
[01:52:57] 
---
[01:52:57] 1 error: Missing code example in this documentation
[01:52:57] -   --> /checkout/src/test/rustdoc-ui/lint-missing-doc-code-example.rs:19:1
[01:52:57] +   --> $DIR/lint-missing-doc-code-example.rs:19:1
[01:52:57] 3    |
[01:52:57] 4 LL | / mod module1 {
[01:52:57] + LL | | }
[01:52:57] 6    |
[01:52:57] 7 note: lint level defined here
[01:52:57] 
[01:52:57] -   --> /checkout/src/test/rustdoc-ui/lint-missing-doc-code-example.rs:2:9
---
[01:52:57] 10 
[01:52:57] 
[01:52:57] 
[01:52:57] The actual stderr differed from the expected stderr.
[01:52:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/lint-missing-doc-code-example/lint-missing-doc-code-example.stderr
[01:52:57] To update references, rerun the tests and pass the `--bless` flag
[01:52:57] To only update this specific test, also pass `--test-args lint-missing-doc-code-example.rs`
[01:52:57] error: 1 errors occurred comparing output.
[01:52:57] status: exit code: 1
[01:52:57] status: exit code: 1
[01:52:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "/checkout/src/test/rustdoc-ui/lint-missing-doc-code-example.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/lint-missing-doc-code-example" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/lint-missing-doc-code-example/auxiliary"
[01:52:57] ------------------------------------------
[01:52:57] 
[01:52:57] ------------------------------------------
[01:52:57] stderr:
[01:52:57] stderr:
[01:52:57] ------------------------------------------
[01:52:57] error: Missing code example in this documentation
[01:52:57]   --> /checkout/src/test/rustdoc-ui/lint-missing-doc-code-example.rs:19:1
[01:52:57]    |
[01:52:57] LL | / mod module1 {
[01:52:57]    | |_^
[01:52:57]    |
[01:52:57] note: lint level defined here
[01:52:57]   --> /checkout/src/test/rustdoc-ui/lint-missing-doc-code-example.rs:2:9
---
[01:52:57] test result: FAILED. 25 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out
[01:52:57] 
[01:52:57] 
[01:52:57] 
[01:52:57] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/rustdoc-ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:52:57] 
[01:52:57] 
[01:52:57] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:52:57] Build completed unsuccessfully in 0:39:20
[01:52:57] Build completed unsuccessfully in 0:39:20
[01:52:57] make: *** [check] Error 1
[01:52:57] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:295b4751
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Fri May 17 13:35:14 UTC 2019
---
travis_time:end:011c7c84:start=1558100115886230800,finish=1558100115945462228,duration=59231428
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:0f687617
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:116b59c0
$ dmesg | grep -i kill

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)

@pietroalbini
Copy link
Member

@pietroalbini Any idea why we don't have highfive starting rustdoc UI test in here? :'(

I don't see any exception, I'll try to investigate a bit later.

@GuillaumeGomez
Copy link
Member Author

GuillaumeGomez commented May 17, 2019

Thanks!

@rust-highfive
Copy link
Collaborator

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:02abc76a:start=1558101271490210871,finish=1558101371101567677,duration=99611356806
$ 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_codegen
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:25:06] 
[01:25:06] running 143 tests
[01:25:09] i..iii.....iii..iiii.....i......................i..i.................i.....i..........ii.i..i..i.ii. 100/143
[01:25:11] test result: ok. 113 passed; 0 failed; 30 ignored; 0 measured; 0 filtered out
[01:25:11] 
[01:25:11]  finished in 4.858
[01:25:11] travis_fold:end:test_codegen
---
travis_time:start:test_assembly
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:25:13] 
[01:25:13] running 9 tests
[01:25:13] iiiiiiiii
[01:25:13] 
[01:25:13]  finished in 0.167
[01:25:13] 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:25:30] 
[01:25:30] running 122 tests
[01:25:56] .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....i..........iiii..........i...ii...i.......ii.i 100/122
[01:26:01] .i.i......iii.i.....ii
[01:26:01] 
[01:26:01]  finished in 31.376
[01:26:01] travis_fold:end:test_debuginfo

---
Check compiletest suite=rustdoc-ui mode=ui (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:50:35] 
[01:50:35] running 27 tests
[01:50:50] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:512:22
[01:50:50] .............F..........F..
[01:50:50] 
[01:50:50] ---- [ui] rustdoc-ui/doc-without-codeblock.rs stdout ----
[01:50:50] diff of stderr:
[01:50:50] 
[01:50:50] 
[01:50:50] 4 LL | / #![deny(missing_doc_code_examples)]
[01:50:50] 6 LL | | /// Some docs.
[01:50:50] 6 LL | | /// Some docs.
[01:50:50] - LL | | //~^ ERROR Missing code example in this documentation
[01:50:50] + LL | |
[01:50:50] 8 ...  |
[01:50:50] 9 LL | |     pub fn bar() {}
[01:50:50] 
[01:50:50] 
[01:50:50] The actual stderr differed from the expected stderr.
[01:50:50] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/doc-without-codeblock/doc-without-codeblock.stderr
[01:50:50] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/doc-without-codeblock/doc-without-codeblock.stderr
[01:50:50] To update references, rerun the tests and pass the `--bless` flag
[01:50:50] To only update this specific test, also pass `--test-args doc-without-codeblock.rs`
[01:50:50] error: 1 errors occurred comparing output.
[01:50:50] status: exit code: 1
[01:50:50] status: exit code: 1
[01:50:50] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "/checkout/src/test/rustdoc-ui/doc-without-codeblock.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/doc-without-codeblock" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/doc-without-codeblock/auxiliary"
[01:50:50] ------------------------------------------
[01:50:50] 
[01:50:50] ------------------------------------------
[01:50:50] stderr:
[01:50:50] stderr:
[01:50:50] ------------------------------------------
[01:50:50] error: Missing code example in this documentation
[01:50:50]   --> /checkout/src/test/rustdoc-ui/doc-without-codeblock.rs:3:1
[01:50:50]    |
[01:50:50] LL | / #![deny(missing_doc_code_examples)]
[01:50:50] LL | | /// Some docs.
[01:50:50] LL | | //~^ ERROR Missing code example in this documentation
[01:50:50] ...  |
[01:50:50] LL | |     pub fn bar() {}
---
[01:50:50] 
[01:50:50] error: Missing code example in this documentation
[01:50:50]   --> /checkout/src/test/rustdoc-ui/doc-without-codeblock.rs:9:1
[01:50:50]    |
[01:50:50] LL | /// And then, the princess died.
[01:50:50] 
[01:50:50] error: Missing code example in this documentation
[01:50:50]   --> /checkout/src/test/rustdoc-ui/doc-without-codeblock.rs:12:5
[01:50:50]    |
[01:50:50]    |
[01:50:50] LL |     /// Or maybe not because she saved herself!
[01:50:50] 
[01:50:50] error: aborting due to 4 previous errors
[01:50:50] 
[01:50:50] 
[01:50:50] 
[01:50:50] ------------------------------------------
[01:50:50] 
[01:50:50] 
[01:50:50] ---- [ui] rustdoc-ui/lint-missing-doc-code-example.rs stdout ----
[01:50:50] 
[01:50:50] error: /checkout/src/test/rustdoc-ui/lint-missing-doc-code-example.rs:19: unexpected error: '19:1: 20:2: Missing code example in this documentation [missing_doc_code_examples]'
[01:50:50] 
[01:50:50] error: /checkout/src/test/rustdoc-ui/lint-missing-doc-code-example.rs:37: unexpected error: '37:3: 37:10: Missing code example in this documentation [missing_doc_code_examples]'
[01:50:50] error: 2 unexpected errors found, 0 expected errors not found
[01:50:50] status: exit code: 1
[01:50:50] status: exit code: 1
[01:50:50] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "/checkout/src/test/rustdoc-ui/lint-missing-doc-code-example.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/lint-missing-doc-code-example" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/lint-missing-doc-code-example/auxiliary"
[01:50:50]     Error {
[01:50:50]         line_num: 19,
[01:50:50]         kind: Some(
[01:50:50]             Error,
[01:50:50]             Error,
[01:50:50]         ),
[01:50:50]         msg: "19:1: 20:2: Missing code example in this documentation [missing_doc_code_examples]",
[01:50:50]     Error {
[01:50:50]         line_num: 37,
[01:50:50]         kind: Some(
[01:50:50]             Error,
[01:50:50]             Error,
[01:50:50]         ),
[01:50:50]         msg: "37:3: 37:10: Missing code example in this documentation [missing_doc_code_examples]",
[01:50:50] ]
[01:50:50] 
[01:50:50] thread '[ui] rustdoc-ui/lint-missing-doc-code-example.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1404:13
[01:50:50] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
---
[01:50:50] test result: FAILED. 25 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out
[01:50:50] 
[01:50:50] 
[01:50:50] 
[01:50:50] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/rustdoc-ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:50:50] 
[01:50:50] 
[01:50:50] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:50:50] Build completed unsuccessfully in 0:38:18
[01:50:50] Build completed unsuccessfully in 0:38:18
[01:50:50] make: *** [check] Error 1
[01:50:50] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:190ecf48
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Fri May 17 15:47:11 UTC 2019
---
travis_time:end:178b941b:start=1558108032953093702,finish=1558108032958324680,duration=5230978
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:005ff8da
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1d3faff6
travis_time:start:1d3faff6
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:1d69be74
$ dmesg | grep -i kill

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)

@GuillaumeGomez
Copy link
Member Author

I fixed the tests and also fixed the tests not running locally for some reasons...

ping @oli-obk

@oli-obk
Copy link
Contributor

oli-obk commented May 18, 2019

Please mention in the commit description or the PR description what part of the issue is actually being fixed

@GuillaumeGomez
Copy link
Member Author

I updated the first comment of the PR. Do you think this is enough or should I add something else?

@oli-obk
Copy link
Contributor

oli-obk commented May 19, 2019

@bors r+

@bors
Copy link
Contributor

bors commented May 19, 2019

📌 Commit 6063777 has been approved by oli-obk

@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 May 19, 2019
Centril added a commit to Centril/rust that referenced this pull request May 19, 2019
Fix lints handling in rustdoc

Part of rust-lang#60664: now lints are handled just like any other lints you would setup in rustc. Still remains to handle `missing code examples` and `missing_docs` as part of the same group.

r? @oli-obk
bors added a commit that referenced this pull request May 20, 2019
Rollup of 6 pull requests

Successful merges:

 - #60590 (Test interaction of unions with non-zero/niche-filling optimization)
 - #60745 (Perform constant propagation into terminators)
 - #60895 (Enable thumbv7a-pc-windows-msvc target build end to end in rust/master)
 - #60908 (Fix lints handling in rustdoc)
 - #60960 (Stop using gensyms in HIR lowering)
 - #60962 (Fix data types indication)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented May 20, 2019

☔ The latest upstream changes (presumably #60969) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 20, 2019
@bors bors merged commit 6063777 into rust-lang:master May 20, 2019
@GuillaumeGomez GuillaumeGomez deleted the errors branch May 20, 2019 08:12
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.

5 participants