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

Tracking issue for rustdoc --output-format=doctest command-line flag #134529

Open
2 tasks
GuillaumeGomez opened this issue Dec 19, 2024 · 1 comment
Open
2 tasks
Labels
A-doctests Area: Documentation tests, run by rustdoc A-rust-for-linux Relevant for the Rust-for-Linux project 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

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Dec 19, 2024

This option is needed by the Rust-for-Linux project. The goal is to allow them to extract doctests so they can modify them and run them however they want to simplify their testing pipeline.

Steps

Unresolved Questions

None currently.

@GuillaumeGomez GuillaumeGomez added 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. labels Dec 19, 2024
@ojeda
Copy link
Contributor

ojeda commented Dec 19, 2024

Thanks a lot!

@rustbot label A-rust-for-linux

@rustbot rustbot added the A-rust-for-linux Relevant for the Rust-for-Linux project label Dec 19, 2024
@fmease fmease added the A-doctests Area: Documentation tests, run by rustdoc label Dec 20, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 31, 2025
…=notriddle,aDotInTheVoid

[rustdoc] Add `--extract-doctests` command-line flag

Part of rust-lang#134529.

It was discussed with the Rust-for-Linux project recently that they needed a way to extract doctests so they can modify them and then run them more easily (look for "a way to extract doctests" [here](Rust-for-Linux/linux#2)).

For now, I output most of `ScrapedDoctest` fields in JSON format with `serde_json`. So it outputs the following information:

 * filename
 * line
 * langstr
 * text

cc `@ojeda`
r? `@notriddle`
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jan 31, 2025
Rollup merge of rust-lang#134531 - GuillaumeGomez:extract-doctests, r=notriddle,aDotInTheVoid

[rustdoc] Add `--extract-doctests` command-line flag

Part of rust-lang#134529.

It was discussed with the Rust-for-Linux project recently that they needed a way to extract doctests so they can modify them and then run them more easily (look for "a way to extract doctests" [here](Rust-for-Linux/linux#2)).

For now, I output most of `ScrapedDoctest` fields in JSON format with `serde_json`. So it outputs the following information:

 * filename
 * line
 * langstr
 * text

cc `@ojeda`
r? `@notriddle`
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this issue Feb 1, 2025
…e,aDotInTheVoid

[rustdoc] Add `--extract-doctests` command-line flag

Part of rust-lang/rust#134529.

It was discussed with the Rust-for-Linux project recently that they needed a way to extract doctests so they can modify them and then run them more easily (look for "a way to extract doctests" [here](Rust-for-Linux/linux#2)).

For now, I output most of `ScrapedDoctest` fields in JSON format with `serde_json`. So it outputs the following information:

 * filename
 * line
 * langstr
 * text

cc `@ojeda`
r? `@notriddle`
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Feb 1, 2025
…e,aDotInTheVoid

[rustdoc] Add `--extract-doctests` command-line flag

Part of rust-lang/rust#134529.

It was discussed with the Rust-for-Linux project recently that they needed a way to extract doctests so they can modify them and then run them more easily (look for "a way to extract doctests" [here](Rust-for-Linux/linux#2)).

For now, I output most of `ScrapedDoctest` fields in JSON format with `serde_json`. So it outputs the following information:

 * filename
 * line
 * langstr
 * text

cc `@ojeda`
r? `@notriddle`
@aDotInTheVoid aDotInTheVoid changed the title Tracking issue for rustdoc --extract-doctests command-line flag Tracking issue for rustdoc --output-format=doctest command-line flag Feb 1, 2025
jhpratt added a commit to jhpratt/rust that referenced this issue Feb 4, 2025
…iddle

rustdoc-book: Clean up section on `--output-format`

Followup to rust-lang#134531. Tracking issues rust-lang#76578 and rust-lang#134529 I guess.

r? `@GuillaumeGomez`
fmease added a commit to fmease/rust that referenced this issue Feb 5, 2025
…iddle

rustdoc-book: Clean up section on `--output-format`

Followup to rust-lang#134531. Tracking issues rust-lang#76578 and rust-lang#134529 I guess.

r? ``@GuillaumeGomez``
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Feb 5, 2025
Rollup merge of rust-lang#136405 - aDotInTheVoid:unstable-doc, r=notriddle

rustdoc-book: Clean up section on `--output-format`

Followup to rust-lang#134531. Tracking issues rust-lang#76578 and rust-lang#134529 I guess.

r? ``@GuillaumeGomez``
lnicola pushed a commit to lnicola/rust-analyzer that referenced this issue Feb 10, 2025
…e,aDotInTheVoid

[rustdoc] Add `--extract-doctests` command-line flag

Part of rust-lang/rust#134529.

It was discussed with the Rust-for-Linux project recently that they needed a way to extract doctests so they can modify them and then run them more easily (look for "a way to extract doctests" [here](Rust-for-Linux/linux#2)).

For now, I output most of `ScrapedDoctest` fields in JSON format with `serde_json`. So it outputs the following information:

 * filename
 * line
 * langstr
 * text

cc `@ojeda`
r? `@notriddle`
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 A-rust-for-linux Relevant for the Rust-for-Linux project 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

4 participants