712f1bd0b7
During AOT compilation, the value of some expressions need to be known at compile time. The compiler has the ability to statically evaluate expressions the best it can, but there can be occurrences when an expression cannot be evaluated statically. For instance, the evaluation could depend on a dynamic value or syntax is used that the compiler does not understand. Alternatively, it is possible that an expression could be statically evaluated but the resulting value would be of an incorrect type. In these situations, it would be helpful if the compiler could explain why it is unable to evaluate an expression. To this extend, the static interpreter in Ivy keeps track of a trail of `DynamicValue`s which follow the path of nodes that were considered all the way to the node that causes an expression to be considered dynamic. Up until this commit, this rich trail of information was not surfaced to a developer so the compiler was of little help to explain why static evaluation failed, resulting in situations that are hard to debug and resolve. This commit adds much more insight to the diagnostic that is produced for static evaluation errors. For dynamic values, the trail of `DynamicValue` instances is presented to the user in a meaningful way. If a value is available but not of the correct type, the type of the resolved value is shown. Resolves FW-2155 PR Close #37587 |
||
---|---|---|
.. | ||
animations | ||
bazel | ||
benchpress | ||
common | ||
compiler | ||
compiler-cli | ||
core | ||
docs | ||
elements | ||
examples | ||
forms | ||
language-service | ||
localize | ||
misc/angular-in-memory-web-api | ||
platform-browser | ||
platform-browser-dynamic | ||
platform-server | ||
platform-webworker | ||
platform-webworker-dynamic | ||
private/testing | ||
router | ||
service-worker | ||
upgrade | ||
zone.js | ||
BUILD.bazel | ||
README.md | ||
circular-deps-test.conf.js | ||
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