Skip to content

Commit

Permalink
pass LOAD_PATH to precompile/build/test children (fix #27993) (#28039)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski authored Jul 10, 2018
1 parent 90bdc77 commit 3791357
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 6 additions & 2 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1078,8 +1078,13 @@ function load_path_setup_code(load_path::Bool=true)
append!(empty!(Base.DL_LOAD_PATH), $(repr(map(abspath, DL_LOAD_PATH))))
"""
if load_path
load_path = map(abspath, Base.load_path())
path_sep = Sys.iswindows() ? ';' : ':'
any(path -> path_sep in path, load_path) &&
error("LOAD_PATH entries cannot contain $(repr(path_sep))")
code *= """
append!(empty!(Base.LOAD_PATH), $(repr(map(abspath, Base.load_path()))))
append!(empty!(Base.LOAD_PATH), $(repr(load_path)))
ENV["JULIA_LOAD_PATH"] = $(repr(join(load_path, Sys.iswindows() ? ';' : ':')))
Base.HOME_PROJECT[] = Base.ACTIVE_PROJECT[] = nothing
"""
end
Expand All @@ -1104,7 +1109,6 @@ function create_expr_cache(input::String, output::String, concrete_deps::typeof(
try
write(in, """
begin
import OldPkg
$(Base.load_path_setup_code())
Base._track_dependencies[] = true
empty!(Base._concrete_dependencies)
Expand Down
1 change: 0 additions & 1 deletion stdlib/Pkg/src/API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ 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
$(Base.load_path_setup_code())
import $pkg
"""
Expand Down

2 comments on commit 3791357

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

Please sign in to comment.