Skip to content

Commit 4d7cfb0

Browse files
committed
[loading] Search in Sys.STDLIB if name/uuid is known.
Locating a package with known uuid means the uuid was either found in a manifest in LOAD_PATH or a "package folder" in LOAD_PATH. However, this lookup fails for stdlibs that are not in the sysimage, even if they have been explicitly added to project/manifest by the user. This patch allows looking in Sys.STDLIB for stdlibs, fixes #39504.
1 parent 8458ca1 commit 4d7cfb0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

base/loading.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,10 @@ function locate_package(pkg::PkgId)::Union{Nothing,String}
290290
path = manifest_uuid_path(env, pkg)
291291
path === nothing || return entry_path(path, pkg.name)
292292
end
293+
# Allow loading of stdlibs if the name/uuid are given
294+
# e.g. if they have been explicitly added to the project/manifest
295+
path = manifest_uuid_path(Sys.STDLIB::String, pkg)
296+
path === nothing || return entry_path(path, pkg.name)
293297
end
294298
return nothing
295299
end

0 commit comments

Comments
 (0)