Skip to content

Upgrade to Scala.js 1.19.0. #23026

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

Merged
merged 2 commits into from
Apr 23, 2025
Merged

Upgrade to Scala.js 1.19.0. #23026

merged 2 commits into from
Apr 23, 2025

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Apr 22, 2025

With minimal changes to preserve the status quo. These are forward ports of compiler, library and build changes from the following upstream commits:

From the NewLambda commit, we only adapt the way we compile Scala function lambdas. We do not use NewLambda for arbitrary SAM types yet. This is left for a future, independent commit, as it is not required for correctness.


These are the minimal changes that have to go in 3.7.0 if we want to add support for async/await and JSPI in the 3.7.x line.

I tried going further and actually port that as well. However I need to forward-port scala-js/scala-js@0d16b42 first. And that proves difficult because Scala 3 does not have a reliable isDelambdafyTarget test. Too much of Closures gets transformed away before the JS backend. I will need more time to figure this out (I'll try again tomorrow). But AFAICT we could do that in patch releases, unlike the initial upgrade to 1.19.0 that this PR does.

/cc @WojciechMazur for consideration to be included as a last-minute change to 3.7.0. The idea is that we would like to get the JSPI improvements of Scala.js 1.19.0 rather sooner than later. It's a game changer for "direct style" libraries such as Ox and Gears.

@sjrd sjrd added the needs-minor-release This PR cannot be merged until the next minor release label Apr 22, 2025
@sjrd sjrd requested a review from odersky April 22, 2025 15:03
sjrd added 2 commits April 23, 2025 10:18
That is the commit that removed calls to `withStrictFloats(true)`,
which have been the default since 1.9.0, and cannot be changed
since 1.19.0.
With minimal changes to preserve the status quo. These are forward
ports of compiler, library and build changes from the following
upstream commits:

* scala-js/scala-js@b38201c
  Drop support for non-strict floats.
* scala-js/scala-js@82910a0
  Move well-known names to a new object `WellKnownNames`.
* scala-js/scala-js@53dc4fe
  Introduce `NewLambda` to synthesize instances of SAM types.
* scala-js/scala-js@9481522
  Rewrite old IR with `AnonFunctionN` references to use `NewLambda`.

From the `NewLambda` commit, we only adapt the way we compile
Scala function lambdas. We do not use `NewLambda` for arbitrary
SAM types yet. This is left for a future, independent commit, as
it is not required for correctness.
@odersky odersky merged commit b27f55b into scala:main Apr 23, 2025
29 checks passed
@odersky odersky deleted the scalajs-1.19.0 branch April 23, 2025 13:49
@odersky odersky added the backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. label Apr 23, 2025
@odersky odersky added this to the 3.7.0 milestone Apr 23, 2025
tgodzik added a commit that referenced this pull request Apr 24, 2025
Backports #23026 to the 3.7.0-RC3.

PR submitted by the release tooling.
@WojciechMazur WojciechMazur added backport:done This PR was successfully backported. and removed backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. labels May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:done This PR was successfully backported. needs-minor-release This PR cannot be merged until the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants