-
Notifications
You must be signed in to change notification settings - Fork 26.6k
fix(ivy): reorder provider type checks to align with VE #34433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a test that verifies this behavior with a comment that links to the Jira?
Also - there's a typo in the commit message: orderering => ordering
The ordering matters because we don't currently throw if multiple configurations are provided (i.e. provider has *both* useExisting and useFactory). We should actually throw an error in this case, but to avoid another breaking change in v9, this PR simply aligns the Ivy behavior with ViewEngine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
The ordering matters because we don't currently throw if multiple configurations are provided (i.e. provider has *both* useExisting and useFactory). We should actually throw an error in this case, but to avoid another breaking change in v9, this PR simply aligns the Ivy behavior with ViewEngine. PR Close #34433
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. |
The orderering matters because we don't currently throw if multiple
configurations are provided (i.e. provider has both useExisting and
useFactory). We should actually throw an error in this case, but to
avoid another breaking change in v9, this PR simply aligns the Ivy
behavior with ViewEngine.
current Ivy:
angular/packages/core/src/di/r3_injector.ts
Lines 485 to 488 in d0a04bf
VE:
angular/packages/core/src/di/injector.ts
Lines 206 to 209 in d0a04bf