ANN: ClojureScript 0.0-2814, Nashorn REPL, async testing, and much more

477 views
Skip to first unread message

David Nolen

unread,
Feb 9, 2015, 7:47:31 PM2/9/15
to clojur...@googlegroups.com, clojure
ClojureScript, the Clojure compiler that emits JavaScript source code.


New release version: 0.0-2814

Leiningen dependency information:

    [org.clojure/clojurescript "0.0-2814"]

There are numerous enhancements in this release including: a Nashorn
REPL, Node.js 0.12 support, cljs.test async testing support,
`cljs.closure/watch`, extra JSDoc annotation support, unified source
mapping on client/server (thus REPLs!), and many small fixes.

I'm particularly excited about unified source mapping as this means we
get a much better debugging experience on newer targets (for us) like iOS, see https://github.com/omcljs/ambly

## 0.0-2814

### Enhancements
* add simple source directory `cljs.closure/watch` watcher using java.nio
* CLJS-1022: Concatenate foreign dependencies safely
* CLJS-988: Support async testing in cljs.test
* CLJS-1018: Add support for cljs.core/*e Modify the JavaScript that is sent for evaluation to wrap in a try and then catch any exception thrown, assign it to *e, and then rethrow.
* CLJS-1012: Correct behavior when *print-length* is set to 0
* Added new :closure-extra-annotations compiler option allowing to define extra JSDoc annotation used by closure libraries.
* Mirrored source map support APIs on server/client
* Unified source mapping support in REPLs
* Nashorn REPL (thanks Pieter van Prooijen)

### Fixes
* CLJS-1023: regression, macro-autoload-ns? and ns-dependents need to throw on cyclic dependencies
* fix require with browser REPL, set base path to "goog/"
* CLJS-1020: off by one error in REPL source map support
* Node.js 0.12 support
* browser REPL needs to respect :output-dir
* CLJS-1006: Implicit dependency of clojure.browser.repl on cljs.repl
* CLJS-1005: Browser REPL creates 'out' directory no matter what
* CLJS-1003: fix cljs.test run-tests do-report :summary issues
* CLJS-1003: Cannot pass custom env to run-tests
* Windows Node.js REPL issues

David Nolen

unread,
Feb 9, 2015, 7:58:40 PM2/9/15
to clojur...@googlegroups.com, clojure
Oh also thanks to Leon Grapenthin for working on the async testing support. And of course a general round of thanks to everyone who submitted patches of any kind and size for this release.

David

Ivan L

unread,
Feb 10, 2015, 12:40:11 AM2/10/15
to clo...@googlegroups.com, clojur...@googlegroups.com
Congratulations David and CLJS team, you guys are on fire lately.

David Nolen

unread,
Feb 10, 2015, 7:37:49 AM2/10/15
to clojur...@googlegroups.com, clojure
Cut 0.0-2816. The only change is a fix for reader metadata leakage around `reify`.

David

On Mon, Feb 9, 2015 at 7:47 PM, David Nolen <dnolen...@gmail.com> wrote:

Julien Eluard

unread,
Feb 10, 2015, 9:47:43 AM2/10/15
to clojur...@googlegroups.com
Great job as usual!

A recent change makes the compiler trigger warnings for single segment namespaces. Are there real limitations with those or is it a best practice?

Thanks,
Julien

--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurescrip...@googlegroups.com.
To post to this group, send email to clojur...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.

David Nolen

unread,
Feb 10, 2015, 9:53:41 AM2/10/15
to clojur...@googlegroups.com
Compiler support for single segment namespaces has always been spotty and there's no intention to improve it. There are fundamental semantic issues - for example if you have a DOM element with a CSS id and you haven't supplied a namespace but you goog.require one with that name it will return the DOM element. Good luck debugging that.

Single segment namespaces are nearly alway representative of a problem waiting to manifest. If you want to use them then you can suppress the warning in your build options.

David

Mikey Griffiths

unread,
Feb 10, 2015, 10:54:00 AM2/10/15
to clojur...@googlegroups.com, clo...@googlegroups.com
According to GitHub, ClojureScript now has 104 contributors to Clojure's 102 - and has had more commits since around December. Congrats to all involved!

Colin Yates

unread,
Feb 10, 2015, 11:11:34 AM2/10/15
to clojur...@googlegroups.com
That's fantastic - congrats everybody!

On 10 February 2015 at 15:54, Mikey Griffiths <mikeygr...@gmail.com> wrote:
> According to GitHub, ClojureScript now has 104 contributors to Clojure's 102 - and has had more commits since around December. Congrats to all involved!
>

Daniel Skarda

unread,
Feb 11, 2015, 6:52:10 AM2/11/15
to clojur...@googlegroups.com, clo...@googlegroups.com
David,
thank you for all improvements and work you do for ClojureScript!

Could you please write few examples how to take advantage of new unified source-map support? I tried 0.0-2816 with node.js without success. I tried with piggieback and without. But the only solution was with 'npm install source-map-support' (I guess this is not the unified support you wrote about).

Even with source-map-support I got errors to console (see below).

1) Is new unified source-map support compatible with piggieback/cider or is some modification required?

2) Is {:source-map true} enough for unified source-mapping support? Does it work OOTB or is there any hidden switch?

Thank you,
Dan

TypeError: Cannot call method 'cljs$core$IPrintWithWriter$_pr_writer$arity$3' of undefined
at [object Error].pr_str_STAR_ [as toString] (/home/0rfelyus/prace/cryptelo/target/cljs-repl-node/cljs/core.cljs:441:17)
at Function.prepareStackTrace (/home/0rfelyus/prace/cryptelo/node_modules/source-map-support/source-map-support.js:298:16)
at Socket.<anonymous> ([stdin]:48:31)
at Socket.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:748:14)
at Socket.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:410:10)
at emitReadable (_stream_readable.js:406:5)
at readableAddChunk (_stream_readable.js:168:9)
at Socket.Readable.push (_stream_readable.js:130:10)

Robin Heggelund Hansen

unread,
Feb 11, 2015, 7:18:04 AM2/11/15
to clo...@googlegroups.com, clojur...@googlegroups.com
Does there exist a tutorial for how to setup a project using cljs.test? And some details on how the async testing works?

Thanks!

David Nolen

unread,
Feb 11, 2015, 11:01:17 AM2/11/15
to clojur...@googlegroups.com
There is no information beyond some documentation I just added: https://github.com/clojure/clojurescript/blob/edea85ea98a7f48e95763dc40872da711f4cd60b/src/cljs/cljs/test.cljs#L104

If somebody would like to add a wiki page to the ClojureScript GitHub repo that documents testing that would be GRAND.

Thanks,
David

On Wed, Feb 11, 2015 at 7:18 AM, Robin Heggelund Hansen <skinn...@gmail.com> wrote:
Does there exist a tutorial for how to setup a project using cljs.test? And some details on how the async testing works?

Thanks!

--
Reply all
Reply to author
Forward
0 new messages