com-lihaoyi/mill

ivyDepsTree does not show transitive dependencies

francisdb opened this issue · 5 comments

loggingLogentries.ivyDepsTree()()
[4/4] loggingLogentries.ivyDepsTree
└─ com.logentries:logentries-appender:1.1.38

but this module also depends on akka through transitive moduleDeps ivyDeps

On a side note
logentries-appender also has transitive dependencies, but these seem to be marked as optional (http://search.maven.org/#artifactdetails|com.logentries|logentries-appender|1.1.38|pom)

@francisdb you're probably going to have to dig through the code using ivy/coursier, debug this yourself, and explain to us the solution 😛 I know ivy/coursier as little as anyone else... I don't even know what an optional dependency means, or if this is a problem or not

This is probably related to #211

Not fixed by #211
mill show loggingLogentries.compileClasspath contains more than the dependencyTree

Should be fixed by b9e9b68

I can't reproduce it because there is not enough information here to repro; if it's still happening send a PR with a test case and I'll be able to fix it properly

Please re-open, here is the requested reproducer:

Calling ivyDepsTree on both modules should give the same results but on bar the tree is empty

import mill._
import mill.scalalib._
object foo extends ScalaModule {
  def scalaVersion = "2.12.4"
  def ivyDeps = Agg(
    ivy"com.typesafe.play::play-json:2.6.8"
  )
}
object bar extends ScalaModule {
  def moduleDeps = Seq(foo)
  def scalaVersion = "2.12.4"
}
➜  test ~/Downloads/0.1.7-77-44ed2e bar.ivyDepsTree
[4/4] bar.ivyDepsTree
➜  test ~/Downloads/0.1.7-77-44ed2e foo.ivyDepsTree
[4/4] foo.ivyDepsTree
└─ com.typesafe.play:play-json_2.12:2.6.8
   ├─ com.fasterxml.jackson.core:jackson-annotations:2.8.9
   ├─ com.fasterxml.jackson.core:jackson-core:2.8.9
   ├─ com.fasterxml.jackson.core:jackson-databind:2.8.9
   │  ├─ com.fasterxml.jackson.core:jackson-annotations:2.8.0 -> 2.8.9
   │  └─ com.fasterxml.jackson.core:jackson-core:2.8.9
   ├─ com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.8.9
   │  ├─ com.fasterxml.jackson.core:jackson-core:2.8.9
   │  └─ com.fasterxml.jackson.core:jackson-databind:2.8.9
   │     ├─ com.fasterxml.jackson.core:jackson-annotations:2.8.0 -> 2.8.9
   │     └─ com.fasterxml.jackson.core:jackson-core:2.8.9
   ├─ com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.8.9
   │  ├─ com.fasterxml.jackson.core:jackson-annotations:2.8.0 -> 2.8.9
   │  ├─ com.fasterxml.jackson.core:jackson-core:2.8.9
   │  └─ com.fasterxml.jackson.core:jackson-databind:2.8.9
   │     ├─ com.fasterxml.jackson.core:jackson-annotations:2.8.0 -> 2.8.9
   │     └─ com.fasterxml.jackson.core:jackson-core:2.8.9
   ├─ com.typesafe.play:play-functional_2.12:2.6.8
   │  └─ org.scala-lang:scala-library:2.12.2
   ├─ joda-time:joda-time:2.9.9
   ├─ org.scala-lang:scala-library:2.12.2
   ├─ org.scala-lang:scala-reflect:2.12.2
   │  └─ org.scala-lang:scala-library:2.12.2
   └─ org.typelevel:macro-compat_2.12:1.1.1
      └─ org.scala-lang:scala-library:2.12.0 -> 2.12.2

the compileClasspath for bar does contain the dependencies

➜  test ~/Downloads/0.1.7-77-44ed2e show bar.compileClasspath
[1/1] show
[28/36] bar.resources
[
    {
        "path": "/Users/francisdb/workspace/test/foo/resources",
        "quick": false,
        "sig": -914035544
    },
    {
        "path": "/Users/francisdb/workspace/test/out/foo/compile/dest/classes",
        "quick": false,
        "sig": -914035544
    },
    {
        "path": "/Users/francisdb/workspace/test/bar/resources",
        "quick": false,
        "sig": -914035544
    },
    {
        "path": "/Users/francisdb/.coursier/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.4/scala-library-2.12.4.jar",
        "quick": true,
        "sig": 1584311055
    },
    {
        "path": "/Users/francisdb/.coursier/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.12.2/scala-reflect-2.12.2.jar",
        "quick": true,
        "sig": 1460944155
    },
    {
        "path": "/Users/francisdb/.coursier/cache/v1/https/repo1.maven.org/maven2/com/typesafe/play/play-json_2.12/2.6.8/play-json_2.12-2.6.8.jar",
        "quick": true,
        "sig": -1915147611
    },
...