61e8ed6623
Previously the `rootDir` was set to the entry-point path but this is incorrect if the source files are stored in a directory outside the entry-point path. This is the case in the latest versions of the Angular CDK. Instead the `rootDir` should be the containing package path, which is guaranteed to include all the source for the entry-point. --- A symptom of this is an error when ngcc is trying to process the source of an entry-point format after the entry-point's typings have already been processed by a previous processing run. During processing the `_toR3Reference()` function gets called which in turn makes a call to `ReflectionHost.getDtsDeclaration()`. If the typings files are also being processed this returns the node from the dts typings files. But if we have already processed the typings files and are now processing only an entry-point format without typings, the call to `ReflectionHost.getDtsDeclaration()` returns `null`. When this value is `null`, a JS `valueRef` is passed through as the DTS `typeRef` to the `ReferenceEmitter`. In this case, the `ReferenceEmitter` fails during `emit()` because no `ReferenceEmitStrategy` is able to provide an emission: 1) The `LocalIdentifierStrategy` is not able help because in this case `ImportMode` is `ForceNewImport`. 2) The `LogicalProjectStrategy` cannot find the JS file below the `rootDir`. The second strategy failure is fixed by this PR. Fixes https://github.com/angular/ngcc-validation/issues/495 PR Close #34212 |
||
---|---|---|
.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 | ||
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.