From b66a9a28e02a40b7bb3e640ffa3c954150167b88 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 21 May 2019 00:29:38 +0200 Subject: [PATCH] build: fix examples package generating invalid metadata (#16073) When building the `@angular/material-examples` package with Bazel, the generated flat module metadata file does not include metadata for the `ExampleModule`. This is because there is a genrule which declares an output with the same name of the example module source file. This means that the `ng_module` rule somehow accidentally picks up the genrule output and the generated flat module metadata file does not include the example module due https://github.com/angular/angular/issues/30259 --- src/material-examples/BUILD.bazel | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/material-examples/BUILD.bazel b/src/material-examples/BUILD.bazel index e83e341a90f..977d2fe8c23 100644 --- a/src/material-examples/BUILD.bazel +++ b/src/material-examples/BUILD.bazel @@ -76,7 +76,9 @@ genrule( # through Gulp), we need to exclude it because otherwise the genrule would fail. # TODO(devversion): remove this once gulp has been replaced with bazel. srcs = glob(["**/*.ts"], exclude = ["example-module.ts"]), - outs = ["example-module.ts"], + # TODO(devversion): we can't name the genrule output "example-module.ts" as it would + # get accidentally picked up when building the example module. See: angular/angular#30259 + outs = ["example-module_generated.ts"], cmd = """ # As a workaround for https://github.com/bazelbuild/rules_nodejs/issues/404, we pass the # data to the Bazel entry-point through environment variables.