From c0d54f5a18e217b3e0083e7dac102de2f3e449e7 Mon Sep 17 00:00:00 2001 From: Bart Janssens Date: Sun, 30 Jan 2022 00:11:55 +0100 Subject: [PATCH] Attempt to fix issue #2942 --- src/Operations.jl | 2 +- test/resolve.jl | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Operations.jl b/src/Operations.jl index 9bb6e5584d..4b1446f018 100644 --- a/src/Operations.jl +++ b/src/Operations.jl @@ -428,7 +428,7 @@ function deps_graph(env::EnvCache, registries::Vector{Registry.RegistryInstance} # unregistered stdlib we must special-case it here. This is further # complicated by the fact that we can ask this question relative to # a Julia version. - if is_unregistered_stdlib(uuid) || uuid_is_stdlib + if (is_unregistered_stdlib(uuid) || uuid_is_stdlib) && haskey(stdlibs(), uuid) path = Types.stdlib_path(stdlibs_for_julia_version[uuid][1]) proj_file = projectfile_path(path; strict=true) @assert proj_file !== nothing diff --git a/test/resolve.jl b/test/resolve.jl index af2e6ec421..570128e1a5 100644 --- a/test/resolve.jl +++ b/test/resolve.jl @@ -505,6 +505,11 @@ end mpfr = find_by_name(versions, "MPFR_jll") @test mpfr !== nothing @test mpfr.version.major == 4 && mpfr.version.minor == 0 + + # Test for issue #2942 + libjulia_jll = "libjulia_jll" + Pkg.add(Pkg.Types.Context(; julia_version = v"1.6"), [PackageSpec(; name = libjulia_jll)]) + @test isinstalled(libjulia_jll) end end