Repository navigation
Scoverage aggregation for multi-module project with module dependencies #7368
Unanswered
MathPlayer
asked this question in
Q&A
Replies: 1 comment
|
I think I found the surface of why this happens:
Should PS: All looks fine with a brute alteration with the idea above in the demo object bar extends BaseModule {
def moduleDeps = Seq(foo)
object test extends Tests {
override def runClasspath = Task {
lazy val fooClasses = foo.compile().classes
lazy val fooScoverageClasses = foo.scoverage.compile().classes
super.runClasspath().map { path =>
if (path == fooClasses) fooScoverageClasses else path
}
}
}
}I guess a generic idea should be done here, like get all scoverage classes from the whole tree of module deps and replace any compile ones with scoverage ones. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi!
I am porting from
sbttoMilla multi-module project and I have an issue related to scoverage aggregation.Can someone have a look at the info below and tell me if I'm not doing some configuration or if there's something extra to be done by mill for the scoverage plugin?
Somehow,
Milldoesn't consider transitive dependencies for aggregated coverage metrics.I attached a minimalist project with both build systems configured: scoverage-demo.tar.gz
I'm pasting below excerpts from the README/build files for faster reading about the attached project (the README also contains commands to run to build / test / generate the coverage).
In short, there are two modules:
foo(base module)Foo(math methods)FooTestnot covering any code fromFoo.bar(depends onfoo)Bar(usesFoomath methods)BarTest, covering code from bothBarandFoo.When all tests run and scoverage aggregation happens,
fooshould have the same coverage value with bothsbtandmill.The actual results:
millobtains 0% statement/branch coverage onfoosbtobtains 75% statement coverage, 50% branch coverage forfooThe
build.millcontent:The
build.sbtcontent:All reactions