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(core): some edge cases in DI debug APIs #52365
Closed
AleksanderBodurri
wants to merge
3
commits into
angular:main
from
AleksanderBodurri:di-debug-api-fixes
Closed
fix(core): some edge cases in DI debug APIs #52365
AleksanderBodurri
wants to merge
3
commits into
angular:main
from
AleksanderBodurri:di-debug-api-fixes
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AleksanderBodurri
added
the
target: patch
This PR is targeted for the next patch release
label
Oct 25, 2023
AleksanderBodurri
force-pushed
the
di-debug-api-fixes
branch
from
October 25, 2023 04:40
128edfc
to
16ee1ea
Compare
AleksanderBodurri
changed the title
fix(core): emit provider configured event when a service is configured with
fix(core): some edge cases in DI debug APIs
Oct 25, 2023
providedIn
…d with `providedIn` Previously this case was missed by the default framework injector profiler. Now in ngDevMode this event emits correctly when a service is configured with `providedIn`. This includes the case where injection tokens are configured with a `providedIn`. This commit also includes unit tests for this new case in the injector profiler.
Previously, because the platform injector does not have a provider container, this API would fail. Now, we account for this case specifically by returning the found providers immediately, without trying to calculate their importpaths. Also previously, in the case where a boostrapped standalone component did not import any feature modules, the environment injector connected to that bootstrapped component would be the root injector configured by `bootstrapApplication`. This injector is configured through a `providers` array instead of an `imports` array, and also does not have a provider container. Similarly to the platform case, we account this for this by returning the found providers immediately if there is no provider container for our standalone component.
… standalone case This is needed so that the providers configured on platform creation are picked up by the injector profiler.
AleksanderBodurri
force-pushed
the
di-debug-api-fixes
branch
from
October 25, 2023 06:23
16ee1ea
to
17576b6
Compare
AndrewKushnir
approved these changes
Oct 25, 2023
This PR was merged into the repository by commit 8ee0f27. |
dylhunn
pushed a commit
that referenced
this pull request
Oct 25, 2023
…d with `providedIn` (#52365) Previously this case was missed by the default framework injector profiler. Now in ngDevMode this event emits correctly when a service is configured with `providedIn`. This includes the case where injection tokens are configured with a `providedIn`. This commit also includes unit tests for this new case in the injector profiler. PR Close #52365
dylhunn
pushed a commit
that referenced
this pull request
Oct 25, 2023
…52365) Previously, because the platform injector does not have a provider container, this API would fail. Now, we account for this case specifically by returning the found providers immediately, without trying to calculate their importpaths. Also previously, in the case where a boostrapped standalone component did not import any feature modules, the environment injector connected to that bootstrapped component would be the root injector configured by `bootstrapApplication`. This injector is configured through a `providers` array instead of an `imports` array, and also does not have a provider container. Similarly to the platform case, we account this for this by returning the found providers immediately if there is no provider container for our standalone component. PR Close #52365
dylhunn
pushed a commit
that referenced
this pull request
Oct 25, 2023
…52365) Previously, because the platform injector does not have a provider container, this API would fail. Now, we account for this case specifically by returning the found providers immediately, without trying to calculate their importpaths. Also previously, in the case where a boostrapped standalone component did not import any feature modules, the environment injector connected to that bootstrapped component would be the root injector configured by `bootstrapApplication`. This injector is configured through a `providers` array instead of an `imports` array, and also does not have a provider container. Similarly to the platform case, we account this for this by returning the found providers immediately if there is no provider container for our standalone component. PR Close #52365
dylhunn
pushed a commit
that referenced
this pull request
Oct 25, 2023
…d with `providedIn` (#52365) Previously this case was missed by the default framework injector profiler. Now in ngDevMode this event emits correctly when a service is configured with `providedIn`. This includes the case where injection tokens are configured with a `providedIn`. This commit also includes unit tests for this new case in the injector profiler. PR Close #52365
dylhunn
pushed a commit
that referenced
this pull request
Oct 25, 2023
…52365) Previously, because the platform injector does not have a provider container, this API would fail. Now, we account for this case specifically by returning the found providers immediately, without trying to calculate their importpaths. Also previously, in the case where a boostrapped standalone component did not import any feature modules, the environment injector connected to that bootstrapped component would be the root injector configured by `bootstrapApplication`. This injector is configured through a `providers` array instead of an `imports` array, and also does not have a provider container. Similarly to the platform case, we account this for this by returning the found providers immediately if there is no provider container for our standalone component. PR Close #52365
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. |
tbondwilkinson
pushed a commit
to tbondwilkinson/angular
that referenced
this pull request
Dec 6, 2023
…d with `providedIn` (angular#52365) Previously this case was missed by the default framework injector profiler. Now in ngDevMode this event emits correctly when a service is configured with `providedIn`. This includes the case where injection tokens are configured with a `providedIn`. This commit also includes unit tests for this new case in the injector profiler. PR Close angular#52365
tbondwilkinson
pushed a commit
to tbondwilkinson/angular
that referenced
this pull request
Dec 6, 2023
…ngular#52365) Previously, because the platform injector does not have a provider container, this API would fail. Now, we account for this case specifically by returning the found providers immediately, without trying to calculate their importpaths. Also previously, in the case where a boostrapped standalone component did not import any feature modules, the environment injector connected to that bootstrapped component would be the root injector configured by `bootstrapApplication`. This injector is configured through a `providers` array instead of an `imports` array, and also does not have a provider container. Similarly to the platform case, we account this for this by returning the found providers immediately if there is no provider container for our standalone component. PR Close angular#52365
tbondwilkinson
pushed a commit
to tbondwilkinson/angular
that referenced
this pull request
Dec 6, 2023
… standalone case (angular#52365) This is needed so that the providers configured on platform creation are picked up by the injector profiler. PR Close angular#52365
ChellappanRajan
pushed a commit
to ChellappanRajan/angular
that referenced
this pull request
Jan 23, 2024
…d with `providedIn` (angular#52365) Previously this case was missed by the default framework injector profiler. Now in ngDevMode this event emits correctly when a service is configured with `providedIn`. This includes the case where injection tokens are configured with a `providedIn`. This commit also includes unit tests for this new case in the injector profiler. PR Close angular#52365
ChellappanRajan
pushed a commit
to ChellappanRajan/angular
that referenced
this pull request
Jan 23, 2024
…ngular#52365) Previously, because the platform injector does not have a provider container, this API would fail. Now, we account for this case specifically by returning the found providers immediately, without trying to calculate their importpaths. Also previously, in the case where a boostrapped standalone component did not import any feature modules, the environment injector connected to that bootstrapped component would be the root injector configured by `bootstrapApplication`. This injector is configured through a `providers` array instead of an `imports` array, and also does not have a provider container. Similarly to the platform case, we account this for this by returning the found providers immediately if there is no provider container for our standalone component. PR Close angular#52365
ChellappanRajan
pushed a commit
to ChellappanRajan/angular
that referenced
this pull request
Jan 23, 2024
… standalone case (angular#52365) This is needed so that the providers configured on platform creation are picked up by the injector profiler. PR Close angular#52365
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
action: merge
The PR is ready for merge by the caretaker
area: core
Issues related to the framework runtime
core: di
target: patch
This PR is targeted for the next patch release
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See individual commits