From d2111ac730ad8b2582c4f498ae7b3d8f1b0a5586 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Mon, 28 May 2018 13:31:10 +0200 Subject: [PATCH] Pkg: fix precompile function (#27246) OldPkg puts OldPkg.dir into the LOAD_PATH which thus means OldPkg needs to be imported --- stdlib/Pkg/src/API.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/Pkg/src/API.jl b/stdlib/Pkg/src/API.jl index 7a5764859428a..3fd6f62528fa8 100644 --- a/stdlib/Pkg/src/API.jl +++ b/stdlib/Pkg/src/API.jl @@ -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)