Can dagger compilation errors be improved to make it easier to locate problems?

52 views
Skip to first unread message

Thorbjørn Ravn Andersen

unread,
May 8, 2017, 6:30:30 AM5/8/17
to Dagger Discuss
I have a situation where I after reworking some core functionality accidentially broke my Dagger configuration.  

The following is the single error message:

---
Error:(59, 14) java: java.util.function.Supplier<dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.DomsItem> cannot be provided without an @Provides-annotated method.
      dk.statsbiblioteket.digital_pligtaflevering_aviser.tools.main.ValidateMetadataMain.ValidateMetadataModule.provideTool(java.lang.String eventName, dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.QuerySpecification workToDoQuery, dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.DomsRepository domsRepository, java.util.function.Function<dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.DomsItem,dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.ToolResult> processDelivery, dk.statsbiblioteket.digital_pligtaflevering_aviser.harness.DefaultToolMXBean mxBean)
          [parameter: java.util.function.Function<dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.DomsItem,dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.ToolResult> processDelivery]
      dk.statsbiblioteket.digital_pligtaflevering_aviser.tools.main.ValidateMetadataMain.ValidateMetadataModule.provideDeliveryProcessor(java.util.function.Function<dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.DomsItem,java.util.stream.Stream<javaslang.control.Try<dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.ToolResult>>> processDeliveryChild, java.util.stream.Collector<javaslang.control.Try<dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.ToolResult>,dk.statsbiblioteket.digital_pligtaflevering_aviser.tools.main.ValidateMetadataMain.ValidateMetadataModule.OkFailThrown,dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.ToolResult> toolResultCollector)
          [parameter: java.util.stream.Collector<javaslang.control.Try<dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.ToolResult>,dk.statsbiblioteket.digital_pligtaflevering_aviser.tools.main.ValidateMetadataMain.ValidateMetadataModule.OkFailThrown,dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.ToolResult> toolResultCollector]
      dk.statsbiblioteket.digital_pligtaflevering_aviser.tools.main.ValidateMetadataMain.ValidateMetadataModule.provideToolResultCollector(java.util.function.Supplier<dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.DomsItem> domsItemSupplier)
          [parameter: java.util.function.Supplier<dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.DomsItem> domsItemSupplier]

---

I understand the error message (when reading carefully) but the amount of help you get to locate the problematic code is at best rather limited.   

Question is, can this situation be improved?  Could there (eventually) be a separate message for each failed step indicating where that step actually was (i.e. so I can have my IDE easily navigate to provideTool(), provideDeliveryProcessor() and provideToolResultCollector() respectively?) or is this a limitation in the APIs available at that point?


Reply all
Reply to author
Forward
0 new messages