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

lint if a private item has doctests #55367

Merged
merged 1 commit into from Nov 22, 2018

Conversation

Projects
None yet
6 participants
@GuillaumeGomez
Member

GuillaumeGomez commented Oct 25, 2018

@rust-highfive

This comment has been minimized.

Collaborator

rust-highfive commented Oct 26, 2018

The job x86_64-gnu-llvm-5.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:08dee47f:start=1540508236906195230,finish=1540508290845806650,duration=53939611420
$ 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
Setting environment variables from .travis.yml
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
---
[00:51:26] .................................................................................................... 2200/4951
[00:51:31] .................................................................................................... 2300/4951
[00:51:34] .................................................................................................... 2400/4951
[00:51:38] .................................................................................................... 2500/4951
[00:51:42] .....................................................iiiiiiiii...................................... 2600/4951
[00:51:49] ...ii............................................................................................... 2800/4951
[00:51:53] .................................................................................................... 2900/4951
[00:51:56] ..............................................................................................i..... 3000/4951
[00:51:59] .................................................................................................... 3100/4951
---
travis_time:start:test_codegen
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:05:09] 
[01:05:09] running 111 tests
[01:05:12] i..ii...iii.......i...i.........i..iii...........i.....i.....ii...i.i.ii..............i...ii..ii.i.. 100/111
[01:05:12] ..iiii.....
[01:05:12] 
[01:05:12]  finished in 3.610
[01:05:12] travis_fold:end:test_codegen

---
[01:42:07] ---- [ui] rustdoc-ui/private-item-doc-test.rs stdout ----
[01:42:07] 
[01:42:07] error: ui test compiled successfully!
[01:42:07] status: exit code: 0
[01:42:07] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "/checkout/src/test/rustdoc-ui/private-item-doc-test.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/private-item-doc-test/a" "-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/private-item-doc-test/auxiliary"
[01:42:07] ------------------------------------------
[01:42:07] 
[01:42:07] ------------------------------------------
[01:42:07] stderr:
---
[01:42:07] test result: FAILED. 8 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
[01:42:07] 
[01:42:07] 
[01:42:07] 
[01:42:07] 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-5.0/bin/FileCheck" "--host-rustcflags" "-Zunstable-options " "--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" "5.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:42:07] 
[01:42:07] 
[01:42:07] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:42:07] Build completed unsuccessfully in 0:55:35
[01:42:07] Build completed unsuccessfully in 0:55:35
[01:42:07] make: *** [check] Error 1
[01:42:07] Makefile:58: recipe for target 'check' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:2b2d66cc
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || 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 GuillaumeGomez force-pushed the GuillaumeGomez:private-item-doc-test-lint branch from f74822f to 8efde24 Oct 26, 2018

@GuillaumeGomez GuillaumeGomez changed the title from [WIP] lint if a private item has doctests to lint if a private item has doctests Oct 26, 2018

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Oct 26, 2018

Ready!

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:private-item-doc-test-lint branch from 8efde24 to 4e3771b Nov 1, 2018

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Nov 1, 2018

@petrochenkov Updated the lint name.

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:private-item-doc-test-lint branch from 4e3771b to 8740adb Nov 4, 2018

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Nov 4, 2018

Updated.

Show resolved Hide resolved src/librustdoc/passes/mod.rs Outdated
Show resolved Hide resolved src/librustdoc/passes/mod.rs Outdated

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:private-item-doc-test-lint branch from 8740adb to 18b2cb9 Nov 10, 2018

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Nov 11, 2018

Updated.

@QuietMisdreavus

Thanks again for writing this up! This looks good to me.

cx: &'a DocContext<'a, 'tcx, 'rcx, 'cstore>,
dox: &str,
item: &Item,
check_missing_code: bool,

This comment has been minimized.

@QuietMisdreavus

QuietMisdreavus Nov 15, 2018

Member

If we revisit this function, i'd like to replace this bool parameter with an enum that represents which check is occurring. It will make the callsite much easier to understand, IMO.

@QuietMisdreavus

This comment has been minimized.

Member

QuietMisdreavus commented Nov 15, 2018

@bors r+

@bors

This comment has been minimized.

Contributor

bors commented Nov 15, 2018

📌 Commit 18b2cb9 has been approved by QuietMisdreavus

@bors

This comment has been minimized.

Contributor

bors commented Nov 15, 2018

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

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:private-item-doc-test-lint branch from 18b2cb9 to 675319e Nov 16, 2018

@TimNN

This comment has been minimized.

Contributor

TimNN commented Nov 20, 2018

Ping from triage @QuietMisdreavus: It looks like this PR has been rebased and is ready for your review again.

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Nov 20, 2018

Ah my bad, forgot to re-r+ (didn't change anything so shouldn't require additional review).

@bors: r=QuietMisdreavus

@bors

This comment has been minimized.

Contributor

bors commented Nov 20, 2018

📌 Commit 675319e has been approved by QuietMisdreavus

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 22, 2018

Rollup merge of rust-lang#55367 - GuillaumeGomez:private-item-doc-tes…
…t-lint, r=QuietMisdreavus

lint if a private item has doctests

Fixes rust-lang#55333.

r? @QuietMisdreavus

bors added a commit that referenced this pull request Nov 22, 2018

Auto merge of #56155 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 11 pull requests

Successful merges:

 - #55367 (lint if a private item has doctests)
 - #55485 (Return &T / &mut T in ManuallyDrop Deref(Mut) impl)
 - #55784 (Clarifying documentation for collections::hash_map::Entry::or_insert)
 - #55961 (Fix VecDeque pretty-printer)
 - #55980 (Suggest on closure args count mismatching with pipe span)
 - #56002 (fix #55972: Erroneous self arguments on bare functions emit subpar compilation error)
 - #56063 (Update any.rs documentation using keyword dyn)
 - #56067 (Add SGX target to rustc)
 - #56078 (Fix error message for `-C panic=xxx`.)
 - #56106 (Remove some incorrect doc comments)
 - #56126 (core/benches/num: Add `from_str/from_str_radix()` benchmarks)

Failed merges:

r? @ghost

@bors bors merged commit 675319e into rust-lang:master Nov 22, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@GuillaumeGomez GuillaumeGomez deleted the GuillaumeGomez:private-item-doc-test-lint branch Nov 22, 2018

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