-
Notifications
You must be signed in to change notification settings - Fork 74
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
refactor file downloading #135
Comments
also: JuliaLang/julia#8148 |
I wrote my own basic downloader in World of Julia because I got tired of the shelling out overhead from |
I think for Base.download we'll have to focus on robust but possibly slow approaches. Unless perhaps "download for package management purposes" is a distinct operation that should be owned by BinDeps. However people probably don't want to remove |
How slow can shelling out possibly be compared to downloading something from the Internet? |
Also note that implementing downloading functionality in Julia requires the Requests package at least. Not sure we want all of that in Base Julia, although maybe it's fine, but that's what's entailed. |
I think long-term it'd be great to have pure-Julia Requests functionality, but there's a bit of a ways to go (native TLS, HttpParser, etc.). There have been some active discussions lately: https://github.com/JuliaWeb/Roadmap/issues |
Yes, that's out of scope for this issue. The point is that even within the world of downloaders that use external programs, there is too much fragmentation and duplication. |
@StefanKarpinski I think Requests reuses live connections. It's definitely a lot faster for the World of Julia use case of downloading many small files. But since this is out of scope I won't say any more. |
There are now >=3 implementations of
download
: one in Base, one in WinRPM, and one in BinDeps. They are all slightly different in unhelpful ways. This is bananas.Everything we know about how to download files should go in
Base.download
. That should support trying multiple methods, retrying, timeouts, etc. We need two basic versions, one that downloads to a file, and one that returns all the data (or a stream). BinDeps has a version that returns a command to run. That needs to go away, and it should instead return a closure that callsdownload
.see e.g. JuliaPackaging/WinRPM.jl#40
The text was updated successfully, but these errors were encountered: