-
Couldn't load subscription status.
- Fork 106
Open
Labels
Description
Describe the bug
Scala JS always uses CrossVersion.for3Use2_13, even for libraries that only work with Scala 3.
Scastie snippet link
No response
To Reproduce
- Create a Scala.js project
- Set the Scala version to Scala 3
- Add a Scala 3 only library
- Notice that the library is included with CrossVersion.for3Use2_13
Expected behavior
When the selected Scala version is Scala 3, scastie should use Scala 3 libraries.
I think the issue is
scastie/api/src/main/scala/com.olegych.scastie.api/ScalaTarget.scala
Lines 211 to 212 in 0e1f7bf
| def renderSbt(lib: ScalaDependency): String = | |
| s"${renderSbtCross(lib)} cross CrossVersion.for3Use2_13" |
Maybe it should look like
scastie/api/src/main/scala/com.olegych.scastie.api/ScalaTarget.scala
Lines 286 to 291 in 0e1f7bf
| def renderSbt(lib: ScalaDependency): String = { | |
| if (Some(lib) == runtimeDependency) renderSbtDouble(lib) | |
| else if (lib.target.binaryScalaVersion.startsWith("2.13")) | |
| s"${renderSbtDouble(lib)} cross CrossVersion.for3Use2_13" | |
| else renderSbtDouble(lib) | |
| } |
Screenshot ( Optional )
No response
Version
Scastie website
What browsers are you seeing the problem on?
No response
Relevant log output
No response