Skip to content

Commit c121344

Browse files
giordanostaticfloat
authored andcommitted
Avoid side effects when precompiling find_artifact_dir
With an explicit call to `find_artifact_dir()` we were actually fetching lazy artifacts during precompilation, which is typically undesired, besides hitting a bug in Downloads.jl in certain versions of Julia (up to 1.10.4) which causes the download of the artifact to hang. Instead, with `Base.precompile` we retain the caching of native code, without causing extra downloads during precompilation.
1 parent 183d162 commit c121344

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wrapper_generators.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ macro generate_wrapper_header(src_name)
1818
end
1919
end
2020
if ccall(:jl_generating_output, Cint, ()) == 1
21-
find_artifact_dir() # to precompile this into Pkgimage
21+
Base.precompile(find_artifact_dir, ()) # to precompile this into Pkgimage
2222
end
2323
end)
2424
end

0 commit comments

Comments
 (0)