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

update sbt-typelevel #1350

Merged
merged 7 commits into from
Dec 11, 2024
Merged

Conversation

samspills
Copy link
Contributor

@samspills samspills commented Dec 10, 2024

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.

@samspills samspills requested a review from armanbilge December 10, 2024 23:14
@samspills samspills self-assigned this Dec 10, 2024
@@ -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]]]
Copy link
Contributor Author

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

@armanbilge armanbilge merged commit 4a70e3a into typelevel:main Dec 11, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants