Closed romain-gilles-ultra closed 4 months ago
A remark: If you change the Mill version to 0.11.6
in the .mill-version
file then the issue is no longer there
Thank you for reporting it.
I think it might be related to this change, which was released in Mill 0.11.7.
The idea behind the change was, that we don't want to see each scoverage module twice, esp. as IDEA isn't very great at navigating sources which belong to more than one module.
But since scoverage tests don't depend on the outer
module but the outer.scoverage
modules, which contains the enhanced classfiles, but is is no longer visible to IDEA, we miss it completely.
Here is a workaround:
--- a/build.sc
+++ b/build.sc
@@ -11,6 +11,10 @@
ivy"com.lihaoyi::mainargs:0.6.2"
)
+ override lazy val scoverage: ScoverageData = new ScoverageData {
+ def skipIdea = false // or foo.skipIdea
+ }
+
object test extends ScoverageTests with ScalaTests {
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.7.11")
def testFramework = "utest.runner.Framework"
Scoverage conflict with GenIdea
Config
Mill version
0.11.7
Issue
I found an issue/conflict when I used ScoverageModule. If I add Scoverage to my project then the idea integration produces faulty configuration. When I add Scoverage, by following the documentation: https://mill-build.com/mill/contrib/scoverage.html, the dependency between the test module and its parent module disappears :( I was able to reproduce it with the
1-simple-scala
example. Here is the modified version:After executing
mill mill.idea.GenIdea/idea
you wont find the module decalaration to the root module in the.idea/mill_modules/test.iml
The original version of the example produces:
After applying the
scoverage
configuration this line is missing:Reproduction
You can find the reproduction in the following repository: https://github.com/romain-gilles-ultra/mill-scoverage-idea