-
Notifications
You must be signed in to change notification settings - Fork 212
Host --output-format json
files in addition to generated HTML
#1285
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
Comments
@deeprobin what kind of information would you need? docs.rs is just hosting some metadata and is serving the HTML files generated by |
Oh okay. Then it would be better if I open a issue in the rustdoc repository? I thought this was the right repository for this. |
Rustdoc has an in-progress JSON backend: rust-lang/rust#76578 There has been some very brief discussion of docs.rs generating and hosting these files along with the html. But at the moment I think it's quite buggy (e.g. rust-lang/rust#80664 is probably going to fail a large proportion of builds) and the format is unstable. I think it would make sense to wait a little longer till it has stabilized a bit more before we add it here (I know of at least a couple of users that are already building alternative renderers based on the json, which will hopefully drive it towards stabilization). |
--output-format json
files in addition to generated HTML
Any progress/updates on this? |
There are still open ICEs when generating the JSON (see this current discussion on zulip, rust-lang/rust#93518 is one of the fixes. When this is solved I believe we have to partially finish #795 so we have the additional spare capacity for running the additional builds. Of course on top of that the actual code change needs to be done. |
I don't think we should start hosting this until the JSON backend is stabilized. The output format is likely to change several more times before stabilization. |
yeah, also valid point, I only had in mind that we could find more ICEs when running it for docs, but the format changing could be annoying for users of the JSON |
there are some missing features before we deem the format stable enough: ( coming from @jyn514 )
|
next set of notes coming from the all-hands / rustweek: we can actually start building & hosting rustdoc json. about the implementation:
Normal rebuilds for the latest version of each crate would then also build & upload the rustdoc json. So after a couple of months of this being live, all latest versions have rustdoc json. There are some pending additions that will come later that will make it easier to link between json docs easier (notably: extend the information we provide in edit: don't forget, we have a separate JSON output per target to store. |
implementation notes from first codebase read:
structure on S3 bucket is currently:
and legacy locations before archive-storage
after each build we store the archive, and run For rustdoc JSON we preferably want a folder structure where we can later This means the best structure is probably a separate root: That also means every request to docs.rs for a rustdoc JSON file needs an |
@obi1kenobi following up on your request to be able to fetch old format versions, if we have them. With my approach from above you would be able to run parallel requests to:
using your list of supported format versions. You'll get either the file or a 404 then, the 404s also cached when I updated the cloudfront config then. Would that suffice for your use-case? ( perhaps I add the other parameters to the filename additionally to make it self consistent in your download directory) |
I need this to implement my own "doc"-frontend for me into a multi-page-application.
The text was updated successfully, but these errors were encountered: