-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pkg.gc
changes Base.loaded_modules
#56988
Comments
It's loading Pkg via the repl switch that's causing the effect, so it's a
|
The issue, as I understand it, is that |
Note that directly accessing |
Interestingly enough, (@v1.11) pkg>
julia> import Pluto
julia> length(Base.loaded_modules_order)
79
julia> length(Base.loaded_modules)
66 |
Issue
On Julia 1.11.2, I found an example where calling
Pkg.gc
before loading a package causes some packages to not show up inBase.loaded_modules
.Example
Here, I call
import Pluto
and I inspectvalues(Base.loaded_modules)
. If I didgc
beforeimport Pluto
, then 20 modules do not show up in the list...Normal – 68 modules
Details
With
Pkg.gc
before the import – 48 modulesDetails
The missing modules (e.g.
Dates
) are loaded and working:Explicitly calling
import Dates
adds it to the list:Environment
I created an empty env with
]add Pluto
.On Julia 1.10.7, I could not reproduce the issue.
Context
This is a reduced example from a weird bug I found today: Pluto mostly worked, but I was seeing a strange error where deserialization failed, because the Dates stdlib was not found in
Base.loaded_modules
:I eventually traced this bug back to the
Pkg.gc
that I did earlier today...The text was updated successfully, but these errors were encountered: