@@ -40,6 +40,7 @@ for f in ${{module_paths[@]}}; do
4040 mods+=( $(basename "$f" .beam) )
4141 fi
4242done
43+ mods+={extra_modules}
4344
4445if [[ ${{#mods[@]}} -eq 0 ]]; then
4546 mods_term="[]"
6162 erlang_home = erlang_home ,
6263 app_file_tool = app_file_tool_path ,
6364 modules = modules ,
65+ extra_modules = shell .array_literal (ctx .attr .synthetic_module_names ),
6466 src = ctx .files .app_src [0 ].path ,
6567 out = app_file .path ,
6668 )
@@ -140,6 +142,7 @@ for f in ${{module_paths[@]}}; do
140142 mods+=( $(basename "$f" .beam) )
141143 fi
142144done
145+ mods+={extra_modules}
143146
144147if [[ ${{#mods[@]}} -eq 0 ]]; then
145148 mods_term="[]"
203206 stamp_version_key = ctx .attr .stamp_version_key if stamp else "" ,
204207 version = ctx .attr .app_version ,
205208 modules = modules ,
209+ extra_modules = shell .array_literal (ctx .attr .synthetic_module_names ),
206210 registered = registered_list ,
207211 applications = applications_list ,
208212 optional_applications = optional_applications_list ,
@@ -254,6 +258,7 @@ app_file = rule(
254258 "optional_applications" : attr .string_list (),
255259 "app_src" : attr .label_list (allow_files = [".app.src" ]),
256260 "modules" : attr .label_list (allow_files = [".beam" ]),
261+ "synthetic_module_names" : attr .string_list (),
257262 "deps" : attr .label_list (providers = [ErlangAppInfo ]),
258263 "out" : attr .output (),
259264 "stamp" : attr .int (default = - 1 ),
0 commit comments