angular-cn/packages/compiler-cli/test
JoostK 27d0e54705 fix(compiler-cli): prevent stack overflow in decorator transform for large number of files (#40374)
The decorator downleveling transform patches `ts.EmitResolver.isReferencedAliasDeclaration`
to prevent elision of value imports that occur only in a type-position, which would
inadvertently install the patch repeatedly for each source file in the program.
This could potentially result in a stack overflow when a very large number of files is
present in the program.

This commit fixes the issue by ensuring that the patch is only applied once.
This is also a slight performance improvement, as `isReferencedAliasDeclaration`
is no longer repeatedly calling into all prior installed patch functions.

Fixes #40276

PR Close #40374
2021-01-11 10:39:10 -08:00
..
compliance refactor(compiler-cli): update to use new file-system interfaces (#40281) 2021-01-08 09:34:44 -08:00
compliance_old refactor(compiler-cli): support external template source-mapping when linking (#40237) 2021-01-07 13:12:53 -08:00
diagnostics feat(compiler-cli): add support for TypeScript 4.0 (#38076) 2020-08-24 13:06:59 -07:00
metadata build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ngtsc refactor(compiler-cli): update to use new file-system interfaces (#40281) 2021-01-08 09:34:44 -08:00
transformers fix(compiler-cli): prevent stack overflow in decorator transform for large number of files (#40374) 2021-01-11 10:39:10 -08:00
BUILD.bazel test(compiler-cli): move testing utils to separate package (#39594) 2020-11-17 11:59:56 -08:00
extract_i18n_spec.ts refactor(compiler): `element.sourceSpan` should span the `outerHTML` (#38581) 2020-09-02 14:47:31 -07:00
mocks.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ngc_spec.ts build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08:00
perform_compile_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
perform_watch_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
test_support.ts test(compiler-cli): move testing utils to separate package (#39594) 2020-11-17 11:59:56 -08:00
typescript_support_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00