xerial / sbt-pack

A sbt plugin for creating distributable Scala packages.
496 stars 76 forks source link

Omitting "->compile" in dependsOn leads to the dependency not being processed #375

Open martin-stone opened 1 year ago

martin-stone commented 1 year ago

The SBT docs say:

Omitting the ->config part implies ->compile, so dependsOn(util % "test") means that the test configuration in core depends on the Compile configuration in util.

https://www.scala-sbt.org/1.x/docs/Multi-Project.html#Per-configuration+classpath+dependencies

In my case I have .dependsOn(util % "compile;it->it") and the util dependency is not packed.

I think the issue is here:

       def isCompileConfig(cp: ClasspathDep[ProjectRef]) = cp.configuration.forall(_.contains("compile->"))

https://github.com/jonfox/sbt-pack/blob/master/src/main/scala/xerial/sbt/pack/PackPlugin.scala#L417