angular-cn/packages/compiler-cli/ngcc/test/dependencies
Pete Bacon Darwin 4f42de9704 fix(ngcc): capture entry-point dependencies from typings as well as source (#34494)
ngcc computes a dependency graph of entry-points to ensure that
entry-points are processed in the correct order. Previously only the imports
in source files were analysed to determine the dependencies for each
entry-point.

This is not sufficient when an entry-point has a "type-only" dependency
 - for example only importing an interface from another entry-point.
In this case the "type-only" import does not appear in the
source code. It only appears in the typings files. This can cause a
dependency to be missed on the entry-point.

This commit fixes this by additionally processing the imports in the
typings program, as well as the source program.

Note that these missing dependencies could cause unexpected flakes when
running ngcc in async mode on multiple processes due to the way that
ngcc caches files when they are first read from disk.

Fixes #34411

// FW-1781

PR Close #34494
2020-01-07 10:35:03 -08:00
..
commonjs_dependency_host_spec.ts refactor(ngcc): pass dependency info to `collectDependencies()` (#34494) 2020-01-07 10:35:03 -08:00
dependency_resolver_spec.ts fix(ngcc): capture entry-point dependencies from typings as well as source (#34494) 2020-01-07 10:35:03 -08:00
esm_dependency_host_spec.ts fix(ngcc): capture entry-point dependencies from typings as well as source (#34494) 2020-01-07 10:35:03 -08:00
module_resolver_spec.ts fix(ngcc): handle deep imports that already have an extension (#32181) 2019-08-19 10:12:03 -07:00
umd_dependency_host_spec.ts refactor(ngcc): pass dependency info to `collectDependencies()` (#34494) 2020-01-07 10:35:03 -08:00