angular-cn/packages/compiler-cli/test/ngtsc
JoostK e9a8f9f705 fix(compiler-cli): enable @types discovery in incremental rebuilds (#39011)
Prior to this fix, incremental rebuilds could fail to type check due to
missing ambient types from auto-discovered declaration files in @types
directories, or type roots in general. This was caused by the
intermediary `ts.Program` that is created for template type checking,
for which a `ts.CompilerHost` was used which did not implement the
optional `directoryExists` methods. As a result, auto-discovery of types
would not be working correctly, and this would retain into the
`ts.Program` that would be created for an incremental rebuild.

This commit fixes the issue by forcing the custom `ts.CompilerHost` used
for type checking to properly delegate into the original
`ts.CompilerHost`, even for optional methods. This is accomplished using
a base class `DelegatingCompilerHost` which is typed in such a way that
newly introduced `ts.CompilerHost` methods must be accounted for.

Fixes #38979

PR Close #39011
2020-09-28 16:27:34 -04:00
..
fake_core Revert "fix(compiler): mark `NgModuleFactory` construction as not side effectful (#38147)" (#38303) 2020-07-30 12:19:35 -07:00
BUILD.bazel perf(compiler-cli): fix regressions in incremental program reuse (#37641) 2020-06-25 14:12:20 -07:00
component_indexing_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
env.ts test(compiler-cli): improve test performance using shared source file cache (#38909) 2020-09-25 14:28:49 -04:00
incremental_error_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
incremental_spec.ts fix(compiler-cli): enable @types discovery in incremental rebuilds (#39011) 2020-09-28 16:27:34 -04:00
modulewithproviders_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
monorepo_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ngtsc_spec.ts fix(compiler-cli): perform DOM schema checks even in basic mode in g3 (#38943) 2020-09-23 15:46:32 -04:00
scope_spec.ts feat(compiler-cli): explain why an expression cannot be used in AOT compilations (#37587) 2020-06-25 14:16:35 -07:00
sourcemap_utils.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
template_mapping_spec.ts fix(compiler-cli): compute source-mappings for localized strings (#38645) 2020-09-08 13:17:21 -07:00
template_typecheck_spec.ts fix(compiler): incorrectly inferring namespace for HTML nodes inside SVG (#38477) 2020-08-31 13:25:38 -07:00