diff --git a/src/Prefix.jl b/src/Prefix.jl index 35ebe065..17859ff0 100644 --- a/src/Prefix.jl +++ b/src/Prefix.jl @@ -609,8 +609,7 @@ function setup_dependencies(prefix::Prefix, # Re-install stdlib dependencies, but this time with `julia_version = nothing` if !isempty(stdlib_pkgspecs) - #ctx = Pkg.Types.Context!(ctx; julia_version=nothing) - Pkg.add(ctx, stdlib_pkgspecs; julia_version=nothing) + Pkg.add(ctx, stdlib_pkgspecs; io=outs, julia_version=nothing) end # Load their Artifacts.toml files diff --git a/test/dependencies.jl b/test/dependencies.jl index bc4bfa5f..a483e94b 100644 --- a/test/dependencies.jl +++ b/test/dependencies.jl @@ -105,7 +105,7 @@ end end @testset "Setup" begin - @test BinaryBuilderBase.get_addable_spec("LLVM_jll", v"13.0.0+2") == + @test get_addable_spec("LLVM_jll", v"13.0.0+2") == PackageSpec( name="LLVM_jll", uuid="86de99a1-58d6-5da7-8064-bd56ce2e322c", @@ -134,6 +134,20 @@ end @test readdir(joinpath(destdir(dir, platform), "logs")) == [] end + # Make sure we can use `get_addable_spec` to work around + # https://github.com/JuliaLang/Pkg.jl/issues/2942 + with_temp_project() do dir + prefix = Prefix(dir) + spec = get_addable_spec("LibOSXUnwind_jll", v"0.0.6+1") + dependencies = [BuildDependency(spec)] + platform = Platform("x86_64", "macos"; julia_version="1.6.0") + @test setup_dependencies(prefix, getpkg.(dependencies), platform) isa Vector{String} broken=VERSION