Skip to content
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 linking error for Scala 3 / Scala-Native project #16124

Open
carlosedp opened this issue Sep 29, 2022 · 3 comments
Open

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

carlosedp opened this issue Sep 29, 2022 · 3 comments
Labels
area:coverage Code coverage, see https://dotty.epfl.ch/docs/internals/coverage.html area:scala.native itype:enhancement

Comments

@carlosedp
Copy link

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.

@carlosedp carlosedp added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Sep 29, 2022
@carlosedp
Copy link
Author

Probably related to #15383

@dwijnand dwijnand added stat:needs triage Every issue needs to have an "area" and "itype" label area:coverage Code coverage, see https://dotty.epfl.ch/docs/internals/coverage.html and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Sep 30, 2022
@TheElectronWill TheElectronWill added itype:enhancement area:scala.native and removed itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Oct 1, 2022
@TheElectronWill
Copy link
Member

See #15383 (comment) and #15383 (comment).

@carlosedp
Copy link
Author

Thanks @TheElectronWill I also agree that using the runtime in the plugin is the sensible thing to do.
Will keep an eye here.

@Kordyjan Kordyjan added this to the Future versions milestone Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:coverage Code coverage, see https://dotty.epfl.ch/docs/internals/coverage.html area:scala.native itype:enhancement
Projects
None yet
Development

No branches or pull requests

4 participants