-
Notifications
You must be signed in to change notification settings - Fork 212
Track when crates are yanked and handle yanked status better #739
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
cc @QuietMisdreavus :) |
0cea556
to
4c9a2e6
Compare
@@ -180,11 +183,11 @@ impl CrateDetails { | |||
description: rows.get(0).get(4), | |||
rustdoc_status: rows.get(0).get(11), | |||
target_name: rows.get(0).get(16), | |||
default_target: rows.get(0).get(25), | |||
default_target: rows.get(0).get(26), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh boy, we have some technical debt stacking up. Once this PR is in I think we should start think about getting things by name instead of by index: https://docs.rs/postgres/0.15.2/postgres/rows/struct.Row.html#method.get
src/web/rustdoc.rs
Outdated
use html5ever::tendril::TendrilSink; | ||
assert_success(path, web)?; | ||
let data = web.get(path).send()?.text()?; | ||
Ok(kuchiki::parse_html() | ||
.one(data) | ||
.select("form ul li .warn") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_platform_links
is pretty similar to this, do you think it's worth factoring out a html_select()
function?
a07a4e4
to
c6298d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/docbuilder/queue.rs
Outdated
.ok(); | ||
debug!("{}-{} yanked", krate.name, krate.version); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as #746 (comment)
assert_eq!( | ||
env.frontend().get("/crate/dummy").send()?.status(), | ||
StatusCode::NOT_FOUND | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert_eq!( | |
env.frontend().get("/crate/dummy").send()?.status(), | |
StatusCode::NOT_FOUND | |
); | |
assert_eq!( | |
env.frontend().get("/crate/dummy").send()?.status(), | |
StatusCode::NOT_FOUND | |
); | |
assert_eq!( | |
env.frontend().get("/dummy").send()?.status(), | |
StatusCode::NOT_FOUND | |
); |
Whoops, I misread the changes. You addressed both the comments I linked. |
Looks good once nits have been addressed. |
8e15b27
to
3f855ec
Compare
…link go direct to crate page on build failure
3f855ec
to
d51802c
Compare
I skipped 7a57350 from #322 to avoid any conflicts with #721, it may be useful to look into rebasing that too later.
fixes #112, #396
closes #322
Screenshots:
nav bar when viewing latest version and all versions are yanked:

nav bar when there's at least one non-yanked version, or viewing non-latest version of a fully yanked crate:

crate details page:

crate details version list:

crate details nav drop-down:
