sbt / sbt-dependency-graph

sbt plugin to create a dependency graph for your project
Apache License 2.0
1.24k stars 113 forks source link

Explanation [ not issue ] #169

Open leobenkel opened 5 years ago

leobenkel commented 5 years ago

Hello, Can anyone explain to me what

moduleGraphSbt :=
        ignoreMissingUpdate.value
          .configuration(configuration.value)
          .map(report ⇒ SbtUpdateReport.fromConfigurationReport(report, crossProjectId.value))
          .getOrElse(ModuleGraph.empty),

is doing ? Here: https://github.com/jrudolph/sbt-dependency-graph/blob/de4d508f4eaeae33f3a7343d8fc88c47efbeab1d/src/main/scala/net/virtualvoid/sbt/graph/DependencyGraphSettings.scala#L62-L63

I am trying to build my own sbt plugin to analyze dependencies and I am trying to reproduce the same graph of dependencies that you have. But I struggle with this step.

jrudolph commented 5 years ago

Here are the steps:

See

https://github.com/jrudolph/sbt-dependency-graph/blob/de4d508f4eaeae33f3a7343d8fc88c47efbeab1d/src/main/scala/net/virtualvoid/sbt/graph/backend/SbtUpdateReport.scala#L30-L55

I'd recommend to use an IDEA like IntelliJ IDEA and use "jump to definition" (ctrl-click) to discover what code like this is doing.

leobenkel commented 5 years ago

Thats what I was doing but didn't really know how SBT was working. Thank you so much for the explanation !