feat($injector): report circularity in circular dependency error message#7500
feat($injector): report circularity in circular dependency error message#7500teropa wants to merge 1 commit intoangular:masterfrom
Conversation
Change the error message for a circular dependency to display the full circle back to the first service being instantiated, so that the problem is obvious. The previous message stopped one dependency short of the full circle. Changes the content of the cdep error message, which may be considered a breaking change.
|
Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.
If you need to make changes to your pull request, you can update the commit with Thanks again for your help! |
|
When I see a circular dependency error, the problem usually isn't obvious to me at first glance. This change would make it obvious. |
|
+1000 for that! |
|
+1 for this, would help. |
|
@IgorMinar this is pretty tiny, just a change to how the error is reported, it looks okay to me. I think you could even mark this as a fix. Anyways, since it is marked as a feature, I'd like to get someone else to look at it as well, but it LGTM |
|
I think it's reasonable. +1 for this being a "fix." |
Change the error message for a circular dependency to display the full circle back to the first service being instantiated, so that the problem is obvious. The previous message stopped one dependency short of the full circle. Changes the content of the cdep error message, which may be considered a breaking change. Closes #7500
Request Type: feature
How to reproduce:
Component(s): di
Impact: medium
Complexity: small
This issue is related to:
Detailed Description:
Change the error message for a circular dependency to display the full
circle back to the first service being instantiated, so that the problem
is obvious:
The previous message stopped one dependency short of the full
circle:
Other Comments:
Changes the content of the cdep error message, which may be considered
a breaking change.