-
-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scoverage HTML report generation fails #3857
Comments
Yeah, coverage is busted with scala 3. I ran into this last week (simply changing the scala version from 3.x to 2.13.x in the build makes it work) In scala 3, coverage is actually computed/generated by scala itself, so the coverage files having the wrong path seems to point to maybe bad path related args being passed to the compiler? I have no idea. |
Note: this affects the xml report and cobertura xml report as well. |
The console report seems to be unaffected, but it only prints the percentages. Scala 3 is not the problem here. The coverage report was generated just fine by Scala In 7da0265 the paths passed to the report generation were changed from |
@leon-becker-secforge Sorry - did not mean to imply that scala 3 itself is the problem, moreso that mill interfacing with scala3, etc is the problem. The same codebase and mill version will produce reports correctly with 2.x (specifically, it will produce the coverage file correctly, as it uses scoverage for that, whereas with scala3, mill only uses scoverage for the report generation portion). |
Yes it seems to be caused by the change in working directory from the workspace root to the |
Hmm, accoding to the dotty docs on coverage:
That doc also links to the original scala 3 PR that brought in instrumentation. |
Hi,
after upgrading to mill 0.12.0 the HTML report for coverage cannot be generated anymore and shows the following error:
Trace
I am using WSL2 under Windows 11, but the exception also happens in the default Linux runner on GitHub.
When looking into the generated coverage files, I suspect this to be caused by the newly introduced sandboxing and changing the working directory of one of the used processes.
coverage files
Note:
build.sc
was located at/mnt/c/Users/LeonAlexanderBeckers/Desktop/repr
and is using the files given in the reproduction section.data.dest/scoverage.coverage
under 0.12.0data.dest/scoverage.coverage
under 0.11.8Steps reproduce
mill Demo.test
mill Demo.scoverage.htmlReport
=> we see the error0.11.8
mill Demo.test
mill Demo.scoverage.htmlReport
=> we see no errorCode files
.mill-version
0.12.0
build.sc
Demo/src/Main.scala
Demo/test/src/Main.scala
The text was updated successfully, but these errors were encountered: