Skip to content

Wrong error message for non-async dependency #69

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
rhalff opened this issue Apr 22, 2020 · 1 comment
Closed

Wrong error message for non-async dependency #69

rhalff opened this issue Apr 22, 2020 · 1 comment

Comments

@rhalff
Copy link

rhalff commented Apr 22, 2020

It seems the error message is wrong when a non-async dependency is added to the dependsOn list when using registerSingletonAsync.

e.g:

..registerSingletonAsync<MyAsyncService>(
  () => MyAsyncService()..init(),
   dependsOn: [
      MySyncService,
   ],
)

Would give:

Invalid argument(s): Dependent Type MySyncService is an async Singleton

In this case MySyncService is a non-async singleton.

It should probably read: "is not an async Singleton"

@escamoteur
Copy link
Collaborator

Thanks for spotting. Fixed in next version

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