-
Notifications
You must be signed in to change notification settings - Fork 643
Link to docs.rs if no documentation is provided #506
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
Conversation
This does not update https://crates.io/crates/url/docs ; I'm not sure if it should. |
I think this has the same problems as #459, namely that:
|
Hi Carol. I actually asked you about this but didn't get a reply. I can provide built info with a CORS header so crates.io can check if a doc successfully built or not. |
@onur that would be great, thanks! |
Docs.rs will provide build as json from following URL: `https://docs.rs/crate/<CRATE_NAME>/<CRATE_VERSION>/builds.json`. A get request to this URL will return a list of build attempts. First object in this list will always contain latest build attempt. This object will contain following fields: Example output of `https://docs.rs/crate/rand/0.3.15/builds.json`: ```json [ { "build_status":true, "build_time":"2016-12-29T10:10:49Z", "build_time_relative":"Dec 29, 2016", "cratesfyi_version":"cratesfyi 0.2.3 (eea831c 2016-12-29)", "id":1, "output":null, "rustc_version":"rustc 1.15.0-nightly (71c06a56a 2016-12-18)" } ] ``` `build_status` is `true` if docs.rs successfully built documentation of a crate and `false` if docs.rs failed to build or a crate doesn't have any documentation. This list will contain zero elements if requested crate doesn't exists in docs.rs. Fixes: #87 Ref: rust-lang/crates.io#459 Ref: rust-lang/crates.io#506
Docs.rs is providing build info as json from following URL now:
It is also sending A get request to this URL will return a list of build attempts. First Example output of https://docs.rs/crate/rand/0.3.15/builds.json: [
{
"build_status":true,
"build_time":"2016-12-29T10:10:49Z",
"build_time_relative":"Dec 29, 2016",
"cratesfyi_version":"cratesfyi 0.2.3 (eea831c 2016-12-29)",
"id":1,
"output":null,
"rustc_version":"rustc 1.15.0-nightly (71c06a56a 2016-12-18)"
}
]
This list will contain zero elements if requested crate doesn't exists |
/r/golang asked if we autolink to docs.rs, and we don't, but I think that's a really good idea!
I'm only touching UI code here so that the "default" docs.rs links don't filter down to the models and then the database.
r? @steveklabnik @wycats @carols10cents