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

lint if a private item has doctests #55367

Merged
merged 1 commit into from
Nov 22, 2018

Conversation

GuillaumeGomez
Copy link
Member

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 25, 2018
@rust-highfive
Copy link
Collaborator

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 changed the title [WIP] lint if a private item has doctests lint if a private item has doctests Oct 26, 2018
@GuillaumeGomez
Copy link
Member Author

Ready!

@GuillaumeGomez
Copy link
Member Author

@petrochenkov Updated the lint name.

@GuillaumeGomez
Copy link
Member Author

Updated.

src/librustdoc/passes/mod.rs Outdated Show resolved Hide resolved
src/librustdoc/passes/mod.rs Outdated Show resolved Hide resolved
@GuillaumeGomez
Copy link
Member Author

Updated.

Copy link
Member

@QuietMisdreavus QuietMisdreavus left a comment

Choose a reason for hiding this comment

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

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,
Copy link
Member

Choose a reason for hiding this comment

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

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
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 15, 2018

📌 Commit 18b2cb9cca9b0b337a98130d6292938be379708d has been approved by QuietMisdreavus

@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 Nov 15, 2018
@bors
Copy link
Contributor

bors commented Nov 15, 2018

☔ The latest upstream changes (presumably #55974) 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 Nov 15, 2018
@TimNN TimNN added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 20, 2018
@TimNN
Copy link
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
Copy link
Member Author

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

@bors: r=QuietMisdreavus

@bors
Copy link
Contributor

bors commented Nov 20, 2018

📌 Commit 675319e has been approved by QuietMisdreavus

@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 Nov 20, 2018
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 22, 2018
…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
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
@GuillaumeGomez GuillaumeGomez deleted the private-item-doc-test-lint branch November 22, 2018 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants