Skip to content

Commit

Permalink
[loading] Search in Sys.STDLIB if name/uuid is known.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fredrikekre committed Feb 8, 2021
1 parent e9e6eca commit b3610a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ function locate_package(pkg::PkgId)::Union{Nothing,String}
path = manifest_uuid_path(env, pkg)
path === nothing || return entry_path(path, pkg.name)
end
# Allow loading of stdlibs if the name/uuid are given
# e.g. if they have been explicitly added to the project/manifest
path = manifest_uuid_path(Sys.STDLIB::String, pkg)
path === nothing || return entry_path(path, pkg.name)
end
return nothing
end
Expand Down

0 comments on commit b3610a8

Please sign in to comment.