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

rustdoc: separate test collection from the main "clean"-ing pipeline. #37890

Merged
merged 3 commits into from
Nov 24, 2016

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Nov 20, 2016

While reusing the documentation "clean"-ing infrastructure for collecting code examples to test may have seemed appealing at some point, doing the same through a HIR visitor is barely any harder.
At the same time, supporting both "regular documentation" and "test collection" modes in rustdoc::clean has its cost, requiring any use of a TyCtxt to be speculative, and provide some sort of fallback.

This simplification is the first step towards bringing rustdoc closer to the compiler, and perhaps even unifying the "local crate" (based on the HIR AST) and "inlinined across crates" (based on crate metadata and typesystem information) implementations of rustdoc.

Sadly, not all possible changes to rustdoc will be uncontroversial, so I'm starting small with this patch.

@rust-highfive
Copy link
Collaborator

r? @steveklabnik

(rust_highfive has picked a reviewer for you, use r? to override)

@eddyb
Copy link
Member Author

eddyb commented Nov 20, 2016

cc @GuillaumeGomez

@GuillaumeGomez
Copy link
Member

Huge 👍 !

@eddyb
Copy link
Member Author

eddyb commented Nov 20, 2016

r? @nrc cc @rust-lang/tools

@rust-highfive rust-highfive assigned nrc and unassigned steveklabnik Nov 20, 2016
@alexcrichton
Copy link
Member

Sounds like a good change to me, there's tons of technical debt in rustdoc to be shed at this point

@nrc
Copy link
Member

nrc commented Nov 21, 2016

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 21, 2016

📌 Commit 60aa513 has been approved by nrc

@bors
Copy link
Contributor

bors commented Nov 21, 2016

⌛ Testing commit 60aa513 with merge 5940fe3...

@bors
Copy link
Contributor

bors commented Nov 21, 2016

💔 Test failed - auto-win-msvc-64-cargotest

@GuillaumeGomez
Copy link
Member

failures:

---- cyclic_dev_dep_doc_test stdout ----
	running `C:\bot\slave\auto-win-msvc-64-cargotest\build\obj\build\ct\cargo\target\debug\cargo test`
thread 'cyclic_dev_dep_doc_test' panicked at '
Expected: execs
    but: differences:
  6 - |running 1 test|
    + |running 0 tests|

  7 - |test _0 ... ok|
    + ||

  8 - ||
    + |test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured|

  9 - |test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured|
    + ||

 10 - ||
    +


other output:
`   Compiling foo v0.0.1 (file:///C:/bot/slave/auto-win-msvc-64-cargotest/build/obj/build/ct/cargo/target/cit/t14/foo)
   Compiling bar v0.0.1 (file:///C:/bot/slave/auto-win-msvc-64-cargotest/build/obj/build/ct/cargo/target/cit/t14/foo/bar)
    Finished debug [unoptimized + debuginfo] target(s) in 1.3 secs
     Running target\debug\deps\foo-6688213a3cfc5207.exe
   Doc-tests foo
`', C:/msys64/slave/auto-win-msvc-64-cargotest/cargo-home\registry\src\github.com-1ecc6299db9ec823\hamcrest-0.1.1\src\core.rs:31
note: Run with `RUST_BACKTRACE=1` for a backtrace.


failures:
    cyclic_dev_dep_doc_test

test result: FAILED. 54 passed; 1 failed; 0 ignored; 0 measured



command did not execute successfully: "C:\\bot\\slave\\auto-win-msvc-64-cargotest\\build\\obj\\build\\x86_64-pc-windows-msvc\\stage2-tools\\x86_64-pc-windows-msvc\\release\\cargotest.exe" "C:\\bot\\slave\\auto-win-msvc-64-cargotest\\build\\obj\\build\\x86_64-pc-windows-msvc\\stage0/bin\\cargo.exe" "C:\\bot\\slave\\auto-win-msvc-64-cargotest\\build\\obj\\build\\ct"
expected success, got: exit code: 101

@eddyb
Copy link
Member Author

eddyb commented Nov 21, 2016

@alexcrichton Should the PR Travis builds include cargotest?

@alexcrichton
Copy link
Member

@eddyb yeah once we start gating on travis I'd like to look into PR test coverage

@eddyb
Copy link
Member Author

eddyb commented Nov 23, 2016

@bors r=nrc

@bors
Copy link
Contributor

bors commented Nov 23, 2016

📌 Commit e7264d0 has been approved by nrc

@bors
Copy link
Contributor

bors commented Nov 23, 2016

⌛ Testing commit e7264d0 with merge d6d8d70...

@bors
Copy link
Contributor

bors commented Nov 23, 2016

💔 Test failed - auto-win-gnu-32-opt-rustbuild

@eddyb eddyb force-pushed the rustdoc-1 branch 3 times, most recently from 084a3c9 to 1c5a529 Compare November 23, 2016 22:38
@eddyb
Copy link
Member Author

eddyb commented Nov 24, 2016

Travis passed but the OSX builds are broken. @bors r=nrc

@bors
Copy link
Contributor

bors commented Nov 24, 2016

📌 Commit 4be7786 has been approved by nrc

@bors
Copy link
Contributor

bors commented Nov 24, 2016

⌛ Testing commit 4be7786 with merge 29abe6f...

bors added a commit that referenced this pull request Nov 24, 2016
rustdoc: separate test collection from the main "clean"-ing pipeline.

While reusing the documentation "clean"-ing infrastructure for collecting code examples to test may have seemed appealing at some point, doing the same through a HIR visitor is barely any harder.
At the same time, supporting both "regular documentation" and "test collection" modes in `rustdoc::clean` has its cost, requiring any use of a `TyCtxt` to be speculative, and provide some sort of fallback.

This simplification is the first step towards bringing rustdoc closer to the compiler, and perhaps even unifying the "local crate" (based on the HIR AST) and "inlinined across crates" (based on crate metadata and typesystem information) implementations of rustdoc.

Sadly, not all possible changes to rustdoc will be uncontroversial, so I'm starting small with this patch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants