-
Notifications
You must be signed in to change notification settings - Fork 900
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
Update download dependencies #1523
Conversation
pickfire
commented
Oct 8, 2018
•
edited
Loading
edited
- reqwest 0.9, fix Can't compile: Unable to detect OpenSSL version #1518
- hyper 0.12
- reqwest 0.9, fix rust-lang#1518 - hyper 0.12
callback(Event::DownloadContentLengthReceived(len.0 + resume_from))?; | ||
if let Some(len) = res.headers().get(header::CONTENT_LENGTH) { | ||
// TODO possible issues during unwrap? | ||
let len = len.to_str().unwrap().parse::<u64>().unwrap() + resume_from; |
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.
What is the purpose of converting the header to a string and back?
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.
len
is &reqwest::header::HeaderValue
(not u64
) there IIRC so I need to convert it to str
and then parse it as u64
.
Even though HeaderValue
have HttpTryFrom
but TryFrom
is nigthly so not usable.
I removing the extra to_str
but HeaderValue
does not implement parse
.
Maybe I might have missed something?
tl;dr: ignore this. Just hitting rust-lang/rust#55376 Changing just this line in file src/download/Cargo.toml (with a checked out rustup.rs (latest) commit being at 3abd097) -reqwest = { version = "0.8.4", optional = true }
+reqwest = { version = "0.9", optional = true } causes an ICE
Ah, it's already reported: rust-lang/rust#55376 |
I've just tested this PR and it fixes #1518 for me. some unrelated warnings though:
|
@xftroxgpx Yup, I am already planning to do those after this commit is merge. Still waiting for the pull request to be merged. And maybe reformat the project and reorganize some tests as well. |
Can we get this merged? Without it, rustup doesn't build on modern systems. |
Thanks for the PR, sorry for the delay in merging. Please note though that Rustup reviewers do not have much available bandwidth right not, so if anyone is keen on implementing more, please check that someone will be able to review it. (More info at https://internals.rust-lang.org/t/cargo-and-rustup-development) |
@nrc I understand that you guys don't have a lot of time right now but could you make a release with this fix? It's quite important because more and more distros will start offering OpenSSL 1.1 by default and then it just won't build. |
I'm planning to make a Rustup release in a couple of weeks time. I hope that is soon enough (because we don't have release trains, rustup releases are a fair bit of work and are somewhat risky). |