Scala.js v0.3 released!

760 views
Skip to first unread message

Sébastien Doeraene

unread,
Feb 13, 2014, 5:26:08 PM2/13/14
to scal...@googlegroups.com
Hi all,

We're excited to announce the release of Scala.js v0.3. It's been only 40 days since v0.2, and yet so much has been improved, added and fixed since then, thanks to all the contributors.

To upgrade, simply update the version of your dependency in project/build.sbt. You can also remove any extra resolver that was previously necessary, as the Scala.js sbt plugin now resolves by default, and itself adds the appropriate resolvers for libraries.

New features
  • Support of Futures and Promises. Two JavaScript-friendly ExecutionContexts are provided: scala.scalajs.concurrent.JSExecution.{queue, runNow}.
  • Parameters with default values, aka optional parameters, can now be used when writing types for JavaScript API. It is not necessary to use endless overloads anymore.
  • Add methods and operators to access all the JavaScript constructs we were still missing (typeof, delete, in, comparisons, etc.)
Improvements
  • The output of the packageJS and optimizeJS tasks are now configurable, which provides for easier integration into a Play application.
  • Support for scala.Symbol
  • Better support of scala.Enumeration: elements declared with
    val Monday, Tuesday, Sunday = Value
    are now supported. Previously it had to be
    val Monday = Value("Monday")
    val Tuesday = Value("Tuesday")
    val Sunday = Value("Sunday")
  • Compile-time, user-friendly error messages for illegal declarations of JS types (e.g., nested inside a class or trait). Previously it would blow up at runtime.
  • Support Throwable.printStackStrace
  • js.Dictionary is now generic in the type of the elements stored.
Bug fixes

You may find the complete list of bug fixed since v0.2 in the issue tracker, but what you really need to know is this:
Scala.js now passes all the tests of the Scala test suite itself that are supposed to pass.

Some tests are disabled because they rely on features not supported by design, for example runtime reflection. But all the ones that are supposed to pass do pass. This is a major proof of maturity and stability of Scala.js. Most of the hard work for this to happen is due to Tobias Schlatter.

A big thank you to all the contributors!

With a big news: I am not the first committer anymore!

#Author
61  Tobias Schlatter
38  Sébastien Doeraene
9  Sandeep
6  Jonas Fonseca
4  Li Haoyi
1  Dylan Arnold
1  Alistair Johnson
1  Piotr Kolaczkowski
1  Peluko

Complete commit list!

shaTitle
c8e7c05  Version 0.3.
a99d8df   Math hypot, expm1, sinh, cosh, tanh
a0ea9d0  Fix #232: "smart" js.Dynamic.literal
51b1acb  Give version-dependent files a versioned name.
a4685ef   Give version-dependent files a versioned name.
4ec7ee6  Compile scalalib overrides with the scalalib, not the library.
c9195b6  Fix #261: reversi-opt broken.
bacb075   Fix #256: Add js.Object.hasProperty(o, p) as equiv. to `p in o`.
5fcc5a1  Review js.Dictionary as a generic class <: js.Object.
b5e0b15  Fix #255: Add method js.Dictionary.delete() for the delete keyword.
9b02e28   Classify last partests. With this commit, Scala.js reaches full partest coverage
bbab743  Fix #250: Reflective calls on Array.update with relaxed return type
9032fb1  Classify almost last partest
905e1a8   Fix #219: No bridges (and refl proxies) for macros
0dabc60  Remove 'extends NotNull' for 'js.Undefined'.
9608367  Fix dependencies of scalajs-library.
ea4a2e7   Fix #218: class literal for existential value classes.
8c54027  Fix #220: Correct runtime return type for boolean & and | ops
db8238e  Fix #241: Fix reflective call proxy generation
79b4c3d   Formatter's behavior for out-of-range integers and x, X, o.
f71303e  Fix #217: toHexString wrong for negative numbers.
78e6470  Fix #213: Correct reflective call rewrite for methods on string with relaxed ret
38b7f28  Fix #215: Reflective calls on comparison ops on primitives
fe4a470   Fix #216: Correct hashCode for boxed Chars
70d6320  Return "undefined" when calling .toString() on JS undefined.
79e5eb0  Backport source changes in compiler/ from scala-2.11.
0c1463a   Add implementation for String.equalsIgnoreCase
d6f0c55  Add Scala.js specific scala.Symbol implementation
313ce40  Fix #225: provide an equivalent of JS' `typeof x`.
65680bb   Fix #211: java.util.Formatter does not support `n` conversion
a103dca  Fix #228: Add primitive js.debugger() mapping to debugger statement.
33774c7  Fix #184: Add support for Throwable.printStackTrace().
372cd8c   Unwrap JavaScriptException when it's thrown.
8a8ae78  Fix definitions of operators on js types.
a633e8f  Classify and file the last partests.
8ee8db3   Protect receiver of reflective call from double evaluation
1414e21  Make reflective calls on js.String work
8cd5341  Make reflective calls on scala.Array work
c9fc450   Fix #195: Reflective calls on primitive value types
3ea37f7  Remove js.Function.apply().
5e7c6d9  Fix #204: Restrict ancestors of classes extending js.Any
8befb71   Make the path of the output of optimizeJS configurable.
b0e36d3  Fix #200: Enumeration fix was complaining about Enumeration implementation
ba4d8b8  java_lib lang.Math nextUp, nextAfter, ulp for Double
52cb21c   Forward constructor on String to RuntimeString (equivalent to methods)
19593ca  Add proxy object for java.lang.String implementations
f1738c7  Add missing comparison ops to js.String and fix compiler to support them
3f8ae74   Classify partests
8405296  Fix #192: Fully support (sane uses) of scala.Enumeration
3b1e380  Refactor JSInterop transformer state management
3752b68   Fix #110: Proper support for reflective calls
7be48cd  java_lib cbrt
158b079   Fix #183: Add Thread.currentThread() to support Future.flatMap.
9ae6343  Added function's to Java.lang.Math
fdd6ad0  Fix #178: Add bridges for methods inherited from traits
4921dbb   Fixed escaping of file separator on windows when relativeSourceMaps is enabled
b480445  Fix java Regex behavior with empty matches (fixes #156)
4c89c64  Name-mangle illegal JS identifiers (fix #29, fix #153)
95fe460   Fix #165: Name mangle private methods
037d859  Remove lingering println
09eb1eb   Fix #163 completely added for AnyRef
525d45c  Re-Classify buglisted partests after fixes
3f59f11  Fix #149: Implement String.hashCode()
c66bbbc   Make runtime.Long constants compile time consts
bee978b  Fix #168: Allow to pseudo-flush JS Console
a5e512b  Remove lingering trailing whitespace
d46c5ee   Fix #172: Patch java.lang.Long.numberOfLeadingZeros
f8ce0b2  Fix #155: Allow null w/o NPE in StringBuilder where appropriate
e8f9797  Fix #152: Coercing to char yields unsigned value
2e288ad   Fix #150: Raise exception on failed String to numeric conversion
3e25f7a  Fix #151: Corner cases for Double/Float toString
aa9066e  Fix #157: Add trailing $ to names returned by getClass.getName on objects
32b5df8   Fix #166: Correctly handle special types scala.Nothing and scala.Null
42c5753  Partial #163: Added Copyto and copyOfRange for Java Arrays for Int, Long, Short,
41b8e19  Add tests for Arrays.binarySearch range checks
39741aa   Remove exceptions duplicated in java.util and already defined in java.lang
2bd2f17  Implemented AtomicXXX and YYYReferences in javalib, including tests
6d2d421  Implemented java.util.Arrays Binary Search for Float, Double and Anyref
67842f2   Binary Search for java.util.Arrays
c5ee2f1  Allow setting of package directories
b59ddb3  Added java_lang_Object to its own ancestor hash
0cabeac   updated corejslib to use 1 instead of true for ancestor maps
227e075  Swap out booleans in ancestors map with ints
6cb21cd  Added option 'relativeSourceMaps' to sbt plugin
b628b24   Fix #158: Implement java.util.Random.nextLong()
174d28c  Change 'outstanding' to 'noteworthy' in the README
5f0e7e1  File and classify buglisted tests
76d30fc   Create partest coverage script and fix test lists
d37d706  Classify (supposedly last) partests
c716602  Classify partests
67336e9  Have Travis check the size of reversi outputs.
4775e0a  Fix #135: Prevent bloated optimized size due to dropLZ method
fb718a6   Implement java.util.concurrent.TimeUnit.
5a6efac  Fix #68: JS optional arguments via Scala default arguments in interop
244ffe1  Towards v0.3 again.
dce59d0   Version 0.2.1.
6aac7a1  Whitelist partests that now succeed
76d1a9a   Fix #125: Correctly resolve overload when converting scala.Function to js.Functi
11d955f  Clean-up of settings related to the ScalaJSEnvironment.
c0a9174  Fix #124: Add setting to opt-out setup of the Scala.js runner.
8cd299b   Fix #123: do not load the test framework if its class is not there.
fa8f48a  Remove unnecessary semicolon
46f850a  Fix #88: Implement AbstractPromise, add simple ExecutionContexts for JavaScript
e8e865b   Add methods to mock JS clock to Jasmine wrapper
e276050  Implemented System.nanoTime
f9ee4a4  Whitelist three new tests which now pass.
2bf8a5b   Allow to publish releases to Bintray.
ef95470  Implement java.lang.Character.isWhitespace
4cc6fe6  Fix #113: Prepend a Char to String
01873cc   Fix #116: Correct comparison for boxed Float and Double
5977b60  Fix #104: Correct hash for boxed Byte, Short and Int
118b40d  Fix #109: Handle LabelDef for while (false) {}
5cd0ffb   Fix #117: Implement java.lang.Character.digit
8f7f67d  Add test suite for Java regex emulation.
7b01f45  Classify a couple of buglisted tests (File / Blacklist / Whitelist)
90837bd   Cleanup buglist (file bugs or blacklist)
1842f42  move run/array-charSeq.scala to whitelist (fixed in #55)
0e12724  Display warning when the scalalib/source submodule is not up-to-date.
997d3c3   Fix #102: test:packageJS and compile:packageJS have the same outputs.
d157559  Move scalaJSExternalCompileSettings outside the sbt plugin.
6c7f001  Fix Travis config.
e57ad17   Towards 0.3.

Enjoy this new epic release of Scala.js!

Sébastien

Erik Bruchez

unread,
Feb 13, 2014, 5:48:29 PM2/13/14
to Sébastien Doeraene, scal...@googlegroups.com
It's really exciting. Thanks for all the hard work!

-Erik


--
You received this message because you are subscribed to the Google Groups "Scala.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-js+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Sebastian Nozzi

unread,
Feb 14, 2014, 2:58:47 AM2/14/14
to Erik Bruchez, Sébastien Doeraene, scal...@googlegroups.com
Awesome release! Thanks for making it happen!

Simon Ochsenreither

unread,
Feb 14, 2014, 7:51:47 AM2/14/14
to scal...@googlegroups.com
Wow, really impressive!

Congratulations and thanks for all the hard work!

Justin du coeur

unread,
Feb 14, 2014, 7:56:14 AM2/14/14
to Simon Ochsenreither, scal...@googlegroups.com
Yeah, very neat stuff.  This project has gone from "you've got to be out of your mind" to being one of the most intriguing-looking ways to code for the Web in a remarkably short time...


On Fri, Feb 14, 2014 at 7:51 AM, Simon Ochsenreither <simon.och...@gmail.com> wrote:
Wow, really impressive!

Congratulations and thanks for all the hard work!

--

Suhku Huh

unread,
Feb 14, 2014, 8:58:02 AM2/14/14
to scal...@googlegroups.com
Great news, congratulations!
Thanks, everyone !!!

Peluko

unread,
Feb 14, 2014, 6:40:56 PM2/14/14
to scal...@googlegroups.com
Great! I think that Scala.js will be a major actor on client side web programming.

With Scala I've recovered the fun and zen of programming that I've lost since I left C++ in favor of Java and C#. And with Scala.js I can apply it to the browser.

I never felt comfortable with client side web programming, it's a chaotic world, a bunch of technologies and tools with Javascript messing it all. But now I'm really enjoying it. Thanks.

Sebastian Nozzi

unread,
Feb 14, 2014, 7:46:52 PM2/14/14
to Peluko, scal...@googlegroups.com
Me feelings exactly.

Scala gave me back the joy to program, that I had lost after believing I would forever move from boring-to-boring Java Enterprise Developer job.

But even if Scala is great, and the whole experience of developing in Scala is great (from the language itself to the tools, to the ecosystem), as a web developer there always was this unavoidable "stone in the shoe"... Not only unavoidable but increasingly relevant, powerful and inescapable... JavaScript.

And of course the experience of developing in JavaScript is completely different than the Scala one. For me worse. For others better. But definitely different.

For me Scala.js is invaluable because it makes the circle complete: it provides that same "experience" of Scala (back-end) to web front-end development. An area I've been trying to avoid because that same "experience" was lacking...


--
Reply all
Reply to author
Forward
0 new messages