Skip to content

Commit 8fb6dce

Browse files
committed
reset caching of STDLIBs reading after precompilation is done (#4148)
(cherry picked from commit 834c62d)
1 parent 7aeec76 commit 8fb6dce

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Pkg.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,5 +869,6 @@ include("precompile.jl")
869869
DEFAULT_IO[] = nothing
870870
Pkg.UPDATED_REGISTRY_THIS_SESSION[] = false
871871
PREV_ENV_PATH[] = ""
872+
Types.STDLIB[] = nothing
872873

873874
end # module

src/Types.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ is_project_uuid(env::EnvCache, uuid::UUID) = project_uuid(env) == uuid
471471

472472
const UPGRADABLE_STDLIBS = ["DelimitedFiles", "Statistics"]
473473
const UPGRADABLE_STDLIBS_UUIDS = Set{UUID}()
474-
const STDLIB = Ref{DictStdLibs}()
474+
const STDLIB = Ref{Union{DictStdLibs, Nothing}}(nothing)
475475
function load_stdlib()
476476
stdlib = DictStdLibs()
477477
for name in readdir(stdlib_dir())
@@ -500,7 +500,7 @@ function stdlibs()
500500
return Dict(uuid => (info.name, info.version) for (uuid, info) in stdlib_infos())
501501
end
502502
function stdlib_infos()
503-
if !isassigned(STDLIB)
503+
if STDLIB[] === nothing
504504
STDLIB[] = load_stdlib()
505505
end
506506
return STDLIB[]

0 commit comments

Comments
 (0)