-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Running tests with munit
and Scala.js breaks for Scala 3.7
#22794
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
Comments
Looks like the same as scala-js/scala-js#5141 . I have a fix, but it's tricky to test. |
Last good release: 3.7.0-RC1-bin-20250124-f7e5df5-NIGHTLY |
… a primitive. (#22797) Until 3.6.x, we used the user-space definition of `Arrays.newArray` in Scala.js. We changed it to a primitve in 2852168, to match the behavior of the JVM backend. However, that had the side effect of not emitting its definition at all, like other primitives. For backward binary compat reasons, we do need that definition. We specifically make an exception for that method, which is now emitted, even though it is otherwise treated as a primitive.
… it's a primitive. Until 3.6.x, we used the user-space definition of `Arrays.newArray` in Scala.js. We changed it to a primitve in 2852168, to match the behavior of the JVM backend. However, that had the side effect of not emitting its definition at all, like other primitives. For backward binary compat reasons, we do need that definition. We specifically make an exception for that method, which is now emitted, even though it is otherwise treated as a primitive.
…#22796) Example usage: ```bash scala project/scripts/bisect.scala --jvm 17 -- --bootstrapped --releases 3.6.4-RC1-bin-20241120-bd07317-NIGHTLY... test smth.test.scala ``` `smth.test.scala` ```scala //> using dep org.scalameta::munit::1.1.0 //> using platform js class MyTests extends munit.FunSuite { test("foo") { assert(2 + 2 == 4) } } ``` Allowed to bisect #22794
The similar error happens in jsoniter-scala project and can be easily reproduced with
|
I'm seeing the same as a user of Cats Effect. It happens in linking, no need to involve tests.
Edit: oh, it's fixed - looking forward to a RC2 sometime, then! :) |
… it's a primitive. Until 3.6.x, we used the user-space definition of `Arrays.newArray` in Scala.js. We changed it to a primitve in 2852168, to match the behavior of the JVM backend. However, that had the side effect of not emitting its definition at all, like other primitives. For backward binary compat reasons, we do need that definition. We specifically make an exception for that method, which is now emitted, even though it is otherwise treated as a primitive. [Cherry-picked 9c7193a]
… it's a primitive. Until 3.6.x, we used the user-space definition of `Arrays.newArray` in Scala.js. We changed it to a primitve in 2852168, to match the behavior of the JVM backend. However, that had the side effect of not emitting its definition at all, like other primitives. For backward binary compat reasons, we do need that definition. We specifically make an exception for that method, which is now emitted, even though it is otherwise treated as a primitive. [Cherry-picked 9c7193a]
Backport "Fix scala#22794: Emit the definition of `Arrays.newArray` even though it's a primitive." to 3.3 LTS
Compiler version
Scala 3.7.0-RC1, 3.7.0-RC1-bin-20250312-3fe9304-NIGHTLY
Scala.js 1.18.2
Minimized code
Output
Expectation
Should run the tests with
munit
+ Scala.js fine, as up to Scala 3.6.4.The text was updated successfully, but these errors were encountered: