JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
620 stars 260 forks source link

Only precompile Pkg.jl when generating output #3693

Closed mkitti closed 10 months ago

mkitti commented 10 months ago

Fix #3691 for real

We probably should also create a test

IanButterworth commented 10 months ago

It would be a lot clearer to just add an if, and not mess with the indenting (which is odd in this file)

if Base.generating_output()
    pkg_precompile()
end
IanButterworth commented 10 months ago

Please also edit PRs, not open another for changes.

mkitti commented 10 months ago

Sorry, I've been trying to do this on mobile between other activities. I will be at a computer shortly.

mkitti commented 10 months ago

The diff has been minimized

mkitti commented 10 months ago

@IanButterworth here is the 3 line patch