Description
The following script works on Julia 1.8.4
using DelimitedFiles
temp = tempname()
open(temp, "w") do io
println(io, "1,2,3")
end
println(sum(readdlm(temp, ',', Int)))
Ideally it should work on all future Julia versions. In interactive use, once DelimitedFiles.jl
is no longer a stdlib, the user will be prompted to install the package at the REPL. In package use, it should already be in the environment. As a scripts without a Project.toml, IIUC, the plan is to make this fail with ERROR: ArgumentError: Package DelimitedFiles not found in current path.
.
An alternate proposal from @IanButterworth on slack is
for scripts, if the package name cannot be resolved, and its in a special list known to Julia of names that used to be stdlibs, then auto-install it and carry on
Much like the interactive REPL prompt, but install & warn rather than prompt.
EDIT to clarify: This would be backed by downloading and loading DelimitedFiles with Pkg, not by packaging DelimitedFiles with Julia.