@@ -498,12 +498,27 @@ function explicit_project_deps_get(project_file::String, name::String)::Union{No
498
498
return nothing
499
499
end
500
500
501
+ # Handles returning deps list for both old and new manifest formats.
502
+ function get_deps (d)
503
+ if haskey (d, " manifest_format" )
504
+ if haskey (d, " deps" )
505
+ return d[" deps" ]
506
+ else
507
+ # if there are no deps, then the `deps` field isn't present so return an empty dict
508
+ return Dict {String, Any} ()
509
+ end
510
+ else
511
+ # older flat version manifest. Return the entire dict
512
+ return d
513
+ end
514
+ end
515
+
501
516
# find `where` stanza and return the PkgId for `name`
502
517
# return `nothing` if it did not find `where` (indicating caller should continue searching)
503
518
function explicit_manifest_deps_get (project_file:: String , where :: UUID , name:: String ):: Union{Nothing,PkgId}
504
519
manifest_file = project_file_manifest_path (project_file)
505
520
manifest_file === nothing && return nothing # manifest not found--keep searching LOAD_PATH
506
- d = parsed_toml (manifest_file)
521
+ d = get_deps ( parsed_toml (manifest_file) )
507
522
found_where = false
508
523
found_name = false
509
524
for (dep_name, entries) in d
@@ -551,7 +566,7 @@ function explicit_manifest_uuid_path(project_file::String, pkg::PkgId)::Union{No
551
566
manifest_file = project_file_manifest_path (project_file)
552
567
manifest_file === nothing && return nothing # no manifest, skip env
553
568
554
- d = parsed_toml (manifest_file)
569
+ d = get_deps ( parsed_toml (manifest_file) )
555
570
entries = get (d, pkg. name, nothing ):: Union{Nothing, Vector{Any}}
556
571
entries === nothing && return nothing # TODO : allow name to mismatch?
557
572
for entry in entries
0 commit comments