Closed
Description
We currently export a download
function from Base for downloading files. It has some issues:
- it shells out to an external program, currently
wget
,curl
orfetch
on unix, or a PowerShell command on Windows. Since these utilities are not bundled with Julia, they can cause problems if they don't exist on the system or are otherwise misconfigured (New download implementation doesn't work on Win7 #26459, file testset fails unless curl is installed (0.6.0) #22783, RPATH issue with bundled CURL binary #17889) - it is fairly basic feature wise: e.g. it doesn't support:
- "silent" mode for hiding output (Adding support for silent option to download #15930)
- capturing of stdout/stderr
- consistent progress bar
- logging
- useful error codes/messages
- restarting terminated downloads
- the whole GitHub TLS mess
As a result, several packages implement their own functionality, notably BinDeps.jl, BinaryProvider.jl, and Pkg3.jl (pending JuliaLang/Pkg.jl#280). In fact, it doesn't appear to be currently used anywhere in Base or stdlib (it is mentioned in a couple of comments in the REPL code).
Some options:
- Move it to a stdlib package to make it easier to update, add features etc (at least it will once we have versioned stdlib packages).
- Add the functionality to HTTP.jl, and move that to stdlib. This would have the advantage of getting rid of the mish-mash of shell code we currently use (suggested in Add
Sys.which()
, use that to findcurl
indownload()
#26559 (comment)) - Get rid of it altogether.
Activity