Skip to content

Commit 628356f

Browse files
authored
Merge pull request #288 from rabbitmq/app_file-synthetic-modules
app_file rule synthetic modules
2 parents 8ae0d4c + bc271a2 commit 628356f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

private/app_file.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ for f in ${{module_paths[@]}}; do
4040
mods+=( $(basename "$f" .beam) )
4141
fi
4242
done
43+
mods+={extra_modules}
4344
4445
if [[ ${{#mods[@]}} -eq 0 ]]; then
4546
mods_term="[]"
@@ -61,6 +62,7 @@ EOF
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
142144
done
145+
mods+={extra_modules}
143146
144147
if [[ ${{#mods[@]}} -eq 0 ]]; then
145148
mods_term="[]"
@@ -203,6 +206,7 @@ fi
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

Comments
 (0)