Upgrade to Scala.js 1.19.0.#23026
Merged
odersky merged 2 commits intoscala:mainfrom Apr 23, 2025
Merged
Conversation
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
approved these changes
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With minimal changes to preserve the status quo. These are forward ports of compiler, library and build changes from the following upstream commits:
WellKnownNames.NewLambdato synthesize instances of SAM types.AnonFunctionNreferences to useNewLambda.From the
NewLambdacommit, we only adapt the way we compile Scala function lambdas. We do not useNewLambdafor 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/awaitand 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
isDelambdafyTargettest. 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.