Skip to content

Commit fe91700

Browse files
josephperrottmatsko
authored andcommitted
build: make ng_module.bzl is_ivy_enabled function public (angular#33992)
We need to make is_ivy_enabled public to allow the internal i18n build rule to rely on it rather than relying on compile_strategy. After we move the internal i18n rule to rely on is_ivy_enabled, compile_strategy can then be removed. PR Close angular#33992
1 parent e24453b commit fe91700

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/bazel/src/ng_module.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def compile_strategy(ctx):
5454

5555
return strategy
5656

57-
def _is_ivy_enabled(ctx):
57+
def is_ivy_enabled(ctx):
5858
"""Determine if the ivy compiler should be used to by the ng_module.
5959
6060
Args:
@@ -89,7 +89,7 @@ def _compiler_name(ctx):
8989
The name of the current compiler to be displayed in build output
9090
"""
9191

92-
return "Ivy" if _is_ivy_enabled(ctx) else "ViewEngine"
92+
return "Ivy" if is_ivy_enabled(ctx) else "ViewEngine"
9393

9494
def _is_view_engine_enabled(ctx):
9595
"""Determines whether Angular outputs will be produced by the current compilation strategy.
@@ -102,7 +102,7 @@ def _is_view_engine_enabled(ctx):
102102
factory files), false otherwise
103103
"""
104104

105-
return not _is_ivy_enabled(ctx)
105+
return not is_ivy_enabled(ctx)
106106

107107
def _basename_of(ctx, file):
108108
ext_len = len(".ts")
@@ -323,7 +323,7 @@ def _ngc_tsconfig(ctx, files, srcs, **kwargs):
323323
"generateNgSummaryShims": True if generate_ve_shims else False,
324324
# Summaries are only enabled if Angular outputs are to be produced.
325325
"enableSummariesForJit": is_legacy_ngc,
326-
"enableIvy": _is_ivy_enabled(ctx),
326+
"enableIvy": is_ivy_enabled(ctx),
327327
"fullTemplateTypeCheck": ctx.attr.type_check,
328328
# TODO(alxhub/arick): template type-checking for Ivy needs to be tested in g3 before it can
329329
# be enabled here.

0 commit comments

Comments
 (0)