From 405ccc7195b97fb581c48851eddccab1a1a66ffc Mon Sep 17 00:00:00 2001 From: Vikram Subramanian Date: Fri, 13 Oct 2017 16:19:24 -0700 Subject: [PATCH] fix(bazel): fix the output directory for extractor to be genfiles/ instead of bin/ (#19716) PR Close #19716 --- packages/bazel/src/ng_module.bzl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/bazel/src/ng_module.bzl b/packages/bazel/src/ng_module.bzl index ddfc04d81a..802d746244 100644 --- a/packages/bazel/src/ng_module.bzl +++ b/packages/bazel/src/ng_module.bzl @@ -50,7 +50,7 @@ def _expected_outs(ctx, label): declaration_files += [ctx.new_file(ctx.bin_dir, basename + ext) for ext in declarations] summary_files += [ctx.new_file(ctx.bin_dir, basename + ext) for ext in summaries] - i18n_messages_files = [ctx.new_file(ctx.bin_dir, ctx.label.name + "_ngc_messages.xmb")] + i18n_messages_files = [ctx.new_file(ctx.genfiles_dir, ctx.label.name + "_ngc_messages.xmb")] return struct( closure_js = closure_js_files, @@ -144,7 +144,10 @@ def ngc_compile_action(ctx, label, inputs, outputs, messages_out, config_file_pa executable = ctx.executable._ng_xi18n, arguments = (_EXTRA_NODE_OPTIONS_FLAGS + [config_file_path] + - [messages_out[0].short_path]), + # The base path is bin_dir because of the way the ngc + # compiler host is configured. So we need to explictily + # point to genfiles/ to redirect the output. + ["../genfiles/" + messages_out[0].short_path]), progress_message = "Extracting Angular 2 messages (ng_xi18n)", mnemonic = "Angular2MessageExtractor")