Skip to content

Commit

Permalink
Use more internal Pkg.add api to bypass auto-registry-install
Browse files Browse the repository at this point in the history
Fixes #3940. HistoryicalStdlibVersions has no dependencies, so the registry should not be required to install it.
  • Loading branch information
Keno committed Jul 4, 2024
1 parent 04b96b2 commit 9c57ed4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9c57ed4

Please sign in to comment.