While trying scoverage on a JVM/JS/Native project I got multiple problems with scoverage.
Not that running sbt test works without problems.
This was tested on https://github.com/JD557/minart/tree/608500b7563ff5e34f6bb067ecbad2e74c59970f after adding addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.2"). The subproject tested wereimageNativeandimageJS`.
In case you wan to try to reproduce the problems in this project, note that you'll need libSDL.
Running sbt clean coverage test fails with:
[warn] Found a call to not defined static method Member(Top(java.util.concurrent.atomic.AtomicReferenceFieldUpdater),D10newUpdaterL15java.lang.ClassL15java.lang.ClassL16java.lang.StringL55java.util.concurrent.atomic.AtomicReferenceFieldUpdaterEo). Static methods are generated since Scala Native 0.4.3, report this bug in the Scala Native issues. Call defined at file:/home/wmazur/projects/scalacenter/scala-native/scala-native/scalalib/target/scalaSources/2.13.8/scala/collection/concurrent/TrieMap.scala:707:43
[warn] Found a call to not defined static method Member(Top(scala.collection.concurrent.INodeBase),D7updaterL55java.util.concurrent.atomic.AtomicReferenceFieldUpdaterEo). Static methods are generated since Scala Native 0.4.3, report this bug in the Scala Native issues. Call defined at file:/home/wmazur/projects/scalacenter/scala-native/scala-native/scalalib/target/scalaSources/2.13.8/scala/collection/concurrent/TrieMap.scala:33:47
[warn] Found a call to not defined static method Member(Top(scala.collection.concurrent.INodeBase),D24NO_SUCH_ELEMENT_SENTINELL16java.lang.ObjectEo). Static methods are generated since Scala Native 0.4.3, report this bug in the Scala Native issues. Call defined at file:/home/wmazur/projects/scalacenter/scala-native/scala-native/scalalib/target/scalaSources/2.13.8/scala/collection/concurrent/TrieMap.scala:907:26
[warn] Found a call to not defined static method Member(Top(scala.collection.concurrent.INodeBase),D7RESTARTL16java.lang.ObjectEo). Static methods are generated since Scala Native 0.4.3, report this bug in the Scala Native issues. Call defined at file:/home/wmazur/projects/scalacenter/scala-native/scala-native/scalalib/target/scalaSources/2.13.8/scala/collection/concurrent/TrieMap.scala:819:26
[warn] Found a call to not defined static method Member(Top(scala.collection.concurrent.INodeBase),D24NO_SUCH_ELEMENT_SENTINELL16java.lang.ObjectEo). Static methods are generated since Scala Native 0.4.3, report this bug in the Scala Native issues. Call defined at file:/home/wmazur/projects/scalacenter/scala-native/scala-native/scalalib/target/scalaSources/2.13.8/scala/collection/concurrent/TrieMap.scala:265:32
[warn] Found a call to not defined static method Member(Top(scala.collection.concurrent.INodeBase),D7RESTARTL16java.lang.ObjectEo). Static methods are generated since Scala Native 0.4.3, report this bug in the Scala Native issues. Call defined at file:/home/wmazur/projects/scalacenter/scala-native/scala-native/scalalib/target/scalaSources/2.13.8/scala/collection/concurrent/TrieMap.scala:274:22
[warn] Found a call to not defined static method Member(Top(scala.collection.concurrent.INodeBase),D24NO_SUCH_ELEMENT_SENTINELL16java.lang.ObjectEo). Static methods are generated since Scala Native 0.4.3, report this bug in the Scala Native issues. Call defined at file:/home/wmazur/projects/scalacenter/scala-native/scala-native/scalalib/target/scalaSources/2.13.8/scala/collection/concurrent/TrieMap.scala:278:20
[warn] Found a call to not defined static method Member(Top(scala.collection.concurrent.INodeBase),D24NO_SUCH_ELEMENT_SENTINELL16java.lang.ObjectEo). Static methods are generated since Scala Native 0.4.3, report this bug in the Scala Native issues. Call defined at file:/home/wmazur/projects/scalacenter/scala-native/scala-native/scalalib/target/scalaSources/2.13.8/scala/collection/concurrent/TrieMap.scala:292:58
[warn] Found a call to not defined static method Member(Top(scala.collection.concurrent.INodeBase),D7RESTARTL16java.lang.ObjectEo). Static methods are generated since Scala Native 0.4.3, report this bug in the Scala Native issues. Call defined at file:/home/wmazur/projects/scalacenter/scala-native/scala-native/scalalib/target/scalaSources/2.13.8/scala/collection/concurrent/TrieMap.scala:285:11
[warn] Found a call to not defined static method Member(Top(scala.collection.concurrent.INodeBase),D24NO_SUCH_ELEMENT_SENTINELL16java.lang.ObjectEo). Static methods are generated since Scala Native 0.4.3, report this bug in the Scala Native issues. Call defined at file:/home/wmazur/projects/scalacenter/scala-native/scala-native/scalalib/target/scalaSources/2.13.8/scala/collection/concurrent/TrieMap.scala:288:16
[warn] Found a call to not defined static method Member(Top(scala.collection.concurrent.INodeBase),D7updaterL55java.util.concurrent.atomic.AtomicReferenceFieldUpdaterEo). Static methods are generated since Scala Native 0.4.3, report this bug in the Scala Native issues. Call defined at file:/home/wmazur/projects/scalacenter/scala-native/scala-native/scalalib/target/scalaSources/2.13.8/scala/collection/concurrent/TrieMap.scala:35:63
[warn] Found a call to not defined static method Member(Top(scala.collection.concurrent.INodeBase),D24NO_SUCH_ELEMENT_SENTINELL16java.lang.ObjectEo). Static methods are generated since Scala Native 0.4.3, report this bug in the Scala Native issues. Call defined at file:/home/wmazur/projects/scalacenter/scala-native/scala-native/scalalib/target/scalaSources/2.13.8/scala/collection/concurrent/TrieMap.scala:960:22
[warn] Found a call to not defined static method Member(Top(scala.collection.concurrent.INodeBase),D24NO_SUCH_ELEMENT_SENTINELL16java.lang.ObjectEo). Static methods are generated since Scala Native 0.4.3, report this bug in the Scala Native issues. Call defined at file:/home/wmazur/projects/scalacenter/scala-native/scala-native/scalalib/target/scalaSources/2.13.8/scala/collection/concurrent/TrieMap.scala:900:26
[warn] Found a call to not defined static method Member(Top(java.util.concurrent.atomic.AtomicReferenceFieldUpdater),D10newUpdaterL15java.lang.ClassL15java.lang.ClassL16java.lang.StringL55java.util.concurrent.atomic.AtomicReferenceFieldUpdaterEo). Static methods are generated since Scala Native 0.4.3, report this bug in the Scala Native issues. Call defined at file:/home/wmazur/projects/scalacenter/scala-native/scala-native/scalalib/target/scalaSources/2.13.8/scala/collection/concurrent/TrieMap.scala:1049:122
[error] Found 21 missing definitions while linking
[error] Not found Top(java.security.SecureRandom)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\javalib\src\main\scala\java\util\UUID.scala:140
[error] Not found Member(Top(java.security.SecureRandom),RE)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\javalib\src\main\scala\java\util\UUID.scala:138
[error] Not found Top(java.util.concurrent.atomic.AtomicReferenceFieldUpdater)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:705
[error] Not found Member(Top(java.util.concurrent.atomic.AtomicReferenceFieldUpdater),D10newUpdaterL15java.lang.ClassL15java.lang.ClassL16java.lang.StringL55java.util.concurrent.atomic.AtomicReferenceFieldUpdaterEo)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:705
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:707
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:1049
[error] Not found Top(scala.collection.concurrent.BasicNode)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:429
[error] Not found Member(Top(scala.collection.concurrent.BasicNode),RE)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:456
[error] Not found Top(scala.collection.concurrent.CNodeBase)
[error] Not found Member(Top(scala.collection.concurrent.CNodeBase),RE)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:519
[error] Not found Member(Top(scala.collection.concurrent.FailedNode),D10WRITE_PREVL36scala.collection.concurrent.MainNodeuEO)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:438
[error] Not found Top(scala.collection.concurrent.Gen)
[error] Not found Member(Top(scala.collection.concurrent.Gen),RE)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:429
[error] Not found Top(scala.collection.concurrent.INodeBase)
[error] Not found Member(Top(scala.collection.concurrent.INodeBase),D24NO_SUCH_ELEMENT_SENTINELL16java.lang.ObjectEo)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:265
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:278
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:288
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:292
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:900
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:904
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:907
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:960
[error] Not found Member(Top(scala.collection.concurrent.INodeBase),D7RESTARTL16java.lang.ObjectEo)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:274
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:285
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:816
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:819
[error] Not found Member(Top(scala.collection.concurrent.INodeBase),D7updaterL55java.util.concurrent.atomic.AtomicReferenceFieldUpdaterEo)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:33
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:35
[error] Not found Member(Top(scala.collection.concurrent.INodeBase),F3genO)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:644
[error] Not found Member(Top(scala.collection.concurrent.INodeBase),F8mainnodeO)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:46
[error] Not found Member(Top(scala.collection.concurrent.INodeBase),RL31scala.collection.concurrent.GenE)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:26
[error] Not found Top(scala.collection.concurrent.MainNode)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:429
[error] Not found Member(Top(scala.collection.concurrent.MainNode),F4prevO)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:78
[error] Not found Member(Top(scala.collection.concurrent.MainNode),RE)
[error] at \home\wmazur\projects\scalacenter\scala-native\scala-native\scalalib\target\scalaSources\2.13.8\scala\collection\concurrent\TrieMap.scala:437
Running sbt projectNative coverage test fails with the following error on all external references:
methods in extern objects must have extern body - Block(List(Apply(Ident(invoked),List(Literal(Constant(2024)), Literal(Constant(D:\Projects\minart\backend\native\target\scala-3.2.0/scoverage-data))))),Block(List(Apply(Ident(invoked),List(Literal(Constant(2023)), Literal(Constant(D:\Projects\minart\backend\native\target\scala-3.2.0/scoverage-data))))),Apply(Ident(extern),List())))
Running sbt projectJS coverage test fails with the following error:
Describe the bug
While trying scoverage on a JVM/JS/Native project I got multiple problems with scoverage. Not that running
sbt test
works without problems.This was tested on https://github.com/JD557/minart/tree/608500b7563ff5e34f6bb067ecbad2e74c59970f after adding
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.2"). The subproject tested were
imageNativeand
imageJS`. In case you wan to try to reproduce the problems in this project, note that you'll need libSDL.Running
sbt clean coverage test
fails with:Running
sbt projectNative coverage test
fails with the following error on all external references:Running
sbt projectJS coverage test
fails with the following error:Expected behavior
I would expect that at least the tests would still run (even if no coverage report was generated)
What build tool are you using?
sbt
Version of scoverage
v2.0.2