2020-04-29 18:08:22 -04:00
|
|
|
load("//tools:defaults.bzl", "ts_library")
|
|
|
|
|
2020-04-30 18:48:20 -04:00
|
|
|
package(default_visibility = ["//packages/language-service:__subpackages__"])
|
2020-04-29 18:08:22 -04:00
|
|
|
|
|
|
|
ts_library(
|
|
|
|
name = "ivy",
|
|
|
|
srcs = glob(["*.ts"]),
|
|
|
|
deps = [
|
2020-08-12 19:13:02 -04:00
|
|
|
"//packages/compiler",
|
2020-04-29 18:52:17 -04:00
|
|
|
"//packages/compiler-cli",
|
2020-07-31 00:26:02 -04:00
|
|
|
"//packages/compiler-cli/src/ngtsc/core",
|
|
|
|
"//packages/compiler-cli/src/ngtsc/core:api",
|
2021-01-13 17:52:29 -05:00
|
|
|
"//packages/compiler-cli/src/ngtsc/diagnostics",
|
2020-07-31 00:26:02 -04:00
|
|
|
"//packages/compiler-cli/src/ngtsc/file_system",
|
2020-12-03 21:08:00 -05:00
|
|
|
"//packages/compiler-cli/src/ngtsc/imports",
|
2020-07-31 00:26:02 -04:00
|
|
|
"//packages/compiler-cli/src/ngtsc/incremental",
|
2020-10-21 14:01:10 -04:00
|
|
|
"//packages/compiler-cli/src/ngtsc/metadata",
|
2021-03-15 18:23:03 -04:00
|
|
|
"//packages/compiler-cli/src/ngtsc/perf",
|
fix(compiler-cli): ensure the compiler tracks `ts.Program`s correctly (#41291)
`NgCompiler` previously had a notion of the "next" `ts.Program`, which
served two purposes:
* it allowed a client using the `ts.createProgram` API to query for the
latest program produced by the previous `NgCompiler`, as a starting
point for building the _next_ program that incorporated any new user
changes.
* it allowed the old `NgCompiler` to be queried for the `ts.Program` on
which all prior state is based, which is needed to compute the delta
from the new program to ultimately determine how much of the prior
state can be reused.
This system contained a flaw: it relied on the `NgCompiler` knowing when
the `ts.Program` would be changed. This works fine for changes that
originate in `NgCompiler` APIs, but a client of the `TemplateTypeChecker`
may use that API in ways that create new `ts.Program`s without the
`NgCompiler`'s knowledge. This caused the `NgCompiler`'s concept of the
"next" program to get out of sync, causing incorrectness in future
incremental analysis.
This refactoring cleans up the compiler's `ts.Program` management in
several ways:
* `TypeCheckingProgramStrategy`, the API which controls `ts.Program`
updating, is renamed to the `ProgramDriver` and extracted to a separate
ngtsc package.
* It loses its responsibility of determining component shim filenames. That
functionality now lives exclusively in the template type-checking package.
* The "next" `ts.Program` concept is renamed to the "current" program, as
the "next" name was misleading in several ways.
* `NgCompiler` now wraps the `ProgramDriver` used in the
`TemplateTypeChecker` to know when a new `ts.Program` is created,
regardless of which API drove the creation, which actually fixes the bug.
PR Close #41291
2021-03-19 20:06:10 -04:00
|
|
|
"//packages/compiler-cli/src/ngtsc/program_driver",
|
2020-09-29 15:42:20 -04:00
|
|
|
"//packages/compiler-cli/src/ngtsc/reflection",
|
2020-07-31 00:26:02 -04:00
|
|
|
"//packages/compiler-cli/src/ngtsc/shims",
|
|
|
|
"//packages/compiler-cli/src/ngtsc/typecheck",
|
|
|
|
"//packages/compiler-cli/src/ngtsc/typecheck/api",
|
2020-12-22 18:07:45 -05:00
|
|
|
"//packages/compiler-cli/src/ngtsc/util",
|
2021-01-28 15:43:37 -05:00
|
|
|
"//packages/language-service:api",
|
2020-11-09 19:20:02 -05:00
|
|
|
"@npm//@types/node",
|
2020-04-29 18:08:22 -04:00
|
|
|
"@npm//typescript",
|
|
|
|
],
|
|
|
|
)
|