From 9c57ed44f4960bbf4ac888f89da060743c2234ec Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Thu, 4 Jul 2024 21:53:21 +0200 Subject: [PATCH] Use more internal Pkg.add api to bypass auto-registry-install Fixes #3940. HistoryicalStdlibVersions has no dependencies, so the registry should not be required to install it. --- test/runtests.jl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 0d6207d70a..637eabae2f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -42,7 +42,15 @@ Logging.with_logger((islogging || Pkg.DEFAULT_IO[] == devnull) ? Logging.Console iob = IOBuffer() Pkg.activate(; temp = true) try - Pkg.add(name="HistoricalStdlibVersions", version="1.2", uuid="6df8b67a-e8a0-4029-b4b7-ac196fe72102", io=iob) # Needed for custom julia version resolve tests + # Needed for custom julia version resolve tests + # Don't use the toplevel PKg.add() command to avoid accidentally installing another copy of the registry + spec = Pkg.PackageSpec( + name="HistoricalStdlibVersions", + url="https://github.com/JuliaPackaging/HistoricalStdlibVersions.jl", + rev="39d6ab6e71b614242976ab014635ac7ef039cb58", #= version="1.2", =# + uuid="6df8b67a-e8a0-4029-b4b7-ac196fe72102") + Pkg.API.handle_package_input!(spec) + Pkg.add(Pkg.API.Context(), [spec], io=iob) catch println(String(take!(iob))) rethrow()