REPLExt for Pkg no longer loads when loading a custom Pkg
On master:
~/JuliaPkgs/Pkg.jl
❯ julia +nightly --project -q
julia> VERSION
v"1.12.0-DEV.784"
julia> using Pkg
[ Info: Precompiling Pkg [44cfe95a-1eb2-52ea-b672-e2afdf69b78f] (cache misses: for different buildid (2), mismatched flags (2))
julia> pkg_ext = Base.PkgId(Base.uuid5(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "REPLExt"), "REPLExt")
REPLExt [e5eb5ef1-03cf-53a7-ae1d-5a66b08e832b]
julia> haskey(Base.loaded_modules, pkg_ext)
false
On 1.11.0-beta2:
julia> using Pkg
julia> pkg_ext = Base.PkgId(Base.uuid5(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "REPLExt"), "REPLExt")
REPLExt [e5eb5ef1-03cf-53a7-ae1d-5a66b08e832b]
julia> haskey(Base.loaded_modules, pkg_ext)
true
I do not think this seems to be an issue with a custom Pkg. (cf. #54906)
We might want to consider injecting REPL (and dependencies) into the visible running state (aka into explicit_loaded_modules, or remove that and use loaded_modules directly again instead), but that also has quite a number of other undesirable implications, which is why we don't do that anymore. The process now make a clean distinction between using a REPL and having REPL loaded, so if you want Pkg+REPL+REPLExt, then you need to make it explicit that you want using Pkg, REPL, and not just assume you can access the REPL as a side-effect of having loaded Pkg.
I believe this can be closed now that https://github.com/JuliaLang/julia/commit/08d229f4a7cb0c3ef5becddd1b3bc4f8f178b8e4 has been reverted?
Pkg is not in the sysimage so I don't know why that PR would have an effect on this.
Ah right. I forgot we made that change for 1.11
I think this is the require_stdlib thing that the ] key is bound to which won't load the extension of the currently active Pkg project.
For completeness, the only way it is possible load a custom Pkg in interactive mode currently is julia --project -ie "using Pkg, REPL"