Code coverage crashes at runtime
See original GitHub issueI was testing the new coverage support for scala3 with:
The latest version of sbt-scoverage
https://github.com/scoverage/sbt-scoverage/tree/V2
with https://github.com/scoverage/sbt-scoverage/blob/V2/src/main/scala/scoverage/ScoverageSbtPlugin.scala#L162 set to 3.2.0-RC1-bin-SNAPSHOT
This call crashes with the instrumented code:
Compiler version
latest (main branch)
Minimized code
import java.nio.file._
import java.io.File
extension (v: Int) {
def save(): File = {
Files.createTempDirectory("porc-epic").toFile
}
}
1.save()
Output (click arrow to expand)
java.lang.ClassCastException: class scala.collection.immutable.ArraySeq$ofRef cannot be cast to class [Ljava.nio.file.attribute.FileAttribute; (scala.collection.immutable.ArraySeq$ofRef is in unnamed module of loader sbt.internal.ScalaLibraryClassLoader @53bcaacb; [Ljava.nio.file.attribute.FileAttribute; is in module java.base of loader 'bootstrap')
at porcEpic.Visualization$package$.save(Visualization.scala:61)
at porcEpic.unit.VisualizationTest.$init$$$anonfun$2(VisualizationTest.scala:91)
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Xcode 11.4 - Crash when code cover… - Apple Developer
Based on the stack trace, there appears to be a crash occurring in the profiling runtime (which accumulates code coverage data during the...
Read more >How to stop Code Coverage from crashing because of sinon ...
Issue: code coverage not working when sinon is a dependency. I currently have 3 test files. Running all the tests lead to 17...
Read more >Troubleshooting Code Coverage - Visual Studio (Windows)
Explanation—Code coverage analysis is done while tests are running. It only includes assemblies that are loaded into memory when the tests run.
Read more >Visual Studio 2019 crashes when 'Show code coverage ...
Visual Studio 2019 crashes when 'Show code coverage coloring" is clicked after running "Analyze Code Coverage For All Tests".
Read more >Does Unit-Tested Code Crash? A Case Study of Eclipse - arXiv
Unit-testing, crash incident reports, code coverage, stack traces, software reliability. ∗Chioteli collected the unit testing results and performed the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue has a really high concentration of Guillaumes 😅
Guillaume³ taking over the world.