portable-scala/sbt-crossproject

Ambiguous toplevel definition EnableReflectiveInstantiation

landlockedsurfer opened this issue · 2 comments

Hi all,
I ran into a compile error while cross building using sbt-crossproject.
When running the sbt task

++3.2.1! testJS

the Scala compiler shows the following compile error:

exception caught when loading class ZIOSpecAbstract: Toplevel definition EnableReflectiveInstantiation is defined in
  /Users/landlockedsurfer/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/portable-scala/portable-scala-reflect_sjs1_2.13/1.1.2/portable-scala-reflect_sjs1_2.13-1.1.2.jar(org/portablescala/reflect/annotation/package.class)
and also in
  /Users/landlockedsurfer/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/portable-scala/portable-scala-reflect_2.13/1.1.2/portable-scala-reflect_2.13-1.1.2.jar(org/portablescala/reflect/annotation/EnableReflectiveInstantiation.class)
One of these files should be removed from the classpath.

Has anybody encountered or found a solution to this type of compile error?

sjrd commented

Hello,

This looks like a question on using sbt-crossproject, rather than a bug report. The GitHub Issues in this repo are for bug reports and feature requests only. Please ask questions on StackOverflow or on Discord (channel #scala-js), where more than just the core developers can see and answer.

Thank you for your understanding.

Hi Sebastian!
Thanks for the quick reply! I will post the question on Stackoverflow or in the Scala.js Discord as you've suggested.