angular-docs-cn/packages
Alex Rickabaugh 7d954dffd0 feat(ivy): detect cycles and use remote scoping of components if needed (#28169)
By its nature, Ivy alters the import graph of a TS program, adding imports
where template dependencies exist. For example, if ComponentA uses PipeB
in its template, Ivy will insert an import of PipeB into the file in which
ComponentA is declared.

Any insertion of an import into a program has the potential to introduce a
cycle into the import graph. If for some reason the file in which PipeB is
declared imports the file in which ComponentA is declared (maybe it makes
use of a service or utility function that happens to be in the same file as
ComponentA) then this could create an import cycle. This turns out to
happen quite regularly in larger Angular codebases.

TypeScript and the Ivy runtime have no issues with such cycles. However,
other tools are not so accepting. In particular the Closure Compiler is
very anti-cycle.

To mitigate this problem, it's necessary to detect when the insertion of
an import would create a cycle. ngtsc can then use a different strategy,
known as "remote scoping", instead of directly writing a reference from
one component to another. Under remote scoping, a function
'setComponentScope' is called after the declaration of the component's
module, which does not require the addition of new imports.

FW-647 #resolve

PR Close #28169
2019-01-28 12:10:25 -08:00
..
animations docs(animations): fix group and sequence function usage examples (#28305) 2019-01-24 10:21:35 -08:00
bazel fix(bazel): Builder should invoke local bazel/iblaze (#28303) 2019-01-28 12:01:35 -08:00
benchpress build: set a default module_name for ts_library rules (#28051) 2019-01-18 10:16:39 -08:00
common refactor(ivy): Add newer, smaller NgOnChangesFeature (#28187) 2019-01-23 10:59:34 -08:00
compiler feat(ivy): detect cycles and use remote scoping of components if needed (#28169) 2019-01-28 12:10:25 -08:00
compiler-cli feat(ivy): detect cycles and use remote scoping of components if needed (#28169) 2019-01-28 12:10:25 -08:00
core feat(ivy): detect cycles and use remote scoping of components if needed (#28169) 2019-01-28 12:10:25 -08:00
docs
elements build: set a default module_name for ts_library rules (#28051) 2019-01-18 10:16:39 -08:00
examples docs: ngComponentOutlet doc updated with new Injector creation (#27291) 2019-01-14 10:36:02 -08:00
forms fix(forms): don't override form group's dirty state when disabling controls (#24591) 2019-01-25 12:59:07 -08:00
http build: set a default module_name for ts_library rules (#28051) 2019-01-18 10:16:39 -08:00
language-service build: set a default module_name for ts_library rules (#28051) 2019-01-18 10:16:39 -08:00
platform-browser feat(ivy): support host properties in DebugElement.properties (#28355) 2019-01-25 12:39:01 -08:00
platform-browser-dynamic test(ivy): turn on passing tests in platform-browser-dynamic (#28307) 2019-01-23 15:05:45 -08:00
platform-server fix(ivy): handle namespaces in attributes (#28242) 2019-01-23 11:58:41 -08:00
platform-webworker build: set a default module_name for ts_library rules (#28051) 2019-01-18 10:16:39 -08:00
platform-webworker-dynamic build: set a default module_name for ts_library rules (#28051) 2019-01-18 10:16:39 -08:00
private/testing ci: onlyInIvy tests should not be triggered for FIND_PASSING_TESTS mode (#28036) 2019-01-10 10:55:58 -08:00
router refactor(router): initalize browserUrlTree to empty tree (#28376) 2019-01-25 12:37:56 -08:00
service-worker build: set a default module_name for ts_library rules (#28051) 2019-01-18 10:16:39 -08:00
upgrade test(ivy): @Injectable is required on type providers (#28331) 2019-01-28 12:01:07 -08:00
BUILD.bazel build(bazel): use fine-grained npm deps (#26111) (#26488) 2018-10-19 20:59:29 -07:00
README.md Revert "docs: Remove unneeded file (#18106)" 2017-07-20 16:46:47 -05:00
empty.ts
es6-subset.d.ts build: fix our copy of Array#find typing (#27742) 2018-12-19 15:11:52 -05:00
goog.d.ts test(ivy): add bundling test `todo_i18n` (#27420) 2018-12-04 19:59:12 -08:00
license-banner.txt build: bump year (#27880) 2019-01-11 11:15:59 -08:00
rollup.config.js refactor: make all rollup config ES5 compatible (#20028) 2017-10-30 23:09:17 -04:00
system.d.ts
tsconfig-build.json build(bazel): Turning on strictPropertyInitialization for Angular. (#24572) 2018-06-25 07:57:13 -07:00
tsconfig-test.json build: refactor ambient node & jasmine types so they are only included where needed (#25491) 2018-08-16 13:46:43 -07:00
tsconfig.json fix(compiler): Fix look up of entryComponents in AOT Summaries (#24892) 2018-09-11 16:23:17 -07:00
types.d.ts build: refactor ambient node & jasmine types so they are only included where needed (#25491) 2018-08-16 13:46:43 -07:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

License: MIT