Announcing Scala.js 1.21.0. - #672
Merged
Merged
Conversation
gzm0
requested changes
Mar 31, 2026
gzm0
left a comment
Contributor
There was a problem hiding this comment.
I've done a quick first pass for content (not wording yet).
I think this is enough to iterate, so I'm releasing.
Member
Author
|
Ping @gzm0 ? |
gzm0
approved these changes
Apr 4, 2026
gzm0
left a comment
Contributor
There was a problem hiding this comment.
Sorry this took a while. My week was a bit full :-/
| In particular, it deprecates JDK < 17 and support for the Google Closure Compiler (GCC). | ||
| GCC is now disabled by default in all configurations. | ||
|
|
||
| It also comes with performance improvements and bug fixes. |
Contributor
There was a problem hiding this comment.
Suggested change
| It also comes with performance improvements and bug fixes. | |
| This release also comes with performance improvements and bug fixes. |
Otherwise "it" might be mistaken to refer to GCC.
| The [Scala.js semantics]({{ BASE_PATH }}/doc/semantics.html) defines several exceptions are being subject to Undefined Behavior. | ||
| These include `NullPointerException`, `StringIndexOutOfBoundsException` and `NegativeArraySizeException`. | ||
|
|
||
| In `fastLinkJS`, they are configure in "Fatal" mode by default. |
Contributor
There was a problem hiding this comment.
Suggested change
| In `fastLinkJS`, they are configure in "Fatal" mode by default. | |
| In `fastLinkJS`, they are configured in "Fatal" mode by default. |
| After [a request for comment](https://github.com/scala-js/scala-js/issues/5244), we have decided to disable the Google Closure Compiler (GCC) by default in all configurations, and deprecate it. | ||
| It was already disabled by default when emitting ECMAScript modules, since it never supported them the way we need. | ||
|
|
||
| If you are not emitting ES modules, this release will cause an increase on code size in `fullLinkJS`. |
Contributor
There was a problem hiding this comment.
Suggested change
| If you are not emitting ES modules, this release will cause an increase on code size in `fullLinkJS`. | |
| If you are not emitting ES modules, this release will cause an increase in code size in `fullLinkJS`. |
|
|
||
| If you are not emitting ES modules, this release will cause an increase on code size in `fullLinkJS`. | ||
| We encourage you to follow the Scala.js `fullLinkJS` task with a JavaScript minifier. | ||
| If you use [Vite](https://vite.dev/), in particular, it applies Rollup by default. |
Contributor
There was a problem hiding this comment.
Suggested change
| If you use [Vite](https://vite.dev/), in particular, it applies Rollup by default. | |
| If you use [Vite](https://vite.dev/), in particular, it applies Rolldown by default. |
IDK if it matters. Vite 8 changed to Rolldown 🤷
| It is only true if the target platform supports Typed Arrays to begin with. | ||
|
|
||
| We unfortunately caught this documentation issue too late in the release process to update the Scaladoc. | ||
| We will update it for the next version. |
Contributor
There was a problem hiding this comment.
Suggested change
| We will update it for the next version. | |
| We will update it for the next version. | |
| In the meantime, you can find the updated documentation on [#5344](https://github.com/scala-js/scala-js/pull/5344). |
| We made this change as a preparation for targeting WebAssembly environments without a JS host. | ||
|
|
||
| As a consequence, the documentation of [`TypedArrayBufferOps.hasTypedArray()`](https://javadoc.io/static/org.scala-js/scalajs-library_2.12/1.21.0/scala/scalajs/js/typedarray/TypedArrayBufferOps.html#hasTypedArray():Boolean) is no longer accurate. | ||
| It is only true if the target platform supports Typed Arrays to begin with. |
Contributor
There was a problem hiding this comment.
Suggested change
| It is only true if the target platform supports Typed Arrays to begin with. | |
| As a consequence, the contract of [`TypedArrayBufferOps.hasArrayBuffer()`](https://javadoc.io/static/org.scala-js/scalajs-library_2.12/1.21.0/scala/scalajs/js/typedarray/TypedArrayBufferOps.html#hasArrayBuffer():Boolean) and [`TypedArrayBufferOps.hasTypedArray()`](https://javadoc.io/static/org.scala-js/scalajs-library_2.12/1.21.0/scala/scalajs/js/typedarray/TypedArrayBufferOps.html#hasTypedArray():Boolean) is changing in a not strictly backwards compatible manner: | |
| The following code may now throw an `UnsupportedOperationException` depending on the specific target platform: | |
| {% highlight scala %} | |
| if (buffer.isDirect()) | |
| TypedArrayBuffer.arrayBuffer(buffer) | |
| {% endhighlight %} | |
| Instead of `isDirect()` use `hasArrayBuffer()`. |
| As a consequence, the documentation of [`TypedArrayBufferOps.hasTypedArray()`](https://javadoc.io/static/org.scala-js/scalajs-library_2.12/1.21.0/scala/scalajs/js/typedarray/TypedArrayBufferOps.html#hasTypedArray():Boolean) is no longer accurate. | ||
| It is only true if the target platform supports Typed Arrays to begin with. | ||
|
|
||
| We unfortunately caught this documentation issue too late in the release process to update the Scaladoc. |
Contributor
There was a problem hiding this comment.
Suggested change
| We unfortunately caught this documentation issue too late in the release process to update the Scaladoc. | |
| We unfortunately caught this issue too late in the release process to update the Scaladoc. |
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.
No description provided.