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

Validate registrations #170

Open
Keboo opened this issue Apr 7, 2021 · 0 comments
Open

Validate registrations #170

Keboo opened this issue Apr 7, 2021 · 0 comments

Comments

@Keboo
Copy link
Owner

Keboo commented Apr 7, 2021

In many cases AutoDI knows what is being registered, and knows what dependencies may be asked of it.
It would be great if there was an opt-in warning for detecting when a dependent service may be used, but is not registered.
I would imagine the logic would be something like:

  1. Iterate over all of the registered types and build a list of their dependencies
  2. For each of the dependencies ensure that there is a matching registration
  3. Display warnings for all dependencies that are not registered

Consider possibly checking the setup method as well, or at least allowing for a run-time method that can do the checks.

This would also require making this feature opt-in, as well as being able to ignore types.

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

No branches or pull requests

1 participant