angular-cn/packages/compiler-cli/test
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
..
compliance fix(ivy): queries not being inherited from undecorated classes (#30015) 2019-04-24 10:38:44 -07:00
diagnostics build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871) 2019-02-28 12:06:36 -08:00
metadata fix(compiler-cli): incorrect metadata bundle for multiple unnamed re-exports (#29360) 2019-03-18 15:08:40 -04: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 build: add moduleName to ngFactory sourcefiles (#29385) 2019-03-19 01:10:49 -04:00
BUILD.bazel refactor(ivy): move ngcc into a higher level folder (#29092) 2019-03-20 14:45:54 -04:00
extract_i18n_spec.ts build: remove unused "test.sh" leftover code in compiler-cli (#28352) 2019-02-05 14:31:10 -05:00
mocks.ts fix(compiler-cli): Use typescript to resolve modules for metadata (#22856) 2018-07-10 11:11:48 -07:00
ngc_spec.ts feat(compiler-cli): lower some exported expressions (#30038) 2019-04-23 08:30:58 -07:00
ngtools_api_spec.ts fix(ivy): DebugNode.query should query nodes in the logical tree (#29480) 2019-03-26 12:48:37 -07:00
perform_compile_spec.ts feat(compiler-cli): add support to extend `angularCompilerOptions` (#22717) 2018-09-19 16:17:28 -07:00
perform_watch_spec.ts build: fix failing compiler-cli tests on windows (#28352) 2019-02-05 14:31:10 -05:00
runfile_helpers.ts build: support running compiler-cli tests on windows (#28352) 2019-02-05 14:31:10 -05:00
test_support.ts test: remove symlink workaround (#29426) 2019-03-20 15:13:09 -04:00