-
Notifications
You must be signed in to change notification settings - Fork 26.7k
Fix importProvidersFrom interaction with ModuleWithProviders #45722
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.
@alxhub looks great, just a couple comments with additional use-cases to consider.
|
@alxhub FYI I've addressed the comments and pushed a couple fixup commits. This PR is ready for review. // cc @pkozlowski-opensource |
cf3aee2 to
0494b68
Compare
0494b68 to
6de6893
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 🍪
reviewed-for: public-api
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.
reviewed-for: public-api
This commit moves the ModuleWithProviders type from `metadata` to `di`, avoiding the need for `di` to reference `metadata` (in this particular case).
…idersFrom` There were two problems with the `importProvidersFrom` function related to `ModuleWithProviders` values: * The public type did not accept `ModuleWithProviders` values directly. * The implementation of `walkProviderTree` delegates collection of MWP providers to its caller, in order for the ordering of such providers to be correct. However, `importProvidersFrom` was not performing that collection, causing MWP providers passed in at the top level to be dropped.
…ortProvidersFrom`
6de6893 to
1ed66c6
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.
Reviewed-for: public-api
(note: I've pushed a fixup commit, but it didn't affect the public API, so I can review/approve the public API change)
|
This PR was merged into the repository by commit 882f595. |
…idersFrom` (#45722) There were two problems with the `importProvidersFrom` function related to `ModuleWithProviders` values: * The public type did not accept `ModuleWithProviders` values directly. * The implementation of `walkProviderTree` delegates collection of MWP providers to its caller, in order for the ordering of such providers to be correct. However, `importProvidersFrom` was not performing that collection, causing MWP providers passed in at the top level to be dropped. PR Close #45722
|
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. |
There were two problems with the
importProvidersFromfunction related toModuleWithProvidersvalues:ModuleWithProvidersvalues directly.walkProviderTreedelegates collection of MWP providersto its caller, in order for the ordering of such providers to be correct.
However,
importProvidersFromwas not performing that collection, causing MWPproviders passed in at the top level to be dropped.