Skip to content

Commit b6005c1

Browse files
remove loading fallback
1 parent 68503ee commit b6005c1

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

base/loading.jl

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -960,9 +960,6 @@ end
960960
# require always works in Main scope and loads files from node 1
961961
const toplevel_load = Ref(true)
962962

963-
const full_warning_showed = Ref(false)
964-
const modules_warned_for = Set{PkgId}()
965-
966963
"""
967964
require(into::Module, module::Symbol)
968965
@@ -1008,28 +1005,14 @@ function require(into::Module, mod::Symbol)
10081005
Package $mod not found in current path$hint_message.
10091006
- $start_sentence `import Pkg; Pkg.add($(repr(String(mod))))` to install the $mod package."""))
10101007
else
1011-
s = """
1008+
throw(ArgumentError("""
10121009
Package $(where.name) does not have $mod in its dependencies:
10131010
- You may have a partially installed environment. Try `Pkg.instantiate()`
10141011
to ensure all packages in the environment are installed.
10151012
- Or, if you have $(where.name) checked out for development and have
10161013
added $mod as a dependency but haven't updated your primary
10171014
environment's manifest file, try `Pkg.resolve()`.
1018-
- Otherwise you may need to report an issue with $(where.name)"""
1019-
1020-
uuidkey = identify_package(PkgId(string(into)), String(mod))
1021-
uuidkey === nothing && throw(ArgumentError(s))
1022-
1023-
# fall back to toplevel loading with a warning
1024-
if !(where in modules_warned_for)
1025-
@warn string(
1026-
full_warning_showed[] ? "" : s, "\n",
1027-
string("Loading $(mod) into $(where.name) from project dependency, ",
1028-
"future warnings for $(where.name) are suppressed.")
1029-
) _module = nothing _file = nothing _group = nothing
1030-
push!(modules_warned_for, where)
1031-
end
1032-
full_warning_showed[] = true
1015+
- Otherwise you may need to report an issue with $(where.name)"""))
10331016
end
10341017
end
10351018
if _track_dependencies[]

0 commit comments

Comments
 (0)