Skip to content
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

Warn on usage of ChildSingleton inside of singletons #27

Open
tessig opened this issue May 7, 2021 · 0 comments
Open

Warn on usage of ChildSingleton inside of singletons #27

tessig opened this issue May 7, 2021 · 0 comments

Comments

@tessig
Copy link
Member

tessig commented May 7, 2021

If a binding is declared as dingo.ChildSingleton, it has different instances for each area.
If a dingo.Singleton gets a dingo.ChildSingleton via injection, it is unclear from which area the instance will come and can lead to unwanted behaviour.

We should declare this as misusage of the ChildSingleton pattern and at least warn the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant