diff --git a/_config.yml b/_config.yml index a7eff39e..220f286a 100644 --- a/_config.yml +++ b/_config.yml @@ -18,7 +18,7 @@ author : twitter : sjrdoeraene feedburner : feedname -scalaJSVersion: 0.6.3 +scalaJSVersion: 0.6.4 scalaJSBinaryVersion: 0.6 # The production_url is only used when full-domain names are needed diff --git a/_posts/news/2015-07-03-announcing-scalajs-0.6.4.md b/_posts/news/2015-07-03-announcing-scalajs-0.6.4.md new file mode 100644 index 00000000..5da18c22 --- /dev/null +++ b/_posts/news/2015-07-03-announcing-scalajs-0.6.4.md @@ -0,0 +1,104 @@ +--- +layout: post +title: Announcing Scala.js 0.6.4 +category: news +tags: [releases] +--- +{% include JB/setup %} + +We are excited to announce the release of Scala.js 0.6.4! + +This release brings support for Scala 2.11.7 and 2.12.0-M1, as well as a significant part of the Java collections library in `java.util`, thanks to [@andreaTP](https://github.com/andreaTP) and [@nicolasstucki](https://github.com/nicolasstucki). +It also fixes numerous bugs. + +## Getting started + +If you are new to Scala.js, head over to +[the tutorial]({{ BASE_PATH }}/doc/tutorial.html). + +## Release notes + +For changes in the 0.6.x series compared to 0.5.x, read [the announcement of 0.6.0]({{ BASE_PATH }}/news/2015/02/05/announcing-scalajs-0.6.0/). + +As a minor release, 0.6.4 is backward source and binary compatible with previous releases in the 0.6.x series. +Libraries compiled with earlier versions can be used with 0.6.4 without change. +However, it is not forward compatible: libraries compiled with 0.6.4 cannot be used by projects using 0.6.{0-3}. + +Please report any issues [on GitHub](https://github.com/scala-js/scala-js/issues). + +## Potential breaking changes + +The bug fix for [#1705](https://github.com/scala-js/scala-js/issues/1705) in this release is potentially a breaking change that might affect your code silently. +If you had something like this in a facade type: + +{% highlight scala %} +object JS extends js.Object { + @JSName("b_=") + def a_=(x: Int): Unit = js.native +} + +JS.a = 1 +{% endhighlight %} + +the last line would previously (erroneously) translate to + +{% highlight javascript %} +JS["b"] = 1; +{% endhighlight %} + +This releases fixes the compiler to instead translate to + +{% highlight javascript %} +JS["b_="] = 1; +{% endhighlight %} + +If you relied on the former code to be emitted, you should change the `@JSName` annotation as `@JSName("b")`. + +There is no deprecation period because there was no way to, at the same time, warn against problems, and still allow correct new code to be warning-free, unfortunately. + +## Improvements + +### Java Collections API + +Some Scala libraries use the collections of Java in some cases. +To help port these libraries to Scala.js, a number of collection types have been ported. +At the moment, the following data structures are supported: + +* `List`: `ArrayList`, `LinkedList`, `CopyOnWriteArrayList` +* `Set`: `HashSet`, `LinkedHashSet`, `ConcurrentSkipListSet` +* `Map`: `HashMap`, `LinkedHashMap`, `ConcurrentHashMap` +* `Queue`: `LinkedList`, `ConcurrentLinkedQueue` + +as well as the helper classes `Arrays` and `Collections`. + +### Better and earlier diagnostics for illegal `@JSExport`s and facade types + +There were a number of illegal usages of `@JSExport` and facade types that were not detected by the compiler. +Using those would previously result in crashes of the linker or production of completely wrong .js code. +See tickets [#1647](https://github.com/scala-js/scala-js/issues/1647), [#1664](https://github.com/scala-js/scala-js/issues/1664), [#1704](https://github.com/scala-js/scala-js/issues/1704), [#1706](https://github.com/scala-js/scala-js/issues/1706), [#1707](https://github.com/scala-js/scala-js/issues/1707) and [#1717](https://github.com/scala-js/scala-js/issues/1717) for details. + +### Running with Rhino also reports linking errors + +Until 0.6.3, running with Rhino (the default) would not truly link, and therefore would not report linking errors. +This caused confusions in several occasions, because code that appeared to work on Rhino refused to link and therefore `fastOptJS` would not work. +As of 0.6.4, even running with Rhino will report linking errors. + +## Bug fixes + +Among others, the following bugs have been fixed: + +* [#1646](https://github.com/scala-js/scala-js/issues/1646) `Char#isUpper` behavior diverges between Scala.js/Scala-JVM +* [#1664](https://github.com/scala-js/scala-js/issues/1664) `@JSName(variable)` annotation does not fail on objects and classes +* [#1671](https://github.com/scala-js/scala-js/issues/1671) `Double.toInt` and `Float.toInt` are broken +* [#1718](https://github.com/scala-js/scala-js/issues/1718) `Pattern.compile` doesn't validate regex +* [#1722](https://github.com/scala-js/scala-js/issues/1722) Rhino crash with Scalatest +* [#1733](https://github.com/scala-js/scala-js/issues/1733) `@JSName` does not work for `val`s and `var`s +* [#1734](https://github.com/scala-js/scala-js/issues/1734) Charset decoding fails with read-only byte buffers +* [#1743](https://github.com/scala-js/scala-js/issues/1743) `js.Dynamic.literal.applyDynamic("apply")(map.toSeq: _*)` causes optimizer to crash +* [#1748](https://github.com/scala-js/scala-js/issues/1748) Source root not found for shared project error (`CrossProject` friendlier to Scoverage) +* [#1759](https://github.com/scala-js/scala-js/issues/1759) `new Int8Array(n).toArray` throws TypeError +* [#1764](https://github.com/scala-js/scala-js/issues/1764) `BigInteger.modInverse` always throws an exception +* [#1774](https://github.com/scala-js/scala-js/issues/1774) `ClassCastException`: `org.mozilla.javascript.UniqueTag` running Scala.js project +* [#1781](https://github.com/scala-js/scala-js/issues/1781) When the optimizer crashes, it is left in an inconsistent state + +You can find the full list [on GitHub](https://github.com/scala-js/scala-js/issues?q=is%3Aissue+milestone%3Av0.6.4+is%3Aclosed). diff --git a/doc/index.md b/doc/index.md index be005057..20af01cc 100644 --- a/doc/index.md +++ b/doc/index.md @@ -28,6 +28,16 @@ Generated Scaladocs are available here: ### Scala.js +#### Scala.js 0.6.4 +* [0.6.4 scalajs-library]({{ site.production_url }}/api/scalajs-library/0.6.4/#scala.scalajs.js.package) +* [0.6.4 scalajs-test-interface]({{ site.production_url }}/api/scalajs-test-interface/0.6.4/) +* [0.6.4 scalajs-stubs]({{ site.production_url }}/api/scalajs-stubs/0.6.4/) +* [0.6.4 scalajs-ir]({{ site.production_url }}/api/scalajs-ir/0.6.4/#org.scalajs.core.ir.package) +* [0.6.4 scalajs-tools]({{ site.production_url }}/api/scalajs-tools/0.6.4/#org.scalajs.core.tools.package) ([Scala.js version]({{ site.production_url }}/api/scalajs-tools-js/0.6.4/#org.scalajs.core.tools.package)) +* [0.6.4 scalajs-js-envs]({{ site.production_url }}/api/scalajs-js-envs/0.6.4/#org.scalajs.jsenv.package) +* [0.6.4 scalajs-test-adapter]({{ site.production_url }}/api/scalajs-sbt-test-adapter/0.6.4/#org.scalajs.testadapter.package) +* [0.6.4 sbt-scalajs]({{ site.production_url }}/api/sbt-scalajs/0.6.4/#org.scalajs.sbtplugin.package) + #### Scala.js 0.6.3 * [0.6.3 scalajs-library]({{ site.production_url }}/api/scalajs-library/0.6.3/#scala.scalajs.js.package) * [0.6.3 scalajs-test-interface]({{ site.production_url }}/api/scalajs-test-interface/0.6.3/) diff --git a/downloads.md b/downloads.md index 2b9fbbee..b0befbf1 100644 --- a/downloads.md +++ b/downloads.md @@ -9,6 +9,12 @@ We strongly recommend using the SBT plugin, as shown in the [bootstrapping skele The CLI distribution requires `scala` and `scalac` (of the right major version) to be on the execution path. Unpack it wherever you like and add the `bin/` folder to your execution path. +#### Scala.js 0.6.4 +* [0.6.4, Scala 2.11 (tgz, 23MB)]({{ site.production_url }}/files/scalajs_2.11-0.6.4.tgz) +* [0.6.4, Scala 2.11 (zip, 23MB)]({{ site.production_url }}/files/scalajs_2.11-0.6.4.zip) +* [0.6.4, Scala 2.10 (tgz, 20MB)]({{ site.production_url }}/files/scalajs_2.10-0.6.4.tgz) +* [0.6.4, Scala 2.10 (zip, 20MB)]({{ site.production_url }}/files/scalajs_2.10-0.6.4.zip) + #### Scala.js 0.6.3 * [0.6.3, Scala 2.11 (tgz, 21MB)]({{ site.production_url }}/files/scalajs_2.11-0.6.3.tgz) * [0.6.3, Scala 2.11 (zip, 21MB)]({{ site.production_url }}/files/scalajs_2.11-0.6.3.zip) diff --git a/index.md b/index.md index bb867e55..2e331901 100644 --- a/index.md +++ b/index.md @@ -201,6 +201,7 @@ List of websites using Scala.js: ## Version History +- [0.6.4](/news/2015/07/03/announcing-scalajs-0.6.4/) - [0.6.3](/news/2015/05/12/announcing-scalajs-0.6.3/) - [0.6.2](/news/2015/03/16/announcing-scalajs-0.6.2/) - [0.6.1](/news/2015/03/03/announcing-scalajs-0.6.1/)