Alex Rickabaugh 113556357a fix(ivy): compute transitive scopes from NgModuleDef only (#24334)
Previously, the transitive scopes of an NgModuleDef were computed
during execution of the @NgModule decorator. This meant that JIT-
compiled modules could only import other JIT-compiled modules, as
the import mechanism relied on the calculation of transitive scopes
to already have happened for the imported module.

This change moves computation of transitive scopes to a function
`transitiveScopesFor` (and makes it lazy). This opens the door for
AOT -> JIT or JIT -> AOT imports, as transitive scopes for AOT
modules can be calculated when needed by JIT, and AOT modules can
also write expressions that call `transitiveScopesFor` when
importing a JIT-compiled module.

PR Close #24334
2018-06-08 13:37:10 -07:00

45 lines
798 B
Python

package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "ts_library", "ts_web_test_suite")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library(
name = "ivy_lib",
testonly = 1,
srcs = glob(["**/*.ts"]),
deps = [
"//packages:types",
"//packages/core",
],
)
ts_library(
name = "ivy_node_lib",
testonly = 1,
srcs = [],
deps = [
":ivy_lib",
"//packages/core/test/render3:domino",
],
)
jasmine_node_test(
name = "ivy",
bootstrap = [
"angular/packages/core/test/render3/load_domino",
],
tags = [
"ivy-jit",
],
deps = [
":ivy_node_lib",
],
)
ts_web_test_suite(
name = "ivy_web",
deps = [
":ivy_lib",
],
)