angular-cn/packages/compiler-cli/src
Alex Rickabaugh 3938563565 fix(ivy): don't reuse a ts.Program more than once in ngtsc (#30090)
ngtsc previously could attempt to reuse the main ts.Program twice. This
occurred when template type-checking was enabled and then an incremental
build was performed. This breaks a TypeScript invariant - ts.Programs can
only be reused once.

The creation of the template type-checking program reuses the main program,
rendering it moot. Then, on the next incremental build the main program
would be subject to reuse again, which would crash inside TypeScript.

This commit fixes the issue by reusing the template type-checking program
from the previous run on the next incremental build. Since under normal
circumstances the files in the type-checking program aren't changed, this
should be just as fast.

Testing strategy: a test is added in the incremental_spec which validates
that program reuse with type-checking turned on does not crash the compiler.

Fixes #30079

PR Close #30090
2019-04-24 11:41:21 -07:00
..
diagnostics refactor: remove unused functions and classes in diagnostics (#28923) 2019-03-05 11:40:08 -08:00
metadata refactor(ivy): use ɵɵ instead of Δ for now (#29850) 2019-04-11 16:27:56 -07:00
ngtsc fix(ivy): don't reuse a ts.Program more than once in ngtsc (#30090) 2019-04-24 11:41:21 -07:00
transformers fix(ivy): don't reuse a ts.Program more than once in ngtsc (#30090) 2019-04-24 11:41:21 -07:00
extract_i18n.ts refactor(compiler): remove all source-level traces to tsc-wrapped (#18966) 2017-09-13 20:47:37 -04:00
language_services.ts refactor(compiler): remove old ngtools api and add listLazyRoutes to new api (#19836) 2017-10-23 18:46:04 -04:00
main.ts test(ivy): support multiple compilations in the ngtsc test env (#29380) 2019-04-01 15:13:56 -07:00
ngtools_api.ts build: upgrade jasmine (and related typings) to latest version (#19904) 2018-07-06 13:48:02 -07:00
ngtools_api2.ts feat(ivy): produce diagnostics for missing exports, incorrect entrypoint (#27743) 2019-01-08 16:36:18 -08:00
perform_compile.ts fix(compiler-cli): pass config path to ts.parseJsonConfigFileContent (#29872) 2019-04-16 13:36:08 -07:00
perform_watch.ts refactor(compiler): typo (#25496) 2018-11-05 12:53:04 -08:00
tooling.ts feat(compiler-cli): export tooling definitions (#29929) 2019-04-17 17:23:01 -07:00
version.ts style: remove empty comments (#23404) 2018-05-10 15:48:13 -07:00