-
Notifications
You must be signed in to change notification settings - Fork 243
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
update sbt-typelevel #1350
update sbt-typelevel #1350
Conversation
@@ -61,8 +61,7 @@ class OptSuite extends munit.FunSuite { | |||
} | |||
{ | |||
import spire.std.array._ | |||
import spire.std.unit._ | |||
val eq = Eq[Opt[Array[Unit]]] | |||
val eq = Eq[Opt[Array[Boolean]]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was failing on JS with
==> X spire.util.OptSuite.Regression test for #896 0.03s java.lang.IllegalArgumentException: null
And @armanbilge figured out that it was related to this scala-js/scala-js#5044 + related change in scala.js, and the semantics of getClass
for unit described here:
Scala.js 1.x only: Moreover, for () (unit), the result will be classOf[java.lang.Void] instead of classOf[scala.runtime.BoxedUnit] like the JVM. scala.runtime.BoxedUnit is an implementation detail of Scala on the JVM, which Scala.js does not emulate. Instead, it uses the more sensible java.lang.Void, as Void is the boxed class corresponding to the void primitive type, which is scala.Unit. This means that while java.lang.Void is not instantiable on the JVM, in Scala.js it has a singleton instance, namely (). This also manifests itself in Array[Unit] which is effectively Array[java.lang.Void] at run-time, instead of Array[scala.runtime.BoxedUnit].
-- https://www.scala-js.org/doc/semantics.html#getclass
This is a replacement PR for #1348, just to do the bump in two separate steps and fix a deprecated setting.
We need this so that the build will keep working in January after a bunch of github actions are removed (upload-artifiact@v3 and download-artifact@v3)
note: the bump to scala 2.13.15 was necessary to resolve some mima issues caused by sbt-typelevel adding the
-Xsource:3
flag. That bump then required bumps to scalajs and native.