-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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: Fix generating documentation from json #32698
Conversation
`DefId` needs to be converted to a `String` so that we can use it as a key for a `Json::Object`.
When using a json source we sadly don't have any `CrateAnalysis` data.
Thanks for the PR @mitaa! I've actually been somewhat wary about fixing this in the past as I'm not sure if we want to actually export a JSON interface to rustdoc. It's likely to be highly brittle, undocumented, and not really suitable for most purposes. That being said, we should probably either make the decision to fix it or remove it altogether! This seems like as good a place as any to get the conversation started at least. cc @rust-lang/tools, thoughts on JSON documentation in rustdoc? Perhaps we should just rip it out? |
Do we know if anyone uses it? Or wants to use it? |
One reason I believe this comes up is that it's so prominently mentioned. The |
I'm in favor of just removing it. If somebody wants to produce better docs they will probably just write rustdoc 3. |
cc @cmr |
And thus the cycle repeats. All this has happened before, and all of it will happen again. On April 6, 2016 7:16:02 AM GMT+10:00, Brian Anderson notifications@github.com wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
We discussed this in the tools triage meeting today and the conclusion was that we probably just want to jettison this support for now. We can perhaps add it back later if need be but for now it's unstable enough and likely hasn't ever worked that it shouldn't break anything and we probably don't want to stabilize it. Would you be ok preparing a PR for that @mitaa? |
Sure! |
Personally i planned to use it as a base to see if I could make a better looking documentation, but the generated json is pretty complex anyway. I will look if i can make rustdoc generate clean xml. |
@UtherII yeah that was the theoretical purpose of the JSON, but 60% of the work in rustdoc is just taking this JSON and render it, so it wouldn't be an easy task adding an entirely new frontend unfortunately :( |
(for reference rust-lang#32698) fixes rust-lang#25108 r? @alexcrichton
rustdoc: Remove the json-{input, output} format (for reference #32698) fixes #25108 r? @alexcrichton
fixes #25108
r? @alexcrichton