@@ -159,13 +159,8 @@ import .FakeTerminals.FakeTerminal
159159 end
160160
161161 dep8_path = git_init_package (tmp, joinpath (" packages" , " Dep8" ))
162- dep8_srcfile = joinpath (dep8_path, " src" , " Dep8.jl" )
163- function change_dep8 ()
164- # Modify the source to ensure it is recompiled
165- write (dep8_srcfile, read (dep8_srcfile, String) * " #" )
166- @info " updated Dep8.jl source file:" dep8_srcfile
167- println (read (dep8_srcfile, String))
168- end
162+ function clear_dep8_cache ()
163+ rm (joinpath (Pkg. depots1 (), " compiled" , " v$(VERSION . major) .$(VERSION . minor) " , " Dep8" ), force= true , recursive= true )
169164 @testset " delayed precompilation with do-syntax" begin
170165 iob = IOBuffer ()
171166 # Test that operations inside Pkg.precompile() do block don't trigger auto-precompilation
@@ -200,8 +195,10 @@ import .FakeTerminals.FakeTerminal
200195 @test ! occursin (" Precompiling" , String (take! (iob)))
201196
202197 # Manual precompile should still work
198+ @test Base. isprecompiled (Base. identify_package (" Dep8" )) == false
203199 Pkg. precompile (io= iob)
204200 @test occursin (" Precompiling" , String (take! (iob)))
201+ @test Base. isprecompiled (Base. identify_package (" Dep8" ))
205202
206203 # Re-enable autoprecompilation
207204 Pkg. autoprecompilation_enabled (true )
@@ -211,6 +208,7 @@ import .FakeTerminals.FakeTerminal
211208 Pkg. rm (" Dep8" , io= iob)
212209 change_dep8 ()
213210 Pkg. add (Pkg. PackageSpec (path= dep8_path), io= iob)
211+ @test Base. isprecompiled (Base. identify_package (" Dep8" ))
214212 @test occursin (" Precompiling" , String (take! (iob)))
215213
216214 finally
0 commit comments