@@ -133,10 +133,14 @@ function generate_wrapper_load(src_name, pkg_uuid, __source__)
133
133
# Helper function to parse triplets for us
134
134
$ (platform_parse_compat ())
135
135
function make_wrapper_dict (dir, x)
136
- return Dict (
137
- parse_wrapper_platform (basename (f)[1 : end - 3 ]) =>
138
- joinpath (dir, " wrappers" , f) for f in x
139
- )
136
+ # (1) make the Dict type inferrable
137
+ # (2) avoid creation of Generators so that we don't have to compile
138
+ # package-specific Generator-closures
139
+ d = Dict {Platform,String} ()
140
+ for f in x
141
+ d[parse_wrapper_platform (basename (f)[1 : end - 3 ])] = joinpath (dir, " wrappers" , f)
142
+ end
143
+ return d
140
144
end
141
145
142
146
# If it's a Dict, that means this is an AnyPlatform artifact, act accordingly:
@@ -145,7 +149,10 @@ function generate_wrapper_load(src_name, pkg_uuid, __source__)
145
149
else
146
150
# Otherwise, it's a Vector, and we must select the best platform
147
151
# First, find all wrappers on-disk, parse their platforms, and match:
148
- wrapper_files = filter (x -> endswith (x, " .jl" ), readdir (joinpath ($ (pkg_dir), " wrappers" )))
152
+ wrapper_files = String[]
153
+ for x in readdir (joinpath ($ (pkg_dir), " wrappers" ))
154
+ endswith (x, " .jl" ) && push! (wrapper_files, x) # avoid creation of Generators...
155
+ end
149
156
wrappers = make_wrapper_dict ($ (pkg_dir), wrapper_files)
150
157
for e in artifacts
151
158
platform = unpack_platform (e, $ (jll_name), artifacts_toml)
0 commit comments