b07b6f1d40
When ngtsc comes across a source file during partial evaluation, it would determine all exported symbols from that module and evaluate their values greedily. This greedy evaluation strategy introduces unnecessary work and can fall into infinite recursion when the evaluation result of an exported expression would circularly depend on the source file. This would primarily occur in CommonJS code, where the `exports` variable can be used to refer to an exported variable. This variable would be resolved to the source file itself, thereby greedily evaluating all exported symbols and thus ending up evaluating the `exports` variable again. This variable would be resolved to the source file itself, thereby greedily evaluating all exported symbols and thus ending u evaluating the `exports` variable again. This variable would be resolved to the source file itself, thereby greedily evaluating all exported symbols and thus ending up evaluating the `exports` variable again. This variable would be resolved to the source file itself, thereby greedily evaluating all exported symbols and thus ending up evaluating the `exports` variable again. This went on for some time until all stack frames were exhausted. This commit introduces a `ResolvedModule` that delays the evaluation of its exports until they are actually requested. This avoids the circular dependency when evaluating `exports`, thereby fixing the issue. Fix #33734 PR Close #33772 |
||
---|---|---|
.. | ||
animations | ||
bazel | ||
benchpress | ||
common | ||
compiler | ||
compiler-cli | ||
core | ||
docs | ||
elements | ||
examples | ||
forms | ||
http | ||
language-service | ||
localize | ||
platform-browser | ||
platform-browser-dynamic | ||
platform-server | ||
platform-webworker | ||
platform-webworker-dynamic | ||
private/testing | ||
router | ||
service-worker | ||
upgrade | ||
zone.js | ||
BUILD.bazel | ||
README.md | ||
empty.ts | ||
goog.d.ts | ||
license-banner.txt | ||
system.d.ts | ||
tsconfig-build-no-strict.json | ||
tsconfig-build.json | ||
tsconfig-test.json | ||
tsconfig.json | ||
types.d.ts |
README.md
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT