Repository navigation
refactor(compiler): implement factory declarations - #41231
petebacondarwin wants to merge 11 commits into
Conversation
088b2dd to
e7b1ec9
Compare
27ff7f3 to
7b1a10c
Compare
7b1a10c to
59fa3a3
Compare
JoostK
left a comment
There was a problem hiding this comment.
Did a semi-quick pass; have not at all looked into everything in detail.
0e6e321 to
b47557a
Compare
The `injectFn` reference can be inferred unamiguously from the `target` property so it is not needed.
This commit changes the partial compilation so that it outputs declaration calls rather than compiled factory functions. The JIT compiler and the linker are updated to be able to handle these new declarations.
This instruction was created to work around a problem with injecting a `ChangeDetectorRef` into a pipe. See angular#31438. This fix required special metadata for when the thing being injected was a `ChangeDetectorRef`. Now this is handled by adding a flag `InjectorFlags.ForPipe` to the `ɵɵdirectiveInject()` call, which avoids the need to special test_cases `ChangeDetectorRef` in the generated code.
…njectability When `ɵngDeclareInjector()` was implemented, the `factory` was moved out to the `ɵfac` static property on the class. This check was not updated.
…function This function is never called by any of the code in Angular and is not publicly exported. So it can be safely removed.
Now that other values were removed from `R3ResolvedDependencyType`, its meaning can now be inferred from the other properties in the `R3DeclareDependencyMetadata` type. This commit removes this enum and updates the code to work without it.
…etadata. Each of the annotations had its own function for doing this, and those methods were generally employing spread operators that could allow unwanted properties to leak into the factory metadata object. This commit supplies a shared function `toFactoryMetadata()` that avoids this spread of properties into the returned function.
This enumeration will now start to appear in publicly facing code, as part of declarations, so we remove the R3 to make it less specific to the internal name for the Ivy renderer/compiler.
|
This needs public-api approval for this change https://github.com/angular/angular/pull/41231/files#diff-91d191211cf0592061a8a72cb020667a6b73e0aeea4f004fd63d4fe40e8e267e |
|
FYI, presubmits are successful for the changes in this PR. |
AndrewKushnir
left a comment
There was a problem hiding this comment.
Reviewed-for: public-api
Reviewed-for: size-tracking
atscott
left a comment
There was a problem hiding this comment.
Reviewed-for: public-api
Reviewed-for: size-tracking
jessicajaniuk
left a comment
There was a problem hiding this comment.
LGTM 🍪
reviewed-for: public-api
|
Merge-assistance: The four outstanding reviews requests are not needed and I don't seem to be able to de-request them. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
For public API reviewers, the only change is the removal of
ɵɵinjectPipeChangeDetectorRefingoldens/public-api/core/core.d.ts