From 63b795ae4a4e18c8fbbfd67725b9fed6ef0fa59c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matias=20Niemel=C3=A4?= Date: Wed, 26 Sep 2018 14:29:20 -0700 Subject: [PATCH] refactor(ivy): make sure that test bed symbols are imported from ivy_switch (#26121) PR Close #26121 --- .../core/src/core_render3_private_export.ts | 18 ++++++------------ .../src/ivy_switch/compiler/ivy_switch_on.ts | 4 +++- .../core/src/ivy_switch/compiler/legacy.ts | 9 +++++++++ 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/packages/core/src/core_render3_private_export.ts b/packages/core/src/core_render3_private_export.ts index c5d29a2a6c..03f83f5939 100644 --- a/packages/core/src/core_render3_private_export.ts +++ b/packages/core/src/core_render3_private_export.ts @@ -125,18 +125,12 @@ export { Render3DebugRendererFactory2 as ɵRender3DebugRendererFactory2 } from export { - compileNgModuleDefs as ɵcompileNgModuleDefs, - patchComponentDefWithScope as ɵpatchComponentDefWithScope, -} from './render3/jit/module'; - -export { - compileComponent as ɵcompileComponent, - compileDirective as ɵcompileDirective, -} from './render3/jit/directive'; - -export { - compilePipe as ɵcompilePipe, -} from './render3/jit/pipe'; + R3_COMPILE_NGMODULE_DEFS as ɵcompileNgModuleDefs, + R3_PATCH_COMPONENT_DEF_WTIH_SCOPE as ɵpatchComponentDefWithScope, + R3_COMPILE_COMPONENT as ɵcompileComponent, + R3_COMPILE_DIRECTIVE as ɵcompileDirective, + R3_COMPILE_PIPE as ɵcompilePipe, +} from './ivy_switch/compiler/ivy_switch_on'; export { NgModuleDef as ɵNgModuleDef, diff --git a/packages/core/src/ivy_switch/compiler/ivy_switch_on.ts b/packages/core/src/ivy_switch/compiler/ivy_switch_on.ts index 0a802cf632..eab86595e6 100644 --- a/packages/core/src/ivy_switch/compiler/ivy_switch_on.ts +++ b/packages/core/src/ivy_switch/compiler/ivy_switch_on.ts @@ -8,7 +8,7 @@ import {compileComponent, compileDirective} from '../../render3/jit/directive'; import {compileInjectable} from '../../render3/jit/injectable'; -import {compileNgModule} from '../../render3/jit/module'; +import {compileNgModule, compileNgModuleDefs, patchComponentDefWithScope} from '../../render3/jit/module'; import {compilePipe} from '../../render3/jit/pipe'; export const ivyEnabled = true; @@ -17,3 +17,5 @@ export const R3_COMPILE_DIRECTIVE = compileDirective; export const R3_COMPILE_INJECTABLE = compileInjectable; export const R3_COMPILE_NGMODULE = compileNgModule; export const R3_COMPILE_PIPE = compilePipe; +export const R3_COMPILE_NGMODULE_DEFS = compileNgModuleDefs; +export const R3_PATCH_COMPONENT_DEF_WTIH_SCOPE = patchComponentDefWithScope; diff --git a/packages/core/src/ivy_switch/compiler/legacy.ts b/packages/core/src/ivy_switch/compiler/legacy.ts index 0452db06d2..cbe4a82909 100644 --- a/packages/core/src/ivy_switch/compiler/legacy.ts +++ b/packages/core/src/ivy_switch/compiler/legacy.ts @@ -26,6 +26,10 @@ export const R3_COMPILE_DIRECTIVE__POST_NGCC__: DirectiveCompiler = ivyOn.R3_COM export const R3_COMPILE_INJECTABLE__POST_NGCC__: DirectiveCompiler = ivyOn.R3_COMPILE_INJECTABLE; export const R3_COMPILE_NGMODULE__POST_NGCC__: DirectiveCompiler = ivyOn.R3_COMPILE_NGMODULE; export const R3_COMPILE_PIPE__POST_NGCC__: DirectiveCompiler = ivyOn.R3_COMPILE_PIPE; +export const R3_COMPILE_NGMODULE_DEFS__POST_NGCC__: DirectiveCompiler = + ivyOn.R3_COMPILE_NGMODULE_DEFS; +export const R3_PATCH_COMPONENT_DEF_WTIH_SCOPE__POST_NGCC__: DirectiveCompiler = + ivyOn.R3_PATCH_COMPONENT_DEF_WTIH_SCOPE; export const ivyEnable__POST_NGCC__: boolean = ivyOn.ivyEnabled; @@ -34,6 +38,8 @@ const R3_COMPILE_DIRECTIVE__PRE_NGCC__: DirectiveCompiler = noop; const R3_COMPILE_INJECTABLE__PRE_NGCC__: DirectiveCompiler = preR3InjectableCompile; const R3_COMPILE_NGMODULE__PRE_NGCC__: DirectiveCompiler = preR3NgModuleCompile; const R3_COMPILE_PIPE__PRE_NGCC__: DirectiveCompiler = noop; +const R3_COMPILE_NGMODULE_DEFS__PRE_NGCC__: DirectiveCompiler = noop; +const R3_PATCH_COMPONENT_DEF_WTIH_SCOPE__PRE_NGCC__: DirectiveCompiler = noop; const ivyEnable__PRE_NGCC__ = false; @@ -43,6 +49,9 @@ export let R3_COMPILE_DIRECTIVE: DirectiveCompiler = R3_COMPILE_DIRECTIVE__PRE_N export let R3_COMPILE_INJECTABLE: DirectiveCompiler = R3_COMPILE_INJECTABLE__PRE_NGCC__; export let R3_COMPILE_NGMODULE: DirectiveCompiler = R3_COMPILE_NGMODULE__PRE_NGCC__; export let R3_COMPILE_PIPE: DirectiveCompiler = R3_COMPILE_PIPE__PRE_NGCC__; +export let R3_COMPILE_NGMODULE_DEFS: DirectiveCompiler = R3_COMPILE_NGMODULE_DEFS__PRE_NGCC__; +export let R3_PATCH_COMPONENT_DEF_WTIH_SCOPE: DirectiveCompiler = + R3_PATCH_COMPONENT_DEF_WTIH_SCOPE__PRE_NGCC__; ////////////////////////////////////////////////////////////