diff --git a/src/PkgDeps.jl b/src/PkgDeps.jl index aa7fed7..c91ceee 100644 --- a/src/PkgDeps.jl +++ b/src/PkgDeps.jl @@ -21,7 +21,16 @@ const GENERAL_REGISTRY = "General" # borrowed from const stdlibs = isdefined(Pkg.Types, :stdlib) ? Pkg.Types.stdlib : Pkg.Types.stdlibs -const STDLIBS = stdlibs() +const STDLIBS = @static if VERSION >= v"1.8" + # As of v1.8, the dictionary that we get from Pkg maps the UUID of + # each standard library package to a (name, version) tuple. + Dict(uuid => name + for (uuid, (name, _)) in stdlibs()) +else + # In earlier versions, the dictionary maps the UUID of each + # standard library package to its name. + stdlibs() +end """