refactor(bazel): no longer generate VE shims for other workspaces by default (#43431)

We should no longer generate VE shims for workspaces which are not named
`angular`. The default is Ivy compilation and this should be opt-in. The
components repository for example does not need any shims as it is using
Ivy for the common development workflows.

PR Close #43431
This commit is contained in:
Paul Gschwendtner
2021-09-28 00:39:52 +02:00
committed by Dylan Hunn
parent 274cb38e0b
commit b616e74ceb
+1 -5
View File
@@ -307,12 +307,8 @@ def _expected_outs(ctx):
# Determines if we need to generate View Engine shims (.ngfactory and .ngsummary files)
def _generate_ve_shims(ctx):
# we are checking the workspace name here, because otherwise this would be a breaking change
# (the shims used to be on by default)
# we can remove this check once angular/components and angular/angular-cli repos no longer depend
# on the presence of shims, or if they explicitly opt-in to their generation via ng_modules' generate_ve_shims attr
return _is_bazel() and _is_view_engine_enabled(ctx) or (
getattr(ctx.attr, "generate_ve_shims", False) == True or ctx.workspace_name != "angular"
getattr(ctx.attr, "generate_ve_shims", False) == True
)
def _ngc_tsconfig(ctx, files, srcs, **kwargs):