Skip to content

registerLazySingletonAsync not working with dependsOn #341

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

Closed
feinstein opened this issue Aug 17, 2023 · 3 comments
Closed

registerLazySingletonAsync not working with dependsOn #341

feinstein opened this issue Aug 17, 2023 · 3 comments

Comments

@feinstein
Copy link

feinstein commented Aug 17, 2023

I have been trying for countless hours understand why my objects weren't being created, it turns out I had marked a class on dependsOn that was being created by a registerLazySingletonAsync. Removing the dependsOn or changing the registerLazySingletonAsync to a registerSingletonAsync fixed it. So I believe registerLazySingletonAsync aren't working with the dependsOn dependency resolution, as this factory is never triggered.

@escamoteur
Copy link
Collaborator

yep, that is indeed the behavior as intended. asyncLazySingletngs are not included in the dependson feature

@feinstein
Copy link
Author

This should at least be documented. How could I know that some ways of registering a dependency will be a part of the dependency tree check, while others will be ignored?

@escamoteur
Copy link
Collaborator

escamoteur commented Aug 20, 2023 via email

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

2 participants