-
Notifications
You must be signed in to change notification settings - Fork 86
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
Use HttpClient for downloads on Windows #365
Conversation
@StefanKarpinski you spent some quality time on figuring out the download story for Julia base lately, right? Does this here broadly make sense? |
Also, note to self: merge #364 first. |
@wolthom Is there a chance that you could also try this PR on your Windows machine? The idea here is that it doesn't rely on more Unixy env variables, but instead (hopefully) just uses the standard Windows system proxy configuration. |
@davidanthoff Sure. Just build the most recent commit to the 'win-httpclient' branch and see what happens? As a warning though: |
Yes, and then just try to do some
The general idea with this PR here is that it should pick up any Windows system configuration. My hope would be that if something like Microsoft Edge works on your machine, then this here should also work without any further configuration. |
@davidanthoff Quick update: Also, I got a compilation error because This this part of the code is currently being touched: |
Ah, thanks, missed that conditional compile when I merge
I wanted to get the native certificate story in before Juliacon, but then I found some info that made me wonder whether that is safe on Unix (essentially apparently Debian has outdated certificate lists by default) and then I ran out of time to really sort it out and thought that just sticking with the Mozialla cert list on Linux was the safe thing to do for now. The current plan is to change the Linux story here to bring it more in line with the Mac story, details at #363. |
Understood, thanks for the link! Not an expert on that topic, otherwise I'd love to help out. Also, thank you for the fantastic work on Regarding the linked issue: |
Ok, I'm merging this. I think this is essentially the best way to do downloads on Windows, in particular it seems pretty much the only way to correctly pick up system proxy configurations. Even libcurl still has that on the backlog :) I think that probably means we will have a more robust (or at least less configuration required) download story in Juliaup than in Downloads.jl and Pkg.jl on Windows. I'm not sure how useful that is, it probably means we will end up with folks that install Julia versions but not packages without further environment variable configuration, but presumably the right move would be that at some point Downloads.jl also picks up system proxy configuration on Windows, rather than relying on env vars. |
This completely drops the ureq dependency on Windows and instead uses https://docs.microsoft.com/en-us/uwp/api/windows.web.http.httpclient for all HTTP/download stuff.
The benefit of this is that we are getting all the default certificate and proxy handling that Windows has.
The downside is that this is Windows 10 and newer only. It might make sense to only use this in the Windows Store builds (they are Win 10 and newer by definition) and for the standalone installer use the previousl ureq download story.