fonsp / Pluto.jl

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

feat: avoid adding packages that exist in the sysimage #2832

Open pankgeorg opened 4 months ago

pankgeorg commented 4 months ago

Experimental. When someone is using a sysimage, using SysImageModule triggers a Pkg.add. This avoids that. I'm still testing if this is exactly what I have in mind; we probably need to do a special treatment that is similar to stdlibs too.

github-actions[bot] commented 4 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="pg/pkg-sysimage-handling")
  julia> using Pluto
fonsp commented 4 months ago

Don't you want to disable the package manager? Like this but not just for new notebooks? https://github.com/fonsp/Pluto.jl/pull/1631

pankgeorg commented 4 months ago

Don't you want to disable the package manager? Like this but not just for new notebooks? #1631

I think I don't, no. The Package Manager is amazing. There used to be some limitations (which I don't completely understand) that disallowed us from adding new packages and/or doing a correct resolve in the context of a sysimage. But that doesn't seem to be the case any more (1.10.2). We just need to stop the Package Manager from going crazy with packages in the sysimage, and let it do what it does best for the rest. I think this PR does that, but I haven't tested out thoroughly yet.