Skip to content

Commit

Permalink
Use more internal Pkg.add api to bypass auto-registry-install (JuliaL…
Browse files Browse the repository at this point in the history
…ang#3941)

* Use more internal Pkg.add api to bypass auto-registry-install

Fixes JuliaLang#3940. HistoryicalStdlibVersions has no dependencies, so the registry should not be required to install it.

* fix hsv version

---------

Co-authored-by: Ian Butterworth <[email protected]>
  • Loading branch information
Keno and IanButterworth authored Jul 22, 2024
1 parent 6002a29 commit 6b43949
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 @@ -43,7 +43,15 @@ Logging.with_logger((islogging || Pkg.DEFAULT_IO[] == devnull) ? Logging.Console
iob = IOBuffer()
Pkg.activate(; temp = true)
try
Pkg.add(name="HistoricalStdlibVersions", version="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="5879c5f690795208481c60b904f4af4e8c1eeef8", #= version="2.0.0", =#
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 6b43949

Please sign in to comment.