-
Couldn't load subscription status.
- Fork 147
Announcing Scala.js 0.6.4. #162
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a note on the simplifications in the
concurrentcollection due to single threading.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? They completely respect their semantics. The simplifications are an implementation detail.