injectable icon indicating copy to clipboard operation
injectable copied to clipboard

Missing dependencies warning when an abstract class extends on another abstract

Open starlight173 opened this issue 3 years ago • 3 comments

abstract class A {} 

abstract class B extends A {}

@LazySingleton(as: B)
class ApiClient extends B { }

class UserRepository {B client}

When I run the generator, I got the warning like

Missing dependencies in microsat/services/injection/injection.dart
[UserRepository] depends on unregistered type [B]

How can I get rid of this warning ?

starlight173 avatar Sep 04 '20 03:09 starlight173

This is after the latest update, I'm seeing this too but it doesn't break my code and it runs successfully.

amebrahimi avatar Sep 09 '20 12:09 amebrahimi

Mine's broken.

nhwilly avatar Oct 06 '20 21:10 nhwilly

as mentioned in #125 use ignoreUnregisteredTypes: [B] in your InjectableInit configuration to mute the warnings

adamsmaka avatar Jul 15 '21 09:07 adamsmaka