arunkumar9t2 / scabbard

🗡 A tool to visualize Dagger 2 dependency graphs
https://arunkumar9t2.github.io/scabbard
Apache License 2.0
860 stars 35 forks source link

NoSuchMethodError: 'dagger.model.BindingGraph dagger.model.BindingGraph.create(com.google.common.graph.Network, boolean) #121

Open Jesse-Weinstein-Zonar opened 2 years ago

Jesse-Weinstein-Zonar commented 2 years ago

When I enable scabbard on my project (not FOSS, sadly, so I can't share it), the build fails with this ... less than clear error. I've observed it while using the most recent version of Dagger2, 2.44.2.

Caused by: java.lang.NoSuchMethodError: 'dagger.model.BindingGraph dagger.model.BindingGraph.create(com.google.common.graph.Network, boolean)'
    at dagger.model.BindingGraphProxies.bindingGraph(BindingGraphProxies.java:32)
    at dagger.internal.codegen.binding.BindingGraphConverter.convert(BindingGraphConverter.java:79)
    at dagger.internal.codegen.ComponentProcessingStep.isValid(ComponentProcessingStep.java:254)
    at dagger.internal.codegen.ComponentProcessingStep.processRootComponent(ComponentProcessingStep.java:151)
    at dagger.internal.codegen.ComponentProcessingStep.process(ComponentProcessingStep.java:131)
    at dagger.internal.codegen.ComponentProcessingStep.process(ComponentProcessingStep.java:62)
    at dagger.internal.codegen.validation.TypeCheckingProcessingStep.lambda$process$0(TypeCheckingProcessingStep.java:51)
    at com.google.common.collect.RegularImmutableMap.forEach(RegularImmutableMap.java:185)
    at dagger.internal.codegen.validation.TypeCheckingProcessingStep.process(TypeCheckingProcessingStep.java:48)
    at dagger.internal.codegen.ComponentProcessingStep.process(ComponentProcessingStep.java:124)
    at dagger.internal.codegen.ComponentProcessingStep.process(ComponentProcessingStep.java:62)
    at dagger.internal.codegen.statistics.DaggerStatisticsCollectingProcessingStep.process(DaggerStatisticsCollectingProcessingStep.java:52)
    at dagger.shaded.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:330)
    at dagger.shaded.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:181)
    at org.gradle.api.internal.tasks.compile.processing.DelegatingProcessor.process(DelegatingProcessor.java:62)
        ...

I'm still working on trying to debug it, but wanted to drop an issue here, mainly just in case anyone else comes across it, they will know. they aren't alone.

arunkumar9t2 commented 2 years ago

Thanks for reporting, may I know the Dagger version you are using and if upgrading Dagger fixes it?

Jesse-Weinstein-Zonar commented 2 years ago

Whoops, forgot that -- I can confirm that I see the problem when using the most current version of Dagger2, 2.44.2.