Skip to content

Commit 1f6320c

Browse files
vchuravyKristofferC
authored andcommitted
[Distributed] don't sidestep require logic (#26813)
1 parent 8c2c0bf commit 1f6320c

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

stdlib/Distributed/src/Distributed.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function _require_callback(mod::Base.PkgId)
7474
@sync for p in procs()
7575
p == 1 && continue
7676
@async remotecall_wait(p) do
77-
Base._require(mod)
77+
Base.require(mod)
7878
nothing
7979
end
8080
end

stdlib/Distributed/test/distributed_exec.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,23 @@ include(joinpath(Sys.BINDIR, "..", "share", "julia", "test", "testenv.jl"))
1818
addprocs_with_testenv(4)
1919
@test nprocs() == 5
2020

21+
# distributed loading of packages
22+
23+
# setup
24+
@everywhere begin
25+
old_act_proj = Base.ACTIVE_PROJECT[]
26+
pushfirst!(Base.LOAD_PATH, "@")
27+
Base.ACTIVE_PROJECT[] = joinpath(Sys.BINDIR, "..", "share", "julia", "test", "TestPkg")
28+
end
29+
30+
@everywhere using TestPkg
31+
@everywhere using TestPkg
32+
33+
@everywhere begin
34+
Base.ACTIVE_PROJECT[] = old_act_proj
35+
popfirst!(Base.LOAD_PATH)
36+
end
37+
2138
@everywhere using Test, Random, LinearAlgebra
2239

2340
id_me = myid()

0 commit comments

Comments
 (0)