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 |
||
---|---|---|
.circleci | ||
.devcontainer | ||
.github | ||
.vscode | ||
aio | ||
docs | ||
integration | ||
modules | ||
packages | ||
scripts | ||
third_party | ||
tools | ||
.bazelignore | ||
.bazelrc | ||
.clang-format | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.nvmrc | ||
BUILD.bazel | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
WORKSPACE | ||
browser-providers.conf.js | ||
gulpfile.js | ||
karma-js.conf.js | ||
package.json | ||
protractor-perf.conf.js | ||
renovate.json | ||
shims_for_IE.js | ||
test-events.js | ||
test-main.js | ||
tslint.json | ||
yarn.lock | ||
yarn.lock.readme.md |
README.md
Angular
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages.
Quickstart
Changelog
Learn about the latest improvements.
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.