fonsp / Pluto.jl

🎈 Simple reactive notebooks for Julia
https://plutojl.org/
MIT License
4.91k stars 284 forks source link

Try to add already installed versions of packages with `Pkg.PRESERVE_ALL_INSTALLED` #2902

Closed fonsp closed 2 months ago

fonsp commented 2 months ago

Using https://github.com/JuliaLang/Pkg.jl/pull/3378

After this PR, when adding a package to your notebook, Pkg will try to add a version that is already installed on your computer. If nothing is available, a new version will be installed.

This should mean that you have a higher chance of skipping installation and precompilation when creating a new notebook and adding some packages that you also used a couple days ago.

If you want the latest versions, you will have to do an update right after adding the packages. This could be unintuitive, but I think it is worth the trade-off as a default, since currently there is much frustration about too-frequent installation and precompilation times.


Sorry for the delay! I was not aware of this change to Pkg until @KristofferC mentioned it to me today!

github-actions[bot] commented 2 months ago

Try this Pull Request!

Open Julia and type:

  julia> import Pkg
  julia> Pkg.activate(temp=true)
  julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="PRESERVE_ALL_INSTALLED")
  julia> using Pluto