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

Projects
None yet
7 participants
@eddyb
Copy link
Member

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

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Nov 20, 2016

r? @steveklabnik

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

@eddyb

This comment has been minimized.

Copy link
Member Author

eddyb commented Nov 20, 2016

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Nov 20, 2016

Huge 👍 !

@eddyb

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

alexcrichton commented Nov 20, 2016

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

@nrc

This comment has been minimized.

Copy link
Member

nrc commented Nov 21, 2016

@bors: r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 21, 2016

📌 Commit 60aa513 has been approved by nrc

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 21, 2016

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

bors added a commit that referenced this pull request Nov 21, 2016

Auto merge of #37890 - eddyb:rustdoc-1, r=nrc
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.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 21, 2016

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

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Nov 21, 2016

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

This comment has been minimized.

Copy link
Member Author

eddyb commented Nov 21, 2016

@alexcrichton Should the PR Travis builds include cargotest?

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Nov 21, 2016

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

@eddyb eddyb force-pushed the eddyb:rustdoc-1 branch from 60aa513 to e7264d0 Nov 23, 2016

@eddyb

This comment has been minimized.

Copy link
Member Author

eddyb commented Nov 23, 2016

@bors r=nrc

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 23, 2016

📌 Commit e7264d0 has been approved by nrc

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 23, 2016

⌛️ Testing commit e7264d0 with merge d6d8d70...

bors added a commit that referenced this pull request Nov 23, 2016

Auto merge of #37890 - eddyb:rustdoc-1, r=nrc
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.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 23, 2016

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

@eddyb eddyb force-pushed the eddyb:rustdoc-1 branch 3 times, most recently from 084a3c9 to 1c5a529 Nov 23, 2016

@eddyb eddyb force-pushed the eddyb:rustdoc-1 branch from 1c5a529 to 4be7786 Nov 23, 2016

@eddyb

This comment has been minimized.

Copy link
Member Author

eddyb commented Nov 24, 2016

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

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 24, 2016

📌 Commit 4be7786 has been approved by nrc

@bors

This comment has been minimized.

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

Auto merge of #37890 - eddyb:rustdoc-1, r=nrc
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.

@bors bors merged commit 4be7786 into rust-lang:master Nov 24, 2016

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
homu Test successful
Details

@eddyb eddyb deleted the eddyb:rustdoc-1 branch Nov 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.