JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
609 stars 251 forks source link

Make `PRESERVE_TIERED_INSTALLED` the default #3905

Open IanButterworth opened 1 month ago

IanButterworth commented 1 month ago

Since PRESERVE_TIERED_INSTALLED was added to Pkg.add in 1.9 I've had it enabled as the default via the env var

JULIA_PKG_PRESERVE_TIERED_INSTALLED = true

and I've not seen any issues with getting stuck on older package versions, as was feared.

In short it tries harder to avoid updating packages that are already installed, to minimize installation and re-precompilation.

Given precompilation times have been increasing as precompilation workload coverage increases I think it would be good to make that the default behavior.

It'd be good to hear from others that have used that setting to see if there are any negatives identified.

fredrikekre commented 1 month ago

Xref https://github.com/JuliaLang/Pkg.jl/issues/3890#issuecomment-2100594526

jakobnissen commented 1 month ago

I have also set ENV["JULIA_PKG_PRESERVE_TIERED_INSTALLED"] = true in my startup.jl for ages - at least a year. and I haven't had any issues. Though to be fair, I do fairly frequently disable startup.jl when I'm developing packages. I agree this is a better default for most people.