Skip to content

Announcing Scala.js 1.18.2. #650

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 1 commit into from
Jan 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ colors: #in hex code if not noted else

### VERSIONS ###
versions:
scalaJS: 1.18.1
scalaJS: 1.18.2
scalaJSBinary: 1
scalaJS06x: 0.6.33
scalaJS06xBinary: 0.6
64 changes: 64 additions & 0 deletions _posts/news/2025-01-23-announcing-scalajs-1.18.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
layout: post
title: Announcing Scala.js 1.18.2
category: news
tags: [releases]
permalink: /news/2025/01/23/announcing-scalajs-1.18.2/
---


We are pleased to announce the release of Scala.js 1.18.2!

This is mostly a hotfix release for a binary incompatibility present in 1.18.0 and 1.18.1 and affecting some libraries built with Scala.js < 1.11.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add the same note here that 1.18.0 / 1.18.1 did not produce bad artifacts?

It also upgrades the Scala standard library to versions 2.12.20 and 2.13.16.

Note: Artifacts published with 1.18.0 and 1.18.1 are *not* polluted.
Using these versions is not dangerous for the ecosystem.
The binary compatibility issues that were fixed in 1.18.1 and 1.18.2 are only problematic if you run into them while upgrading.
If you have already successfully published libraries built with these versions, there is no need to panic and republish them with 1.18.2.

Read on for more details.

<!--more-->

## Getting started

If you are new to Scala.js, head over to [the tutorial]({{ BASE_PATH }}/tutorial/).

If you need help with anything related to Scala.js, you may find our community [in `#scala-js` on Discord](https://discord.com/invite/scala) and [on Stack Overflow](https://stackoverflow.com/questions/tagged/scala.js).

Bug reports can be filed [on GitHub](https://github.com/scala-js/scala-js/issues).

## Release notes

If upgrading from Scala.js 0.6.x, make sure to read [the release notes of Scala.js 1.0.0]({{ BASE_PATH }}/news/2020/02/25/announcing-scalajs-1.0.0/) first, as they contain a host of important information, including breaking changes.

This is a **patch** release:

* It is backward binary compatible with all earlier versions in the 1.x series: libraries compiled with 1.0.x through 1.18.1 can be used with 1.18.2 without change.
* It is forward binary compatible with 1.18.0 and 1.18.1: libraries compiled with 1.18.2 can be used with previous 1.18.x versions without change.
* It is backward source compatible with 1.18.0 and 1.18.1: source code that used to compile with previous 1.18.x versions should compile as is when upgrading to 1.18.2.

In addition, like Scala.js 1.18.0 and 1.18.1:

* It is *not* forward binary compatible with 1.17.x: libraries compiled with 1.18.2 cannot be used with 1.17.x or earlier.
* It is *not* entirely backward source compatible with 1.17.x: it is not guaranteed that a codebase will compile *as is* when upgrading from 1.17.x or earlier (in particular in the presence of `-Xfatal-warnings`).

As a reminder, libraries compiled with 0.6.x cannot be used with Scala.js 1.x; they must be republished with 1.x first.

## Enhancements

### Optimize `js.Dynamic.literal()` in Scala 2.13

As described in [#5017](https://github.com/scala-js/scala-js/issues/5017), `js.Dynamic.literal(...)` produced good code when compiled with Scala 2.12, but not with Scala 2.13 or Scala 3.
Scala.js 1.18.2 solves the issue for Scala 2.13.
The issue remains for code compiled by Scala 3, at the moment.

## Bug fixes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably should mention: scala-js/scala-js#5117 ?


The following bugs were fixed in 1.18.2:

* [#5115](https://github.com/scala-js/scala-js/issues/5115) fullLinkJS: Missing StoreModule right after the super constructor call
* [#5112](https://github.com/scala-js/scala-js/issues/5112) "Found unknown label apply" crash during compilation with Scala 2.13.16

You can find the full list [on GitHub](https://github.com/scala-js/scala-js/issues?q=is%3Aissue+milestone%3Av1.18.2+is%3Aclosed).
10 changes: 10 additions & 0 deletions doc/all-api.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,16 @@ title: All previous versions of the Scala.js API

## All previous versions of the API

### Scala.js 1.18.2
* [1.18.2 scalajs-library]({{ site.production_url }}/api/scalajs-library/1.18.2/scala/scalajs/js/index.html)
* [1.18.2 scalajs-test-interface]({{ site.production_url }}/api/scalajs-test-interface/1.18.2/)
* [1.18.2 scalajs-javalib-intf]({{ site.production_url }}/api/scalajs-javalib-intf/1.18.2/)
* [1.18.2 scalajs-ir]({{ site.production_url }}/api/scalajs-ir/1.18.2/org/scalajs/ir/index.html)
* [1.18.2 scalajs-linker-interface]({{ site.production_url }}/api/scalajs-linker-interface/1.18.2/org/scalajs/linker/interface/index.html) ([Scala.js version]({{ site.production_url }}/api/scalajs-linker-interface-js/1.18.2/org/scalajs/linker/interface/index.html))
* [1.18.2 scalajs-linker]({{ site.production_url }}/api/scalajs-linker/1.18.2/org/scalajs/linker/index.html) ([Scala.js version]({{ site.production_url }}/api/scalajs-linker-js/1.18.2/org/scalajs/linker/index.html))
* [1.18.2 scalajs-test-adapter]({{ site.production_url }}/api/scalajs-sbt-test-adapter/1.18.2/org/scalajs/testing/adapter/index.html)
* [1.18.2 sbt-scalajs]({{ site.production_url }}/api/sbt-scalajs/1.18.2/#org.scalajs.sbtplugin.package)

### Scala.js 1.18.1
* [1.18.1 scalajs-library]({{ site.production_url }}/api/scalajs-library/1.18.1/scala/scalajs/js/index.html)
* [1.18.1 scalajs-test-interface]({{ site.production_url }}/api/scalajs-test-interface/1.18.1/)
1 change: 1 addition & 0 deletions doc/internals/version-history.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ title: Version history

## Version history of Scala.js

- [1.18.2](/news/2025/01/23/announcing-scalajs-1.18.2/)
- [1.18.1](/news/2025/01/09/announcing-scalajs-1.18.1/)
- ~~1.18.0~~ ([severely broken](https://github.com/scala-js/scala-js/issues/5107) and therefore never announced)
- [1.17.0](/news/2024/09/28/announcing-scalajs-1.17.0/)