Skip to content

Commit b66a9a2

Browse files
devversionjelbourn
authored andcommitted
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 angular/angular#30259
1 parent 054dcc0 commit b66a9a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/material-examples/BUILD.bazel

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ genrule(
7676
# through Gulp), we need to exclude it because otherwise the genrule would fail.
7777
# TODO(devversion): remove this once gulp has been replaced with bazel.
7878
srcs = glob(["**/*.ts"], exclude = ["example-module.ts"]),
79-
outs = ["example-module.ts"],
79+
# TODO(devversion): we can't name the genrule output "example-module.ts" as it would
80+
# get accidentally picked up when building the example module. See: angular/angular#30259
81+
outs = ["example-module_generated.ts"],
8082
cmd = """
8183
# As a workaround for https://github.com/bazelbuild/rules_nodejs/issues/404, we pass the
8284
# data to the Bazel entry-point through environment variables.

0 commit comments

Comments
 (0)