uber/needle

Getting double results

alexvbush opened this issue · 4 comments

Seems like I'm getting double results when Needle identifies missing dependencies.

ios % needle generate upkeep/NeedleGenerated.swift Source
warning: ❗️ Could not find a provider for (userDefaults: UserDefaults) which was required by NotificationHubMenuDependency, along the DI branch of ^->AppDependencies->NotificationHubComponent->NotificationHubMenuComponent.
warning: ❗️ Could not find a provider for (userDefaults: UserDefaults) which was required by NotificationHubMenuDependency, along the DI branch of ^->AppDependencies->NotificationHubComponent->NotificationHubMenuComponent.
warning: ❗️ Missing one or more dependencies at scope.
error: 💩 Some dependencies are missing, please look at the warnings above for the list.

Is this expected or am I configuring something wrong?

Hi @alexvbush I am facing same issue please let me know how you solved the issues. I have been stuck here for 5 days.

@irfanabdulkhaliq, haven't resolved yet, although we're still on the older version of needle, not sure if it got fixed lately.
At the end of the day it's not a big issue because when you resolve all the missing dependencies it goes away and if you have any, well, then it will just show up twice in your results.

Did you solve the problem?

@alexvbush @irfanabdulkhaliq I got it, it could be due to this update.
image

If you display

warning: ❗️ Along the DI branch of ^->AppDependencies->NotificationHubComponent->NotificationHubMenuComponent, the NotificationHubMenuDependency required ( userDefaults: UserDefaults) provider.

Trying to make the NotificationHubMenuDependency's inherited class public might solve the problem!