galex
02/05/2024, 4:58 AMArun
02/05/2024, 4:59 AMgalex
02/05/2024, 5:01 AMgalex
02/06/2024, 7:09 AMbindingGraph?.network()?.nodes()
?.groupBy(BindingGraph.Node::componentPath)
?.forEach { (componentPath, nodes) ->
nodes.forEach {
println("Node = $it")
}
}
For example, if my missing binding is AccountConfigRepository
, I can't find it in what is printed here, but I still get it from Dagger as an error.
What am I missing?galex
02/06/2024, 7:10 AMfullBindingGraphValidation
:
kapt {
arguments {
arg("dagger.fullBindingGraphValidation", "ERROR")
}
}
galex
02/06/2024, 8:21 AMArun
02/06/2024, 8:27 AMarg("dagger.fullBindingGraphValidation", "WARNING")
instead as I think, ERROR will exit early. You need to validation to ignore the missing binding error so that your spi plugin can process the invalid graph.
Also note that your SPI plugin will be called twice, one for full graph and one for actual graph https://github.com/google/dagger/issues/1711#issuecomment-580831487
THe missing binding will be only available in the full graph and not the final graph.
You can compare with my impl in one of my projects where I added missing binding visualization https://github.com/arunkumar9t2/scabbard/releases/tag/0.5.0galex
02/06/2024, 8:45 AM