File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1078,6 +1078,7 @@ const pkgorigins = Dict{PkgId,PkgOrigin}()
10781078
10791079require (uuidkey:: PkgId ) = @lock require_lock _require_prelocked (uuidkey)
10801080
1081+ const already_warned_path_change_pkgs = Set {String} ()
10811082function _require_prelocked (uuidkey:: PkgId )
10821083 just_loaded_pkg = false
10831084 if ! root_module_exists (uuidkey)
@@ -1093,6 +1094,15 @@ function _require_prelocked(uuidkey::PkgId)
10931094 error (" package `$(uuidkey. name) ` did not define the expected \
10941095 module `$(uuidkey. name) `, check for typos in package module name" )
10951096 end
1097+ pkgorig = get (pkgorigins, uuidkey, nothing )
1098+ new_path = locate_package (uuidkey)
1099+ if pkgorig. path != = nothing && ! samefile (pkgorig. path, new_path) && uuidkey. name ∉ already_warned_path_change_pkgs
1100+ @warn " Package $(uuidkey. name) already loaded from path $(repr (pkgorig. path)) , \
1101+ now attempted to be loaded from $(repr (new_path)) . This might indicate a \
1102+ change of environment between package loads and can mean that incompatible \
1103+ packages have been loaded."
1104+ push! (already_warned_path_change_pkgs, uuidkey. name)
1105+ end
10961106 return root_module (uuidkey)
10971107end
10981108
You can’t perform that action at this time.
0 commit comments