Skip to content

Commit 7c0f926

Browse files
IanButterworthgiordano
authored andcommitted
disable auto-precompilation on Pkg.add
1 parent 25ff309 commit 7c0f926

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/Prefix.jl

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -617,14 +617,18 @@ end
617617

618618
# Helper function to install packages also in Julia v1.8
619619
function Pkg_add(args...; kwargs...)
620-
@static if VERSION < v"1.8.0"
621-
Pkg.add(args...; kwargs...)
622-
else
623-
try
624-
Pkg.respect_sysimage_versions(false)
620+
# we don't want to precompile packages during installation
621+
# auto-precompilation also calls `Pkg.instantiate` which will warn about non-VERSION `julia_version` values
622+
withenv("JULIA_PKG_PRECOMPILE_AUTO" => "false") do
623+
@static if VERSION < v"1.8.0"
625624
Pkg.add(args...; kwargs...)
626-
finally
627-
Pkg.respect_sysimage_versions(true)
625+
else
626+
try
627+
Pkg.respect_sysimage_versions(false)
628+
Pkg.add(args...; kwargs...)
629+
finally
630+
Pkg.respect_sysimage_versions(true)
631+
end
628632
end
629633
end
630634
end

0 commit comments

Comments
 (0)