Skip to content

Commit

Permalink
Pkg: fix precompile function (#27246)
Browse files Browse the repository at this point in the history
OldPkg puts OldPkg.dir into the LOAD_PATH which thus means OldPkg needs to be imported
  • Loading branch information
KristofferC authored May 28, 2018
1 parent 2603b57 commit d2111ac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions stdlib/Pkg/src/API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ function precompile(ctx::Context)
code = join(["import " * pkg for pkg in needs_to_be_precompiled], '\n') * "\nexit(0)"
for (i, pkg) in enumerate(needs_to_be_precompiled)
code = """
import OldPkg
empty!(Base.DEPOT_PATH)
append!(Base.DEPOT_PATH, $(repr(map(abspath, DEPOT_PATH))))
empty!(Base.DL_LOAD_PATH)
Expand Down

0 comments on commit d2111ac

Please sign in to comment.