|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: Announcing Scala.js 1.14.0 |
| 4 | +category: news |
| 5 | +tags: [releases] |
| 6 | +permalink: /news/2023/09/25/announcing-scalajs-1.14.0/ |
| 7 | +--- |
| 8 | + |
| 9 | +We are pleased to announce the release of Scala.js 1.14.0! |
| 10 | + |
| 11 | +This release mainly brings speed improvements in the reachability analysis by parallelizing it. |
| 12 | +It also upgrades the Scala 2.13.x standard library to version 2.13.12. |
| 13 | + |
| 14 | +Read on for more details. |
| 15 | + |
| 16 | +<!--more--> |
| 17 | + |
| 18 | +## Getting started |
| 19 | + |
| 20 | +If you are new to Scala.js, head over to [the tutorial]({{ BASE_PATH }}/tutorial/). |
| 21 | + |
| 22 | +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). |
| 23 | + |
| 24 | +Bug reports can be filed [on GitHub](https://github.com/scala-js/scala-js/issues). |
| 25 | + |
| 26 | +## Release notes |
| 27 | + |
| 28 | +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. |
| 29 | + |
| 30 | +This is a **minor** release: |
| 31 | + |
| 32 | +* It is backward binary compatible with all earlier versions in the 1.x series: libraries compiled with 1.0.x through 1.13.x can be used with 1.14.0 without change. |
| 33 | +* Despite being a minor release, 1.14.0 is forward binary compatible with 1.13.x. It is *not* forward binary compatible with 1.12.x. Libraries compiled with 1.14.0 can be used with 1.13.x but not with 1.12.x or earlier. |
| 34 | +* It is *not* entirely backward source compatible: it is not guaranteed that a codebase will compile *as is* when upgrading from 1.13.x (in particular in the presence of `-Xfatal-warnings`). |
| 35 | + |
| 36 | +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. |
| 37 | + |
| 38 | +## Improvements |
| 39 | + |
| 40 | +### Reachability Analysis is parallel by default |
| 41 | + |
| 42 | +We have observed up to 2x speedup of reachability analysis on the Scala.js test |
| 43 | +suite with this change. This corresponds to a 20% speedup overall on linking. |
| 44 | + |
| 45 | +In case you encounter issues, you can disable the new behavior by setting: |
| 46 | + |
| 47 | +{% highlight scala %} |
| 48 | +scalaJSLinkerConfig ~= { _.withParallel(false) } |
| 49 | +{% endhighlight %} |
| 50 | + |
| 51 | +This will disable all parallelism in the linker (expect significant slowdown). |
| 52 | + |
| 53 | +### Implicit conversions to js.Any for js.UndefOr in Scala 3 |
| 54 | + |
| 55 | +Because `js.UndefOr` is implemented differently in Scala 3, the implicit conversion to `js.Any` was not available. |
| 56 | + |
| 57 | +Thanks to @armanbilge, `js.UndefOr[T]` now implicitly converts to `js.Any`, provided `T` is convertiable to `js.Any`. |
| 58 | + |
| 59 | +For example, the following now compiles on Scala 3: |
| 60 | + |
| 61 | +{% highlight scala %} |
| 62 | +val x: js.Any = js.defined("") |
| 63 | +{% endhighlight %} |
| 64 | + |
| 65 | +### New ECMAScript Core Types |
| 66 | + |
| 67 | +* [AggregateError](https://www.scala-js.org/api/scalajs-library/2.14.0/scala/scalajs/js/AggregateError.html) thanks to @armanbilge |
| 68 | + |
| 69 | +### Call-site inline |
| 70 | + |
| 71 | +The compiler and linker now use `@inline` / `@noinline` hints provided at the call-site. |
| 72 | +See the [Scaladoc for `@inline`](https://www.scala-lang.org/api/2.13.11/scala/inline.html) for details. |
| 73 | + |
| 74 | +### Better Default Bridge Generation |
| 75 | + |
| 76 | +The linker will now avoid generating a default bridge in a subclass if an existing bridge in the superclass can be used. |
| 77 | +This can lead to minor code-size improvements. |
| 78 | + |
| 79 | +## Bug fixes |
| 80 | + |
| 81 | +The following bugs have been fixed in 1.14.0: |
| 82 | + |
| 83 | +* [#4882](https://github.com/scala-js/scala-js/issues/4882): Make UUID.compareTo() consistent with the JVM. |
| 84 | + |
| 85 | +You can find the full list [on GitHub](https://github.com/scala-js/scala-js/issues?q=is%3Aissue+milestone%3Av1.14.0+is%3Aclosed). |
0 commit comments