Giter VIP home page Giter VIP logo

Comments (7)

ckipp01 avatar ckipp01 commented on June 10, 2024 2

Ahhh, actually the issue is here:

https://repo1.maven.org/maven2/io/netty/netty-tcnative-boringssl-static/2.0.54.Final/netty-tcnative-boringssl-static-2.0.54.Final.pom

Since the classifiers aren't really taken into account it will end up just being a recursive dependency on itself, hence the stack overflow. I'll have to guard against this.

Of course I had a TODO to look at this lol

image

from mill-github-dependency-graph.

ckipp01 avatar ckipp01 commented on June 10, 2024 1

welp, turning on debugging shows the issue ha. Internally I'm using the coursier tree and when I look at it I see:

│  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  │  │  │  └─ io.netty:netty-tcnative-classes:2.0.54.Final
│  │  │  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  │  │  │  └─ io.netty:netty-tcnative-classes:2.0.54.Final
│  │  │  │  │  │  │  └─ io.netty:netty-tcnative-classes:2.0.54.Final
│  │  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  │  │  │  └─ io.netty:netty-tcnative-classes:2.0.54.Final
│  │  │  │  │  │  │  └─ io.netty:netty-tcnative-classes:2.0.54.Final
│  │  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  │  │  │  └─ io.netty:netty-tcnative-classes:2.0.54.Final
│  │  │  │  │  │  │  └─ io.netty:netty-tcnative-classes:2.0.54.Final
│  │  │  │  │  │  └─ io.netty:netty-tcnative-classes:2.0.54.Final
│  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  │  │  │  └─ io.netty:netty-tcnative-classes:2.0.54.Final
│  │  │  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  │  │  │  └─ io.netty:netty-tcnative-classes:2.0.54.Final
│  │  │  │  │  │  │  └─ io.netty:netty-tcnative-classes:2.0.54.Final
│  │  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  │  │  │  └─ io.netty:netty-tcnative-classes:2.0.54.Final
│  │  │  │  │  │  │  └─ io.netty:netty-tcnative-classes:2.0.54.Final
│  │  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
│  │  │  │  │  │  │  │  └─ io.netty:netty-tcnative-classes:2.0.54.Final
│  │  │  │  │  │  │  └─ io.netty:netty-tcnative-classes:2.0.54.Final
│  │  │  │  │  │  └─ io.netty:netty-tcnative-classes:2.0.54.Final
│  │  │  │  │  ├─ io.netty:netty-tcnative-boringssl-static:2.0.54.Final
...

You can see this if you do a mill __.ivyDepsTree for example. It seems that com.linecorp.armeria:armeria:1.20.3 is the culprit since you can even do a:

cs resolve com.linecorp.armeria:armeria:1.20.3 -t

And you get a nice 3k line tree of a ton of recursive netty stuff.

from mill-github-dependency-graph.

ghostbuster91 avatar ghostbuster91 commented on June 10, 2024 1

I confirm, it works now. Thanks @ckipp01 🥇

from mill-github-dependency-graph.

ckipp01 avatar ckipp01 commented on June 10, 2024

Ooof, that's not good. Thanks for the report! I just tried locally and got the same, I'll dig in and see what I can find out.

from mill-github-dependency-graph.

ghostbuster91 avatar ghostbuster91 commented on June 10, 2024

Awesome @ckipp01 thanks for the quick reaction! :)

from mill-github-dependency-graph.

ckipp01 avatar ckipp01 commented on June 10, 2024

Just reporting back that this actually isn't quite what I expected. While I do need to handle classifiers, that's not actually the cause of the issue here. Even without process them, it should basically just skip them since it thinks it saw them already. The issues is that with coursier the DependencyTree actually seems to have recursive children. For example:

//> using scala "2.13.10"
//> using lib "io.get-coursier::coursier:2.1.0-RC5"
//> using lib "com.lihaoyi::pprint:0.8.1"
//> using option "-Ywarn-unused"

import coursier._
import coursier.graph.DependencyTree
import scala.annotation.tailrec
import coursier.util.Print

object Main extends App {
  val resolution = Resolve()
    .addDependencies(dep"io.netty:netty-tcnative-boringssl-static:2.0.54.Final")
    .run()

  val tree = DependencyTree(resolution).head

  var count = 0

  @tailrec
  def iterate(
      allDependencies: Seq[DependencyTree],
      tree: DependencyTree
  ): Seq[DependencyTree] = tree.children match {
    case Nil             => allDependencies
    case _ =>
      count = count + 1
      println(count)
      iterate(allDependencies :+ tree, tree.children.head)
  }

  val allDependencies = iterate(Seq.empty, tree)

  println(allDependencies.size)
}

Will just go on forever. I wouldn't really expect that and it breaks my assumptions. I do see that with the same resolution if I add in:

  println(
    Print.dependencyTree(
      resolution = resolution,
      roots = Seq(dep"io.netty:netty-tcnative-boringssl-static:2.0.54.Final")
    )
  )

It does print it, albeit huge. I'm not sure if Coursier is doing so magic internally that is somehow preventing the cyclical dep issue or what, but further down the rabbit hole I go.

from mill-github-dependency-graph.

ckipp01 avatar ckipp01 commented on June 10, 2024

Alright @ghostbuster91 a new https://github.com/ckipp01/mill-dependency-submission has been released and the V1 tag updated, so this should be 🟢 on your next attempt.

from mill-github-dependency-graph.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.