-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Add -
(stdin) support in rustdoc
#124611
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
Add -
(stdin) support in rustdoc
#124611
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that's phenomenal! I have some small suggestions and questions.
Looks good overall but ofc, let's wait for the “rmake stdin” PR of yours that you mentioned. After that I'm gonna ping T-rustdoc and ask them for a FCP-merge.
Ofc, technically technically technically speaking this constitutes a breaking change but that's only theoretical in nature. On *nix systems, ppl can name their files # Create a file called `-`:
printf 'pub fn omg() {}' > -
# Yes, we've just created a file called `-`.
# On the command-line, run the following to see the output:
< -
# Now document our wonderful crate:
rustdoc - --crate-name dash
# Docs were generated:
"$BROWSER" ./doc/dash/index.html |
Hey there @rust-lang/rustdoc, I propose merging this1 after an FCP. This PR updates rustdoc's CLI to recognize the INPUT argument Motivation:
Maintenance Cost: Very low (next to zero) Potential Concerns:
Footnotes
|
I think we should land this, and I'm surprised this wasn't previously supported |
I'm also surprised it's not already there. Let's start the FCP then. @rfcbot fcp merge |
Team member @GuillaumeGomez has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
re alternatives: If someone is actually putting source code in a file named |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
Thanks everyone! @bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (bb97203): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (primary -4.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 667.741s -> 668.952s (0.18%) |
Thanks for this :) |
This PR adds support for the special
-
input which threats the input as coming from stdin instead of being a filepath.Doing this also makes
rustdoc
consistent withrustc
andeveryother tools. Full motivation.Fixes #123671
r? @fmease