@@ -485,12 +485,17 @@ function explicit_project_deps_get(project_file::String, name::String)::Union{No
485
485
return nothing
486
486
end
487
487
488
+ # handles returning deps list for both old and new manifest formats
489
+ # if no `deps` field, then its either the older flat format or empty, so return self
490
+ get_deps (d) = get (d, " deps" , d)
491
+
488
492
# find `where` stanza and return the PkgId for `name`
489
493
# return `nothing` if it did not find `where` (indicating caller should continue searching)
490
494
function explicit_manifest_deps_get (project_file:: String , where :: UUID , name:: String ):: Union{Nothing,PkgId}
491
495
manifest_file = project_file_manifest_path (project_file)
492
496
manifest_file === nothing && return nothing # manifest not found--keep searching LOAD_PATH
493
- d = parsed_toml (manifest_file)
497
+ d = get_deps (parsed_toml (manifest_file))
498
+ d === nothing && return nothing
494
499
found_where = false
495
500
found_name = false
496
501
for (dep_name, entries) in d
@@ -538,7 +543,8 @@ function explicit_manifest_uuid_path(project_file::String, pkg::PkgId)::Union{No
538
543
manifest_file = project_file_manifest_path (project_file)
539
544
manifest_file === nothing && return nothing # no manifest, skip env
540
545
541
- d = parsed_toml (manifest_file)
546
+ d = get_deps (parsed_toml (manifest_file))
547
+ d === nothing && return nothing
542
548
entries = get (d, pkg. name, nothing ):: Union{Nothing, Vector{Any}}
543
549
entries === nothing && return nothing # TODO : allow name to mismatch?
544
550
for entry in entries
0 commit comments