Skip to content

Commit

Permalink
do not precompile packages that have opt out to precompilation
Browse files Browse the repository at this point in the history
(cherry picked from commit 57f7380a2641944be12695e92a3ad9f4cc20e6f2)
  • Loading branch information
KristofferC committed Sep 25, 2018
1 parent eb96811 commit 5829a40
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions stdlib/Pkg/src/API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,9 @@ function precompile(ctx::Context)
for pkg in pkgids
paths = Base.find_all_in_cache_path(pkg)
sourcepath = Base.locate_package(pkg)
if sourcepath == nothing
# XXX: this isn't supposed to be fatal
pkgerror("couldn't find path to $(pkg.name) when trying to precompile project")
end
sourcepath == nothing && continue
# Heuristic for when precompilation is disabled
occursin(r"\b__precompile__\(\s*false\s*\)", read(sourcepath, String)) && continue
stale = true
for path_to_try in paths::Vector{String}
staledeps = Base.stale_cachefile(sourcepath, path_to_try)
Expand Down

0 comments on commit 5829a40

Please sign in to comment.