@@ -43,12 +43,12 @@ function ExplicitEnv(envpath::String=Base.active_project())
43
43
44
44
# Collect all direct dependencies of the project
45
45
for key in [" deps" , " weakdeps" , " extras" ]
46
- for (name, _uuid:: String ) in get (Dict{String, Any}, project_d, key):: Dict{String, Any}
46
+ for (name, _uuid) in get (Dict{String, Any}, project_d, key):: Dict{String, Any}
47
47
v = key == " deps" ? project_deps :
48
48
key == " weakdeps" ? project_weakdeps :
49
49
key == " extras" ? project_extras :
50
50
error ()
51
- uuid = UUID (_uuid)
51
+ uuid = UUID (_uuid:: String )
52
52
v[name] = uuid
53
53
names[UUID (uuid)] = name
54
54
project_uuid_to_name[name] = UUID (uuid)
@@ -75,9 +75,11 @@ function ExplicitEnv(envpath::String=Base.active_project())
75
75
76
76
project_extensions = Dict {String, Vector{UUID}} ()
77
77
# Collect all extensions of the project
78
- for (name, triggers:: Union{String, Vector{String}} ) in get (Dict{String, Any}, project_d, " extensions" ):: Dict{String, Any}
78
+ for (name, triggers) in get (Dict{String, Any}, project_d, " extensions" ):: Dict{String, Any}
79
79
if triggers isa String
80
80
triggers = [triggers]
81
+ else
82
+ triggers = triggers:: Vector{String}
81
83
end
82
84
uuids = UUID[]
83
85
for trigger in triggers
@@ -107,8 +109,9 @@ function ExplicitEnv(envpath::String=Base.active_project())
107
109
sizehint! (name_to_uuid, length (manifest_d))
108
110
sizehint! (lookup_strategy, length (manifest_d))
109
111
110
- for (name, pkg_infos:: Vector{Any} ) in get_deps (manifest_d)
111
- for pkg_info:: Dict{String, Any} in pkg_infos
112
+ for (name, pkg_infos) in get_deps (manifest_d)
113
+ for pkg_info in pkg_infos:: Vector{Any}
114
+ pkg_info = pkg_info:: Dict{String, Any}
112
115
m_uuid = UUID (pkg_info[" uuid" ]:: String )
113
116
114
117
# If we have multiple packages with the same name we will overwrite things here
@@ -129,8 +132,8 @@ function ExplicitEnv(envpath::String=Base.active_project())
129
132
# Expanded format:
130
133
else
131
134
uuids = UUID[]
132
- for (name_dep, _dep_uuid:: String ) in deps_pkg
133
- dep_uuid = UUID (_dep_uuid)
135
+ for (name_dep, _dep_uuid) in deps_pkg
136
+ dep_uuid = UUID (_dep_uuid:: String )
134
137
push! (uuids, dep_uuid)
135
138
names[dep_uuid] = name_dep
136
139
end
@@ -140,9 +143,11 @@ function ExplicitEnv(envpath::String=Base.active_project())
140
143
141
144
# Extensions
142
145
deps_pkg = get (Dict{String, Any}, pkg_info, " extensions" ):: Dict{String, Any}
143
- for (ext, triggers:: Union{String, Vector{String}} ) in deps_pkg
146
+ for (ext, triggers) in deps_pkg
144
147
if triggers isa String
145
148
triggers = [triggers]
149
+ else
150
+ triggers = triggers:: Vector{String}
146
151
end
147
152
deps_pkg[ext] = triggers
148
153
end
0 commit comments