|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: Announcing Scala.js 0.6.1 |
| 4 | +category: news |
| 5 | +tags: [releases] |
| 6 | +--- |
| 7 | +{% include JB/setup %} |
| 8 | + |
| 9 | +We are excited to announce the release of Scala.js 0.6.1! |
| 10 | + |
| 11 | +This release mostly contains bug fixes, including inefficiencies in the incremental `fastOptJS`. |
| 12 | +It also brings the entire `java.nio.Buffer`s API, with interoperability with the JavaScript [Typed Arrays](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) API. |
| 13 | + |
| 14 | +## Getting started |
| 15 | + |
| 16 | +If you are new to Scala.js, head over to |
| 17 | +[the tutorial]({{ BASE_PATH }}/doc/tutorial.html). |
| 18 | + |
| 19 | +## Release notes |
| 20 | + |
| 21 | +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/). |
| 22 | + |
| 23 | +As a minor release, 0.6.1 is backward source and binary compatible with 0.6.0. |
| 24 | +Libraries compiled with 0.6.0 can be used with 0.6.1 without change. |
| 25 | +However, they will suffer from [bug #1506](https://github.com/scala-js/scala-js/issues/1506), which will cause your `fastOptJS` to perform more work than necessary. |
| 26 | +It is therefore recommended for library authors to upgrade to 0.6.1 and publish new versions of their libraries. |
| 27 | +Scala.js 0.6.0 can read binaries compiled with 0.6.1, so you need not be afraid to force an upgrade of all the users of your libraries. |
| 28 | + |
| 29 | +Please report any issues [on GitHub](https://github.com/scala-js/scala-js/issues). |
| 30 | + |
| 31 | +## java.nio.Buffer and Typed Arrays |
| 32 | + |
| 33 | +Scala.js 0.6.1 brings a complete implementation of the `java.nio.Buffer` API, with the exception of `MappedByteBuffer`. |
| 34 | +The non-[direct](http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html#direct) buffers work on any JS engine supported by Scala.js, i.e., supporting ECMAScript 5.1. |
| 35 | + |
| 36 | +Direct buffers are implemented with JavaScript [Typed Arrays](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), and therefore require the JS VM to support them. |
| 37 | +Two additional APIs of the Scala.js standard library provide interoperability with Typed Arrays: |
| 38 | + |
| 39 | +* [TypedArrayBufferOps]({{ site.production_url }}/api/scalajs-library/0.6.1/#scala.scalajs.js.typedarray.TypedArrayBufferOps) allows to retrieve the underlying `ArrayBuffer`, `DataView`, and optionally `TypedArray` of a direct buffer (if it is not read-only) |
| 40 | +* [TypedArrayBuffer]({{ site.production_url }}/api/scalajs-library/0.6.1/#scala.scalajs.js.typedarray.TypedArrayBuffer$) allows to construct direct buffers wrapping existing Typed Arrays. |
| 41 | + |
| 42 | +## Improvements |
| 43 | + |
| 44 | +* [Better dce](https://github.com/scala-js/scala-js/pull/1488) reduces the size of the generated .js files by a few percents. |
| 45 | +* [java.util.Random](https://github.com/scala-js/scala-js/pull/1508) and [j.l.Math.random()](https://github.com/scala-js/scala-js/pull/1511) have been optimized. The latter is now an (inlined) direct forwarder to `js.Math.random()`. |
| 46 | +* Running tests should be faster thanks to [launching JS VMs in advance](https://github.com/scala-js/scala-js/issues/1299). |
| 47 | +* [#1496](https://github.com/scala-js/scala-js/issues/1496) Partial relative paths can now be used in `jsDependencies`. |
| 48 | + |
| 49 | +## Bug fixes |
| 50 | + |
| 51 | +* [#1478](https://github.com/scala-js/scala-js/issues/1478) Wrong optimization of Float/Double * -1 |
| 52 | +* [#1491](https://github.com/scala-js/scala-js/issues/1491) `~fastOptJS` runs non-stop (also reported as [#1513](https://github.com/scala-js/scala-js/issues/1513)) |
| 53 | +* [#1506](https://github.com/scala-js/scala-js/issues/1506)/[#1514](https://github.com/scala-js/scala-js/issues/1514) `fastOptJS` performs unnecessary work (requires libraries to be recompiled with 0.6.1) |
| 54 | +* [#1497](https://github.com/scala-js/scala-js/issues/1497) A better error message when trying to `@JSExport` an abstract class |
| 55 | +* [#1499](https://github.com/scala-js/scala-js/issues/1499) `fullOptJS` doesn't generate the `-launcher.js` script |
| 56 | +* [#1515](https://github.com/scala-js/scala-js/issues/1515) Hidden crasher bug of the optimizer in obscure cases |
0 commit comments