Skip to content

Scoverage linking error for Scala 3 / Scala-Native project #16124

Open
@carlosedp

Description

@carlosedp

Compiler version

Scala 3.2.0
Scala Native 0.4.7

Minimized code

//> using scala "3.2.0"
//> using platform "native"
//> using option "-coverage-out:."

@main def main = ()

Output

❯ scala-cli minimal.sc

Downloading Scala Native CLI
Compiling project (Scala 3.2.0, Scala Native)
Compiled project (Scala 3.2.0, Scala Native)
[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
Exception in thread "main" scala.scalanative.linker.LinkingException: Undefined definitions found in reachability phase
	at scala.scalanative.linker.Reach.fail(Reach.scala:976)
	at scala.scalanative.linker.Reach.reportMissing(Reach.scala:971)
	at scala.scalanative.linker.Reach.result(Reach.scala:47)
	at scala.scalanative.linker.Reach$.apply(Reach.scala:989)
	at scala.scalanative.linker.Link$.apply(Link.scala:13)
	at scala.scalanative.build.core.ScalaNative$.$anonfun$link$1(ScalaNative.scala:33)
	at scala.scalanative.build.Logger.time(Logger.scala:35)
	at scala.scalanative.build.Logger.time$(Logger.scala:32)
	at scala.scalanative.cli.utils.FilteredLogger.time(FilteredLogger.scala:5)
	at scala.scalanative.build.core.ScalaNative$.link(ScalaNative.scala:33)
	at scala.scalanative.build.Build$.$anonfun$build$1(Build.scala:68)
	at scala.scalanative.build.Logger.time(Logger.scala:35)
	at scala.scalanative.build.Logger.time$(Logger.scala:32)
	at scala.scalanative.cli.utils.FilteredLogger.time(FilteredLogger.scala:5)
	at scala.scalanative.build.Build$.build(Build.scala:58)
	at scala.scalanative.cli.ScalaNativeLd$.$anonfun$runLd$3(ScalaNativeLd.scala:71)
	at scala.scalanative.util.Scope$.apply(Scope.scala:32)
	at scala.scalanative.cli.ScalaNativeLd$.runLd(ScalaNativeLd.scala:70)
	at scala.scalanative.cli.ScalaNativeLd$.main(ScalaNativeLd.scala:44)
	at scala.scalanative.cli.ScalaNativeLd.main(ScalaNativeLd.scala)
Error: scala.build.errors.ScalaNativeBuildError: Error compiling with Scala Native
For more details, please see '/Users/cdepaula/projects/.scala-build/stacktraces/1664473443-4600949167859708090.log'

Expectation

Support SCoverage on Scala 3 Native.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions