fonsp / Pluto.jl

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

Pluto.run(notebook="notebook.jl") always causes "Updating registry" message #2721

Closed mgkuhn closed 9 months ago

mgkuhn commented 9 months ago

Each time I open a notebook (even a trivial one with just a single 1+1 cell) with

$ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.4 (2023-11-14)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> import Pluto

julia> Pluto.run(notebook="notebook.jl")
[ Info: Loading...
┌ Info: 
└ Opening http://localhost:1235/open?secret=AsAzWqQM&path=notebook.jl in your default browser... ~ have fun!
┌ Info: 
│ Press Ctrl+C in this terminal to stop Pluto
└ 
    Updating registry at `/local/scratch/mgk25/julia-depot/registries/General.toml`

I get this Updating registry at $(DEPOT_PATH[1])/registries/General.toml message, indicating that Pluto v0.19.32 (Linux x64) unnecessarily forces a registry update.

I don't get this if instead I start Pluto with

julia> Pluto.run()

and then open the same notebook interactively through the browser.

Generally: I wouldn't expect Pluto to try and update the registry if all the packages in the notebook's manifest are already installed, as in that case it shouldn't even have any need to consult the registry, right?

fonsp commented 9 months ago

You can read more about it here https://github.com/fonsp/Pluto.jl/pull/2075 and in our code:

https://github.com/fonsp/Pluto.jl/blob/6224601ec9cff159a865adefe48b80dbf9b2937a/src/webserver/WebServer.jl#L320-L325