|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: Announcing Scala.js 0.6.33 |
| 4 | +category: news |
| 5 | +tags: [releases] |
| 6 | +permalink: /news/2020/05/13/announcing-scalajs-0.6.33/ |
| 7 | +--- |
| 8 | + |
| 9 | + |
| 10 | +We are pleased to announce the release of Scala.js 0.6.33! |
| 11 | + |
| 12 | +This is mostly a bugfix release, including a fix for a bad interaction with React.js' development mode and the `jsdom` JS env. |
| 13 | +In addition, we have upgraded to the standard libraries of Scala 2.12.11 and 2.13.2. |
| 14 | + |
| 15 | +Read on for more details. |
| 16 | + |
| 17 | +<!--more--> |
| 18 | + |
| 19 | +## Getting started |
| 20 | + |
| 21 | +If you are new to Scala.js, head over to |
| 22 | +[the tutorial]({{ BASE_PATH }}/tutorial/). |
| 23 | + |
| 24 | +## Release notes |
| 25 | + |
| 26 | +If you use `.scala` build files in `project/` and are upgrading from Scala.js 0.6.22 or earlier, do read [the release notes of 0.6.23]({{ BASE_PATH }}/news/2018/05/22/announcing-scalajs-0.6.23/), which contain a source breaking change in that situation. |
| 27 | + |
| 28 | +If upgrading from Scala.js 0.6.14 or earlier, make sure to read [the release notes of 0.6.15]({{ BASE_PATH }}/news/2017/03/21/announcing-scalajs-0.6.15/), which contain important migration information. |
| 29 | + |
| 30 | +As a minor release, 0.6.33 is backward binary compatible with previous releases in the 0.6.x series. |
| 31 | +Libraries compiled with earlier versions can be used with 0.6.33 without change. |
| 32 | +0.6.33 is also forward binary compatible with 0.6.{29-32}, but not with earlier releases: libraries compiled with 0.6.33 cannot be used by projects using 0.6.{0-28}. |
| 33 | + |
| 34 | +Please report any issues [on GitHub](https://github.com/scala-js/scala-js/issues). |
| 35 | + |
| 36 | +## New warnings |
| 37 | + |
| 38 | +In Scala.js 0.6.33, the Scala.js compiler will start reporting warnings when trying to override `equals` and `hashCode` in a JS type (extending `js.Any`). |
| 39 | +For example: |
| 40 | + |
| 41 | +{% highlight scala %} |
| 42 | +class A extends js.Object { |
| 43 | + override def hashCode(): Int = 1 |
| 44 | + override def equals(obj: Any): Boolean = false |
| 45 | +} |
| 46 | +{% endhighlight %} |
| 47 | + |
| 48 | +will report the following warnings: |
| 49 | + |
| 50 | +{% highlight none %} |
| 51 | +Test.scala:6: warning: Overriding hashCode in a JS class does not change its hash code. |
| 52 | + To silence this warning, change the name of the method and optionally add @JSName("hashCode"). |
| 53 | + override def hashCode(): Int = 1 |
| 54 | + ^ |
| 55 | +Test.scala:7: warning: Overriding equals in a JS class does not change how it is compared. |
| 56 | + To silence this warning, change the name of the method and optionally add @JSName("equals"). |
| 57 | + override def equals(obj: Any): Boolean = false |
| 58 | + ^ |
| 59 | +{% endhighlight %} |
| 60 | + |
| 61 | +Overriding `equals` and `hashCode` never *worked*, in the sense that it would not affect `==` and `##`. |
| 62 | +The new warnings make it clear. |
| 63 | + |
| 64 | +## Bug fixes |
| 65 | + |
| 66 | +Among others, the following bugs have been fixed in 0.6.33: |
| 67 | + |
| 68 | +* [#4034](https://github.com/scala-js/scala-js/issues/4034) Incorrect result for `-x` when `x` is `+0.0` |
| 69 | +* [#3998](https://github.com/scala-js/scala-js/issues/3998) Self-types in non-native JS traits cause confusing error message |
| 70 | +* [#3458](https://github.com/scala-js/scala-js/issues/3458) Bad interactions in `JSDOMNodeJSEnv` error handling with React.js dev mode |
| 71 | +* [#3818](https://github.com/scala-js/scala-js/issues/3818) Linking error for `Future.never` from Scala 2.13 |
| 72 | +* [#3939](https://github.com/scala-js/scala-js/issues/3939) Compile error on a method with `@JSName("finalize")` in a non-native JS class |
| 73 | + |
| 74 | +You can find the full list [on GitHub](https://github.com/scala-js/scala-js/issues?q=is%3Aissue+milestone%3Av0.6.33+is%3Aclosed). |
0 commit comments