Uh oh!
There was an error while loading. Please reload this page.
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.
alexcrichton
commented
Apr 4, 2016
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? |
nrc
commented
Apr 4, 2016
Do we know if anyone uses it? Or wants to use it? |
alexcrichton
commented
Apr 4, 2016
One reason I believe this comes up is that it's so prominently mentioned. The |
brson
commented
Apr 5, 2016
I'm in favor of just removing it. If somebody wants to produce better docs they will probably just write rustdoc 3. |
brson
commented
Apr 5, 2016
cc @cmr |
emberian
commented
Apr 5, 2016
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. |
alexcrichton
commented
Apr 5, 2016
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? |
mitaa
commented
Apr 6, 2016
Sure! |
UtherII
commented
Apr 6, 2016
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. |
alexcrichton
commented
Apr 6, 2016
@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 :( |
rustdoc: Remove the json-{input, output} format
(for reference #32698)
fixes#25108
r? @alexcrichton
fixes#25108
r? @alexcrichton