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

rustdoc: Fix generating documentation from json #32698

Closed
wants to merge 3 commits into from

Conversation

mitaa
Copy link
Contributor

@mitaa mitaa commented Apr 3, 2016

`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
Copy link
Member

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
Copy link
Member

nrc commented Apr 4, 2016

Do we know if anyone uses it? Or wants to use it?

@alexcrichton
Copy link
Member

One reason I believe this comes up is that it's so prominently mentioned. The rustdoc -h page indicates that reading/writing json output is supported, and I suspect that some just try that out, see it doesn't work, and then submit a bug.

@brson
Copy link
Contributor

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
Copy link
Contributor

brson commented Apr 5, 2016

cc @cmr

@emberian
Copy link
Member

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 [email protected] wrote:

I'm in favor of just removing it. If somebody wants to produce better
docs they will probably just write rustdoc 3.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#32698 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@alexcrichton
Copy link
Member

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
Copy link
Contributor Author

mitaa commented Apr 6, 2016

Sure!

@mitaa mitaa closed this Apr 6, 2016
@mitaa mitaa deleted the rdoc-json branch April 6, 2016 07:22
@UtherII
Copy link

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
Copy link
Member

@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 :(

Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 8, 2016
bors added a commit that referenced this pull request Apr 9, 2016
rustdoc: Remove the json-{input, output} format

(for reference #32698)

fixes #25108

r? @alexcrichton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc --output-format json command seems broken
6 participants