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

Bug when resolving some dependencies #48

Open
sedestrian opened this issue Jul 9, 2021 · 0 comments
Open

Bug when resolving some dependencies #48

sedestrian opened this issue Jul 9, 2021 · 0 comments

Comments

@sedestrian
Copy link

Hello, i have a bug when trying to resolve a dependency that i have in multiple targets

My componentStack is this:

(lldb) po self.componentStack
▿ 8 elements
  ▿ 0 : 2 elements
    ▿ key : AnyHashable(DIKit.ComponentIdentifier(tag: nil, type: Restaurants.RestaurantsLocalDataSource))
      ▿ value : ComponentIdentifier
        - tag : nil
        - type : Restaurants.RestaurantsLocalDataSource
    ▿ value : <Component<RestaurantsLocalDataSource>: 0x600000b0c060>
  ▿ 1 : 2 elements
    ▿ key : AnyHashable(DIKit.ComponentIdentifier(tag: nil, type: Restaurants.RestaurantsRemoteDataSource))
      ▿ value : ComponentIdentifier
        - tag : nil
        - type : Restaurants.RestaurantsRemoteDataSource
    ▿ value : <Component<RestaurantsRemoteDataSource>: 0x600000b0c120>
  ▿ 2 : 2 elements
    ▿ key : AnyHashable(DIKit.ComponentIdentifier(tag: nil, type: RestaurantList.RestaurantListViewModel))
      ▿ value : ComponentIdentifier
        - tag : nil
        - type : RestaurantList.RestaurantListViewModel
    ▿ value : <Component<RestaurantListViewModel>: 0x600000b14360>
  ▿ 3 : 2 elements
    ▿ key : AnyHashable(DIKit.ComponentIdentifier(tag: nil, type: Chopsticks.StartupViewModel))
      ▿ value : ComponentIdentifier
        - tag : nil
        - type : Chopsticks.StartupViewModel
    ▿ value : <Component<StartupViewModel>: 0x600000b043c0>
  ▿ 4 : 2 elements
    ▿ key : AnyHashable(DIKit.ComponentIdentifier(tag: nil, type: Swift.Optional<__C.FIRApp>))
      ▿ value : ComponentIdentifier
        - tag : nil
        - type : Swift.Optional<__C.FIRApp>
    ▿ value : <Component<Optional<FIRApp>>: 0x600000b04360>
  ▿ 5 : 2 elements
    ▿ key : AnyHashable(DIKit.ComponentIdentifier(tag: nil, type: RealmSwift.Realm))
      ▿ value : ComponentIdentifier
        - tag : nil
        - type : RealmSwift.Realm
    ▿ value : <Component<Realm>: 0x600000b14240>
  ▿ 6 : 2 elements
    ▿ key : AnyHashable(DIKit.ComponentIdentifier(tag: nil, type: Restaurants.RestaurantRepository))
      ▿ value : ComponentIdentifier
        - tag : nil
        - type : Restaurants.RestaurantRepository
    ▿ value : <Component<RestaurantRepository>: 0x600000b0c000>
  ▿ 7 : 2 elements
    ▿ key : AnyHashable(DIKit.ComponentIdentifier(tag: nil, type: FIRFirestore))
      ▿ value : ComponentIdentifier
        - tag : nil
        - type : FIRFirestore
    ▿ value : <Component<FIRFirestore>: 0x600000b14300>

The identifier is this:

(lldb) po identifier
▿ ComponentIdentifier
  - tag : nil
  - type : FIRFirestore

But this still finds no matching component in the stack.
I have a module providing the dependency in one target (dynamic framework) of my app, and the dependency itself is requested in another target

Schermata 2021-07-09 alle 15 32 00

Schermata 2021-07-09 alle 15 32 31

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