@@ -10,7 +10,7 @@ macro generate_wrapper_header(src_name)
1010 @static if isdir (joinpath (dirname ($ (pkg_dir)), " override" ))
1111 return joinpath (dirname ($ (pkg_dir)), " override" )
1212 elseif @isdefined (augment_platform!) && VERSION >= v " 1.6"
13- $ (Expr (:macrocall , Symbol (" @artifact_str" ), __source__, src_name, :( host_platform) ))
13+ $ (Expr (:macrocall , Symbol (" @artifact_str" ), __source__, src_name, __module__ . host_platform))
1414 else
1515 # We explicitly use `macrocall` here so that we can manually pass the `__source__`
1616 # argument, to avoid `@artifact_str` trying to lookup `Artifacts.toml` here.
@@ -30,17 +30,22 @@ macro generate_init_header(dependencies...)
3030 eager_mode = Expr[]
3131 if ! isempty (dependencies)
3232 for dep in dependencies
33- push! (deps_path_add, quote
34- isdefined ($ (dep), :PATH_list ) && append! (PATH_list, $ (dep). PATH_list)
35- isdefined ($ (dep), :LIBPATH_list ) && append! (LIBPATH_list, $ (dep). LIBPATH_list)
36- end )
37- push! (eager_mode, :(isdefined ($ (dep), :eager_mode ) && $ (dep). eager_mode ()))
33+ depmod = getfield (__module__, dep)
34+ if isdefined (depmod, :PATH_list )
35+ push! (deps_path_add, :(append! (PATH_list, $ (dep). PATH_list)))
36+ end
37+ if isdefined (depmod, :LIBPATH_list )
38+ push! (deps_path_add, :(append! (LIBPATH_list, $ (dep). LIBPATH_list)))
39+ end
40+ if isdefined (depmod, :eager_mode )
41+ push! (eager_mode, :($ (dep). eager_mode ()))
42+ end
3843 end
3944 end
4045
4146 return excat (
4247 # This either calls `@artifact_str()`, or returns a constant string if we're overridden.
43- :(global artifact_dir = find_artifact_dir ()),
48+ :(global artifact_dir = find_artifact_dir ():: String ),
4449
4550 # Add `eager_mode` invocations on all our dependencies
4651 eager_mode... ,
0 commit comments