-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Huge 👍 ! |
r? @nrc cc @rust-lang/tools |
Sounds like a good change to me, there's tons of technical debt in rustdoc to be shed at this point |
@bors: r+ |
📌 Commit 60aa513 has been approved by |
⌛ Testing commit 60aa513 with merge 5940fe3... |
💔 Test failed - auto-win-msvc-64-cargotest |
|
@alexcrichton Should the PR Travis builds include cargotest? |
@eddyb yeah once we start gating on travis I'd like to look into PR test coverage |
@bors r=nrc |
📌 Commit e7264d0 has been approved by |
⌛ Testing commit e7264d0 with merge d6d8d70... |
💔 Test failed - auto-win-gnu-32-opt-rustbuild |
084a3c9
to
1c5a529
Compare
Travis passed but the OSX builds are broken. @bors r=nrc |
📌 Commit 4be7786 has been approved by |
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.
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 aTyCtxt
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.