@@ -865,7 +865,11 @@ function explicit_manifest_uuid_path(project_file::String, pkg::PkgId)::Union{No
865865 uuid = get (entry, " uuid" , nothing ):: Union{Nothing, String}
866866 extensions = get (entry, " extensions" , nothing ):: Union{Nothing, Dict{String, Any}}
867867 if extensions != = nothing && haskey (extensions, pkg. name) && uuid != = nothing && uuid5 (UUID (uuid), pkg. name) == pkg. uuid
868- p = normpath (dirname (locate_package (PkgId (UUID (uuid), name))), " .." )
868+ parent_path = locate_package (PkgId (UUID (uuid), name))
869+ if parent_path === nothing
870+ error (" failed to find source of parent package: \" $name \" " )
871+ end
872+ p = normpath (dirname (parent_path), " .." )
869873 extfiledir = joinpath (p, " ext" , pkg. name, pkg. name * " .jl" )
870874 isfile (extfiledir) && return extfiledir
871875 return joinpath (p, " ext" , pkg. name * " .jl" )
@@ -1138,10 +1142,10 @@ function insert_extension_triggers(env::String, pkg::PkgId)::Union{Nothing,Missi
11381142 dep_name in weakdeps || continue
11391143 entries:: Vector{Any}
11401144 if length (entries) != 1
1141- error (" expected a single entry for $(repr (name )) in $(repr (project_file)) " )
1145+ error (" expected a single entry for $(repr (dep_name )) in $(repr (project_file)) " )
11421146 end
11431147 entry = first (entries):: Dict{String, Any}
1144- uuid = get ( entry, " uuid" , nothing ) :: Union{ String, Nothing}
1148+ uuid = entry[ " uuid" ] :: String
11451149 d_weakdeps[dep_name] = uuid
11461150 end
11471151 @assert length (d_weakdeps) == length (weakdeps)
@@ -1247,7 +1251,7 @@ function _tryrequire_from_serialized(modkey::PkgId, build_id::UInt128)
12471251 loading = get (package_locks, modkey, false )
12481252 if loading != = false
12491253 # load already in progress for this module
1250- loaded = wait (loading)
1254+ loaded = wait (loading:: Threads.Condition )
12511255 else
12521256 package_locks[modkey] = Threads. Condition (require_lock)
12531257 try
@@ -1282,7 +1286,7 @@ function _tryrequire_from_serialized(modkey::PkgId, path::String, ocachepath::Un
12821286 loading = get (package_locks, modkey, false )
12831287 if loading != = false
12841288 # load already in progress for this module
1285- loaded = wait (loading)
1289+ loaded = wait (loading:: Threads.Condition )
12861290 else
12871291 for i in 1 : length (depmods)
12881292 dep = depmods[i]
@@ -1324,7 +1328,7 @@ function _tryrequire_from_serialized(pkg::PkgId, path::String, ocachepath::Union
13241328 pkgimage = ! isempty (clone_targets)
13251329 if pkgimage
13261330 ocachepath != = nothing || return ArgumentError (" Expected ocachepath to be provided" )
1327- isfile (ocachepath) || return ArgumentError (" Ocachepath $ocachpath is not a file." )
1331+ isfile (ocachepath) || return ArgumentError (" Ocachepath $ocachepath is not a file." )
13281332 ocachepath == ocachefile_from_cachefile (path) || return ArgumentError (" $ocachepath is not the expected ocachefile" )
13291333 # TODO : Check for valid clone_targets?
13301334 isvalid_pkgimage_crc (io, ocachepath) || return ArgumentError (" Invalid checksum in cache file $ocachepath ." )
@@ -1404,13 +1408,13 @@ end
14041408 staledeps = true
14051409 break
14061410 end
1407- staledeps[i] = dep
1411+ ( staledeps:: Vector{Any} ) [i] = dep
14081412 end
14091413 if staledeps === true
14101414 ocachefile = nothing
14111415 continue
14121416 end
1413- restored = _include_from_serialized (pkg, path_to_try, ocachefile, staledeps)
1417+ restored = _include_from_serialized (pkg, path_to_try, ocachefile:: String , staledeps:: Vector{Any} )
14141418 if ! isa (restored, Module)
14151419 @debug " Deserialization checks failed while attempting to load cache from $path_to_try " exception= restored
14161420 else
@@ -1667,7 +1671,7 @@ function _require(pkg::PkgId, env=nothing)
16671671 loading = get (package_locks, pkg, false )
16681672 if loading != = false
16691673 # load already in progress for this module
1670- return wait (loading)
1674+ return wait (loading:: Threads.Condition )
16711675 end
16721676 package_locks[pkg] = Threads. Condition (require_lock)
16731677
@@ -2160,12 +2164,12 @@ function compilecache(pkg::PkgId, path::String, internal_stderr::IO = stderr, in
21602164 rename (tmppath_so, ocachefile:: String ; force= true )
21612165 catch e
21622166 e isa IOError || rethrow ()
2163- isfile (ocachefile) || rethrow ()
2167+ isfile (ocachefile:: String ) || rethrow ()
21642168 # Windows prevents renaming a file that is in use so if there is a Julia session started
21652169 # with a package image loaded, we cannot rename that file.
21662170 # The code belows append a `_i` to the name of the cache file where `i` is the smallest number such that
21672171 # that cache file does not exist.
2168- ocachename, ocacheext = splitext (ocachefile)
2172+ ocachename, ocacheext = splitext (ocachefile:: String )
21692173 old_cachefiles = Set (readdir (cachepath))
21702174 num = 1
21712175 while true
@@ -2185,7 +2189,7 @@ function compilecache(pkg::PkgId, path::String, internal_stderr::IO = stderr, in
21852189 finally
21862190 rm (tmppath, force= true )
21872191 if cache_objects
2188- rm (tmppath_o, force= true )
2192+ rm (tmppath_o:: String , force= true )
21892193 rm (tmppath_so, force= true )
21902194 end
21912195 end
0 commit comments