Skip to content

Commit 405ccc7

Browse files
vikermantbosch
authored andcommitted
fix(bazel): fix the output directory for extractor to be genfiles/ instead of bin/ (#19716)
PR Close #19716
1 parent 836c889 commit 405ccc7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/bazel/src/ng_module.bzl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def _expected_outs(ctx, label):
5050
declaration_files += [ctx.new_file(ctx.bin_dir, basename + ext) for ext in declarations]
5151
summary_files += [ctx.new_file(ctx.bin_dir, basename + ext) for ext in summaries]
5252

53-
i18n_messages_files = [ctx.new_file(ctx.bin_dir, ctx.label.name + "_ngc_messages.xmb")]
53+
i18n_messages_files = [ctx.new_file(ctx.genfiles_dir, ctx.label.name + "_ngc_messages.xmb")]
5454

5555
return struct(
5656
closure_js = closure_js_files,
@@ -144,7 +144,10 @@ def ngc_compile_action(ctx, label, inputs, outputs, messages_out, config_file_pa
144144
executable = ctx.executable._ng_xi18n,
145145
arguments = (_EXTRA_NODE_OPTIONS_FLAGS +
146146
[config_file_path] +
147-
[messages_out[0].short_path]),
147+
# The base path is bin_dir because of the way the ngc
148+
# compiler host is configured. So we need to explictily
149+
# point to genfiles/ to redirect the output.
150+
["../genfiles/" + messages_out[0].short_path]),
148151
progress_message = "Extracting Angular 2 messages (ng_xi18n)",
149152
mnemonic = "Angular2MessageExtractor")
150153

0 commit comments

Comments
 (0)