-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Outputting rustdoc JSON output to stdout instead of file when invoked via cargo #14672
Comments
@rustbot transfer cargo |
Additional flags passed to I haven't tried but There is an Cargo unstable feature output-format for rustdoc, which takes care of the rebuild detection better than raw
Note that flags specified in |
Due to the lack of |
Would you mind sharing why output final JSON files to stdout is important to your workflow, so that we can understand the use case and brainstorm possible solutions? |
I want to get the rustdoc info about a workspace into my executable for further processing. |
Thanks for sharing! If I understand, it is more convenient and predictable if such a flag is provided, but not a hard requirement blocking your development, right? In the meanwhile, I would suggest sticking with
You could also use the |
It's not clear to me what kind of further processing it is. I'd like to mention it again that the current unstable |
Right now it seems impossible to output the rustdoc JSON output to stdout when it's invoked via cargo, it can only output to a file.
E.g. this produces a JSON file:
One would expect that this would work to output to stdout
but unfortunately it doesn't. Instead it gives an error:
It would be nice if it was possible to output the whole rustdoc JSON output for a crate and all its deps to stdout instead of to a file 🙂
The text was updated successfully, but these errors were encountered: