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: Tracking issue for --no-run #87022

Open
4 of 7 tasks
gilescope opened this issue Jul 10, 2021 · 5 comments
Open
4 of 7 tasks

rustdoc: Tracking issue for --no-run #87022

gilescope opened this issue Jul 10, 2021 · 5 comments
Labels
A-doctests Area: Documentation tests, run by rustdoc C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@gilescope
Copy link
Contributor

gilescope commented Jul 10, 2021

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps

Unresolved Questions

  • Is --no-run the right name?

Implementation history

original issue text

The cargo issue here rust-lang/cargo#6424 points out that we don't have a tracking issue on the librustdoc side for how we can make doc examples compile when we run cargo check --all-targets or cargo build --all-targets. By hook or by crook it would be great to remove this surprising edge case.

Also probably even more surprising cargo test --no-run also doesn't compile the doc tests.

Maybe we need a cargo test --sligtly-run-doctests?

@GuillaumeGomez GuillaumeGomez added A-doctests Area: Documentation tests, run by rustdoc T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 10, 2021
gilescope added a commit to gilescope/substrate that referenced this issue Jul 10, 2021
( Raised rust-lang/rust#87022 - cargo check should check these.)
@jyn514
Copy link
Member

jyn514 commented Jul 10, 2021

Also probably even more surprising cargo test --no-run also doesn't compile the doc tests.

This is unrelated to rustdoc. Cargo can do this with rustdoc --persist-doctests - although I think that might still run the tests? Hmm, that's worth looking into.

@jyn514 jyn514 changed the title rustdoc should enable examples to be cargo checked rustdoc should have an option for building doctests without running them Jul 10, 2021
@jyn514
Copy link
Member

jyn514 commented Jul 10, 2021

Oh look, this was already added but without a tracking issue 🤦 I'm going to repurpose this as the tracking issue if you don't mind. #83857

@jyn514 jyn514 changed the title rustdoc should have an option for building doctests without running them rustdoc: Tracking issue for --no-run Jul 10, 2021
@jyn514 jyn514 added the C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC label Jul 10, 2021
@gilescope
Copy link
Contributor Author

Please do :-) - Great sluthing btw. Ok so for nightly the cargo issue is unblocked and we should be able to now try and do this.

gilescope added a commit to gilescope/substrate that referenced this issue Jul 12, 2021
( Raised rust-lang/rust#87022 - cargo check should check these.)
gilescope added a commit to gilescope/substrate that referenced this issue Jul 16, 2021
( Raised rust-lang/rust#87022 - cargo check should check these.)
@jsgf
Copy link
Contributor

jsgf commented Aug 17, 2021

--no-run doesn't seem to be working as I'd expect: #88110

@tgross35
Copy link
Contributor

Are there any blockers to stabilizing this, aside from the naming choice?

For what it's worth on that, something like --build-only could be a better fit if it still produces binaries but just doesn't run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-doctests Area: Documentation tests, run by rustdoc C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
Status: No status
Development

No branches or pull requests

5 participants