Skip to content

Commit

Permalink
remove obsolete test
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Dec 6, 2024
1 parent dcea7a2 commit b21365e
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions test/api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,32 +167,6 @@ end
Pkg.precompile([Pkg.PackageSpec(name="Dep4"), Pkg.PackageSpec(name="NoVersion")])
@test !occursin("Precompiling", String(take!(iob))) # should be a no-op

ENV["JULIA_PKG_PRECOMPILE_AUTO"]=0
@info "Auto precompilation disabled"
Pkg.develop(Pkg.PackageSpec(path="packages/Dep5"))
Pkg.precompile(io=iob)
@test occursin("Precompiling", String(take!(iob)))
@test isempty(Pkg.API.pkgs_precompile_suspended)

ENV["JULIA_PKG_PRECOMPILE_AUTO"]=1
Pkg.develop(Pkg.PackageSpec(path="packages/BrokenDep"))
Pkg.build(io=iob) # should trigger auto-precomp and soft-error
@test occursin("Precompiling", String(take!(iob)))
broken_packages = Pkg.API.pkgs_precompile_suspended
@test length(broken_packages) == 1
Pkg.activate("newpath")
Pkg.precompile(io=iob)
@test !occursin("Precompiling", String(take!(iob))) # test that the previous precompile was a no-op
@test isempty(Pkg.API.pkgs_precompile_suspended)

Pkg.activate(".") # test that going back to the project restores suspension list
Pkg.update("BrokenDep", io=iob) # should trigger auto-precomp but do nothing due to error suspension
@test !occursin("Precompiling", String(take!(iob)))
@test length(Pkg.API.pkgs_precompile_suspended) == 1

@test_throws PkgError Pkg.precompile() # calling precompile should retry any suspended, and throw on errors
@test Pkg.API.pkgs_precompile_suspended == broken_packages

ptoml = joinpath("packages","BrokenDep","Project.toml")
lines = readlines(ptoml)
open(joinpath("packages","BrokenDep","src","BrokenDep.jl"), "w") do io
Expand Down

0 comments on commit b21365e

Please sign in to comment.