Why a package (Pluto here) can precompile twice in `add` and `using`?

Here is the example. I just created an empty new environment. Then add Pluto to it, which triggered precompilation. The next command using Pluto triggered precompilation again.

Why this can happen? I’ve seen this sort of frequently with Plots.

(@v1.9) pkg> activate .
  Activating new project at `~/Drive/Palestras/2023_CellListMap`

(2023_CellListMap) pkg> add Pluto
   Resolving package versions...
    Updating `~/Drive/Palestras/2023_CellListMap/Project.toml`
  [c3e4b0f8] + Pluto v0.19.22
    Updating `~/Drive/Palestras/2023_CellListMap/Manifest.toml`
  [d1d4a3ce] + BitFlags v0.1.7
  [944b1d66] + CodecZlib v0.7.1

... many packages

  [3f19e933] + p7zip_jll v17.4.0+0
        Info Packages marked with βŒ… have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
Precompiling environment...
  10 dependencies successfully precompiled in 92 seconds. 26 already precompiled.
  1 dependency had warnings during precompilation:
β”Œ Pluto [c3e4b0f8-55cb-11ea-2926-15256bba5781]
β”‚  β”Œ Info: 
β”‚  β”‚ 
β”‚  β”‚     Welcome to Pluto v0.19.22 🎈
β”‚  β”‚     Start a notebook server using:
β”‚  β”‚ 
β”‚  β”‚   julia> Pluto.run()
β”‚  β”‚ 
β”‚  β”‚     Have a look at the FAQ:
β”‚  β”‚     https://github.com/fonsp/Pluto.jl/wiki
β”‚  β”” 
β””  

julia> using Pluto
[ Info: Precompiling Pluto [c3e4b0f8-55cb-11ea-2926-15256bba5781]
β”Œ Info: 
β”‚ 
β”‚     Welcome to Pluto v0.19.22 🎈
β”‚     Start a notebook server using:
β”‚ 
β”‚   julia> Pluto.run()
β”‚ 
β”‚     Have a look at the FAQ:
β”‚     https://github.com/fonsp/Pluto.jl/wiki
β”” 

julia> 
2 Likes