com-lihaoyi / mill

Your shiny new Java/Scala build tool!

Home Page:https://mill-build.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[0.11.2 to 0.11.3 Migration] Breaking change in runClasspath causing issues with precedence (for example tests or resources)

fabianhjr-dealengine opened this issue · comments

https://github.com/com-lihaoyi/mill/blob/0.11.2/scalalib/src/mill/scalalib/JavaModule.scala#L422-L429

vs

https://github.com/com-lihaoyi/mill/blob/0.11.3/scalalib/src/mill/scalalib/JavaModule.scala#L420-L426

From #2735

Causes a breaking change where, for example, a test module has a different resource definition than the main module and doesn't take precedence.

This isn't a request for a fix/change currently making a workaround and experimenting and leaving it in case someone else gets into a similar situation.

Workaround:

override def runClasspath: T[Seq[PathRef]] = T {
    resolvedRunIvyDeps().toSeq ++ localClasspath() ++ transitiveLocalClasspath()
}