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
fix(ivy): ensure overrides for 'multi: true' only appear once in final providers #33104
Conversation
Presubmit |
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.
@atscott thanks for the fix! I left a few comments. Thank you.
b98a95f
to
69b674d
Compare
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 for the changes @atscott 👍
c7cedcb
to
8255771
Compare
…in final providers
…in final providers
…in final providers
d89682d
to
bc8b418
Compare
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 for adding extra tests!
…in final providers
1092aea
to
1cd2b43
Compare
4aef656
to
19a9e1b
Compare
c8e19ca
to
7e11882
Compare
…in final providers
7e11882
to
e703834
Compare
…in final providers
…l providers (angular#33104) PR Close angular#33104
…l providers (angular#33104) PR Close angular#33104
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. |
At the moment, if you override a provider with
mutli: true
, the TestBed goes through and overrides each place where the token is provided. Then the injector processes all of them and adds each occurrence to the provider records. As a result, if you override amulti: true
provider, you get too many instances in the final output. You should only get the one that was provided in the override (see the test in this PR).