ANN: ClojureScript 0.0-3255 - pretty printer & latest Closure Compiler / Library

771 views
Skip to first unread message

David Nolen

unread,
May 8, 2015, 3:23:30 PM5/8/15
to clojure, clojur...@googlegroups.com
ClojureScript, the Clojure compiler that emits JavaScript source code.


Leiningen dependency information:

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

A big thanks goes out to Jonathan Boston and Shaun Lebron for this
release. Thanks to their efforts ClojureScript now includes a full
port of clojure.pprint under the cljs.pprint namespace. This was the
last major namespace in need of porting to ClojureScript.

The release also bumps several dependencies: Clojure 1.7.0-beta2,
tools.reader 0.9.2, Closure Compiler v20150505, and Closure Library
0.0-20150505-021ed5b3.

This release also fixes some regressions around async testing,
docstring REPL support, arglist meta, and more.

As always feedback welcome!

## 0.0-3255

### Changes
* Update Closure Library dependency
* CLJS-1252: Update Closure Compiler Dependency to v20150505
* .clj -> .cljc for important analysis / compilation bits
* add public cljs.compiler.api namespace
* CLJS-1224: cljs.repl: Memoize stack frame mapping
* depend on tools.reader 0.9.2

### Enhancements
* add cljs.pprint/pp macro
* CLJS-710: port clojure.pprint
* CLJS-1178: Compiler does not know Math ns is not not-native
* add getBasis methods to deftype and defrecord ctors a la Clojure JVM
* support ^long and ^double type hints

### Fixes
* fix cljs-1198 async testing regression
* CLJS-1254: Update REPL browser agent detection CLJS-1253: Create/Use
  new Closure Library Release
* CLJS-1225: Variadic function with same name as parent function gives
  runtime error in advanced compile mode.
* CLJS-1246: Add cljs.core/record? predicate.
* CLJS-1239: Make eduction variadic.
* CLJS-1244: tagged-literal precondition check missing wrapping vector
* CLJS-1243: Add TaggedLiteral type & related fns
* CLJS-1240: Add cljs.core/var?
* CLJS-1214: :arglists meta has needless quoting CLJS-1232: bad
  arglists for doc, regression
* CLJS-1212: Error in set ctor for > 8-entry map literal
* CLJS-1218: Syntax quoting an alias created with :require-macros
  throws ClassCastException
* CLJS-1213: cljs.analyzer incorrectly marks all defs as tests when
  eliding test metadata
* CLJS-742: Compilation with :output-file option set fails

Marc Fawzi

unread,
May 8, 2015, 3:30:29 PM5/8/15
to clojur...@googlegroups.com
<<
add getBasis methods to deftype and defrecord ctors a la Clojure JVM
>>


--
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,
May 8, 2015, 3:36:59 PM5/8/15
to clojure, clojur...@googlegroups.com
I forgot to add that with this release there are now AOTed artifacts for ClojureScript and all of its Clojure dependencies.

[org.clojure/clojurescript "0.0-3255" :classifier "aot" :exclusions [org.clojure/tools.reader org.clojure/data.json]]
[org.clojure/tools.reader "0.9.2" :classifier "aot"]
[org.clojure/data.json "0.2.6" :classifier "aot"]

Should do the trick and should significantly improve cold compile and REPL start times. Feedback on the AOTed ClojureScript artifact is most welcome.

David

David Nolen

unread,
May 9, 2015, 3:33:44 PM5/9/15
to clojure, clojur...@googlegroups.com
Just released 0.0-3264, it fixes a critical issue where .js files were missing from the artifacts due to the changed build. Also included are a several fixes around the :libs feature, REPLs, and stack trace mapping.

David

On Fri, May 8, 2015 at 3:23 PM, David Nolen <dnolen...@gmail.com> wrote:

David Nolen

unread,
May 10, 2015, 9:41:34 AM5/10/15
to clojure, clojur...@googlegroups.com
It appears there are still some important bits missing from the artifacts. Working through the issues and will cut a release soon.

David

On Sun, May 10, 2015 at 12:22 AM, Rangel Spasov <rasp...@gmail.com> wrote:
Hey guys,

0.0-3264 fails for me with:

clojure.lang.ExceptionInfo: failed compiling file:resources/public/js/compiled/out/cljs/core.cljs

 at clojure.core$ex_info.invoke (core.clj:4591)

Caused by: java.lang.IllegalArgumentException: No implementation of method: :make-reader of protocol: #'clojure.java.io/IOFactory found for class: nil

 at clojure.core$_cache_protocol_fn.invoke (core_deftype.clj:554)

0.0-3255 seems fine. 

@raspasov

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com

Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Nolen

unread,
May 10, 2015, 10:20:02 AM5/10/15
to clojure, clojur...@googlegroups.com
Just cut 0.0-3269 which adds the missing analysis and source map bits back into the artifacts. It also cleans up :libs support and fixes a related regression with Closure compatible libraries that follow classpath conventions (like transit-js). Both :libs Closure libraries and classpath aware Closure compatible libraries now enjoy REPL support.

David

Dmitri

unread,
May 10, 2015, 5:24:54 PM5/10/15
to clo...@googlegroups.com, clojur...@googlegroups.com
Is there possibly anything else missing in the package, figwheel doesn't appear to find the repl ns.

lein figwheel
Retrieving org/clojure/clojurescript/0.0-3269/clojurescript-0.0-3269.pom from central
Retrieving org/clojure/clojurescript/0.0-3269/clojurescript-0.0-3269.jar from central
Exception in thread "main" java.io.FileNotFoundException: Could not locate cljs/repl__init.class or cljs/repl.clj on classpath: , compiling:(figwheel_sidecar/repl.clj:1:1)

David Nolen

unread,
May 10, 2015, 5:28:26 PM5/10/15
to clojur...@googlegroups.com, clo...@googlegroups.com
ClojureScript now requires Clojure 1.7.0-beta2
--
Note that posts from new members are moderated - please be patient with your first post.
---

Ruslan Prokopchuk

unread,
May 11, 2015, 2:10:52 AM5/11/15
to clojur...@googlegroups.com, clo...@googlegroups.com
With 3269 I have the following error:

java.lang.IllegalArgumentException: /home/ul/Projects/project1/lib/transformflatgeom.js is not a relative path
at clojure.java.io$as_relative_path.invoke (io.clj:405)

config is:

:compiler {
:output-to "resources/public/js/dev.js"
:output-dir "resources/public/js/dev"
:source-map "resources/public/js/dev.js.map"
:libs ["lib/simplegeometry.js" "lib/transformflatgeom.js"
"lib/scaleinteraction.js" "lib/translateinteraction.js"]
:cache-analysis true
:optimizations :none
:pretty-print true}

David Nolen

unread,
May 11, 2015, 2:52:16 AM5/11/15
to clojur...@googlegroups.com, clojure
Enhancing :libs support was pretty finicky work so I'm not particularly surprised by the regression. Looking into it. In the meantime you don't need specify each library, `:libs ["lib"]` should suffice.

David

Max Gonzih

unread,
May 11, 2015, 4:59:11 AM5/11/15
to clojur...@googlegroups.com, clo...@googlegroups.com
I have the same problem, also if I try to run cljsbuild without figwheel I get the following error:

Exception in thread "main" java.io.FileNotFoundException: Could not locate cljs/util__init.class or cljs/util.clj on classpath: , compiling:(cljs/closure.clj:1:1)

Any tips on where can I look for more details? Thanks

Ruslan Prokopchuk

unread,
May 11, 2015, 6:18:44 AM5/11/15
to clojur...@googlegroups.com, clo...@googlegroups.com
Thanks for the tip, `:libs ["lib"]` is more convenient and does not produce error.

понедельник, 11 мая 2015 г., 9:52:16 UTC+3 пользователь David Nolen написал:

Elyahou Ittah

unread,
May 11, 2015, 8:21:32 AM5/11/15
to clojur...@googlegroups.com, clo...@googlegroups.com
Is it possible to call pprint directly like this: (cljs.pprint/pprint {:a 1}) without requiring the namespace ?

David Nolen

unread,
May 11, 2015, 10:31:02 AM5/11/15
to clojur...@googlegroups.com, clojure
As I said above, you must specify Clojure 1.7.0-beta2 as your Clojure dependency.


--

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.

David Nolen

unread,
May 11, 2015, 10:37:05 AM5/11/15
to clojur...@googlegroups.com
In a REPL yes as it's implicitly loaded. In a library no - you must require it.

David

Stephen Nelson

unread,
May 11, 2015, 6:31:39 PM5/11/15
to clojur...@googlegroups.com
> As I said above, you must specify Clojure 1.7.0-beta2 as your Clojure dependency.

We're quite unhappy about this change. Wherever possible, we try to
avoid using unreleased software in our production environments, but
because we compile clojurescript snippets on the fly we're now forced
to switch our whole project to 1.7.

Could you please consider reverting the clj->cljc change until 1.7 is
released, or maintaining a 1.6-compatible branch for bug fixes.

Sean Grove

unread,
May 11, 2015, 6:34:50 PM5/11/15
to clojur...@googlegroups.com
Honestly curious what you mean by "compile clojurescript snippets on the fly", and why you're not able to stay on the current ClojureScript version until Clojure 1.7 is stable/released - is there a bug/security/feature in a library that's switched over that's forcing your hand?

Sean Corfield

unread,
May 11, 2015, 6:52:07 PM5/11/15
to clojur...@googlegroups.com
And given that ClojureScript itself is still on a 0.0-nnnn version number, I don’t think I’d consider it any more "released" than the official alpha / beta builds of Clojure 1.7.0 that are also on Maven Central…

That said, we’ve been running 1.7.0 in production for quite a while — we’ve had Beta 1 in production since April 15th with no issues, and had Alphas in production before that.

Sean

gvim

unread,
May 12, 2015, 10:05:22 AM5/12/15
to clojur...@googlegroups.com
lein mies new <project> followed by updating to the lastest cljs with
`lein ancient` results in this error for me:

java.io.FileNotFoundException: Could not locate cljs/util__init.class or
cljs/util.clj on classpath:

gvim
> --
> 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
> <mailto:clojurescrip...@googlegroups.com>.
> To post to this group, send email to clojur...@googlegroups.com
> <mailto:clojur...@googlegroups.com>.

J David Eisenberg

unread,
May 12, 2015, 11:04:55 AM5/12/15
to clojur...@googlegroups.com
On Tuesday, May 12, 2015 at 7:05:22 AM UTC-7, g vim wrote:
> lein mies new <project> followed by updating to the lastest cljs with
> `lein ancient` results in this error for me:
>
> java.io.FileNotFoundException: Could not locate cljs/util__init.class or
> cljs/util.clj on classpath:
>
> gvim
>

My version of leiningen (2.5.1) doesn't have an "ancient" command. Are you using the latest version of mies from https://github.com/swannodette/mies -- it's more in line with the new ClojureScript quickstart guide.
[snip]

Max Gonzih

unread,
May 12, 2015, 11:13:29 AM5/12/15
to clojur...@googlegroups.com
lein ancient is provided by lein-ancient plugin I beleieve.

J David Eisenberg

unread,
May 12, 2015, 11:21:38 AM5/12/15
to clojur...@googlegroups.com
On Tuesday, May 12, 2015 at 8:13:29 AM UTC-7, Max Gonzih wrote:
> lein ancient is provided by lein-ancient plugin I beleieve.
>

Just installed it. Wasn't able to generate error with mies 0.5.3 template, after changing dependencies to:

:dependencies [[org.clojure/clojure "1.7.0-beta2"]
[org.clojure/clojurescript "0.0-3255"]]

> On 05/12/2015 05:04 PM, J David Eisenberg wrote:
> > On Tuesday, May 12, 2015 at 7:05:22 AM UTC-7, g vim wrote:
> >> lein mies new <project> followed by updating to the lastest cljs with
> >> `lein ancient` results in this error for me:
> >>
> >> java.io.FileNotFoundException: Could not locate cljs/util__init.class or
> >> cljs/util.clj on classpath:
> >>
> >> gvim
> >>
> > My version of leiningen (2.5.1) doesn't have an "ancient" command. Are you using the latest version of mies from https://github.com/swannodette/mies -- it's more in line with the new ClojureScript quickstart guide.
> >
> >> On 08/05/2015 20:23, David Nolen wrote:
> >>> ClojureScript, the Clojure compiler that emits JavaScript source code.
> >>>
> >>> README and source code: https://github.com/clojure/clojurescript
> >>>
> >>> Leiningen dependency information:
> >>>
> >>> [org.clojure/clojurescript "0.0-3255"]
> >>>
> >>> A big thanks goes out to Jonathan Boston and Shaun Lebron for this
> >>> release. Thanks to their efforts ClojureScript now includes a full
> >>> port of clojure.pprint under the cljs.pprint namespace. This was the
> >>> last major namespace in need of porting to ClojureScript.
> >>>
> >>> The release also bumps several dependencies: Clojure 1.7.0-beta2,
> >>> tools.reader 0.9.2, Closure Compiler v20150505, and Closure Library
> >>> 0.0-20150505-021ed5b3.
> >>>
> >>> This release also fixes some regressions around async testing,
> >>> docstring REPL support, arglist meta, and more.
> >>>
> >>> As always feedback welcome!
> >>>
> >>> ## 0.0-3255
> >>>
[snip]

David Nolen

unread,
May 12, 2015, 11:35:31 AM5/12/15
to clojur...@googlegroups.com
What's preventing you from using ClojureScript releases that rely on Clojure 1.6.0 (ClojureScript <= 0.0-3178)? The last real critical bug was the Firefox ES6 regex issue, fixed as of 0.0-2985. We're not going to maintain a 1.6 compatible branch.

David

jack james

unread,
May 12, 2015, 11:36:39 AM5/12/15
to clojur...@googlegroups.com
mies is out of date and uses an old version of cljs and clojure 1.6. lein ancient doesn't upgrade clojure unless you use the :check-clojure option. so it upgrades cljs to 3269, but leaves clojure at 1.6.0, and that won't fly.

gvim

unread,
May 12, 2015, 1:53:30 PM5/12/15
to clojur...@googlegroups.com
I was using [org.clojure/clojurescript "0.0-3269"]

gvim

gvim

unread,
May 12, 2015, 1:54:06 PM5/12/15
to clojur...@googlegroups.com
Ah, thanks for that.

gvim

Stephen Nelson

unread,
May 12, 2015, 5:30:02 PM5/12/15
to clojur...@googlegroups.com
We can and probably will continue using CLJS <= 0.0-3178 for a while,
but afaict there is no release date yet for Clojure 1.7.0 so we'll be
left in limbo using out-of-date releases until it's ready. Not a
problem if it's a month, a problem if it's 6 months.

* We rely heavily on tools like cursive and figwheel to smooth our
development process and reduce the pain of working with large code
bases with clojurescript. These tools will continue to track head.
* Non-critical issues like CLJS-1213 and CLJS-1255 can still have a
big impact on our development process.
* Critical issues like CLJS-1216 do come up from time to time.

We're developing a large commercial project with about 20k lines of
clojurescript. Decisions like this one can have a big impact on our
team, we'd appreciate if in the future you could take the time to
consult the community before making dependency changes that will
affect upstream users.

David Nolen

unread,
May 12, 2015, 5:34:48 PM5/12/15
to clojur...@googlegroups.com
On Tue, May 12, 2015 at 4:29 PM, Stephen Nelson <ste...@montoux.com> wrote:
We're developing a large commercial project with about 20k lines of
clojurescript. Decisions like this one can have a big impact on our
team, we'd appreciate if in the future you could take the time to
consult the community before making dependency changes that will
affect upstream users.

If you're using ClojureScript which has been in perpetual alpha/beta for 3.5 years I don't possibly see how you can have a problem with using Clojure-1.7.0-beta2 in production. ClojureScript is only very recently approaching Clojure levels of stability.

David

Stephen Nelson

unread,
May 12, 2015, 6:06:20 PM5/12/15
to clojur...@googlegroups.com
You're right, deciding to use Clojurescript 2.5 years ago was betting
on an immature project and a big risk for our business. We've
mitigated that risk by curating an extensive test suite and employing
human testers to thoroughly exercise our product every time we switch
releases.

The problem we're having here is not that Clojurescript is immature,
but rather than your decision to change Clojurescript's dependency
from 1.6->1.7 means the other 80% of our codebase must now use beta
Clojure. This is a big surprise, and forces us to take the leap from
1.6 to 1.7 much sooner than we'd planned. Hence, it would have been
good to have some community consultation, or at least some warning.

David Nolen

unread,
May 12, 2015, 6:43:16 PM5/12/15
to clojur...@googlegroups.com
I don't understand why you are not putting pressure on the tooling you like to support the 1.6.0 compatible versions of ClojureScript. As far as I can tell this where your real issues actually lie.

Gary Trakhman

unread,
May 12, 2015, 6:50:21 PM5/12/15
to clojur...@googlegroups.com
Just my 2-cents, cider-nrepl/cljs-tooling makes an effort to be backwards-compatible, but there's still issues with eg. piggieback that we rely on.  The latest work from dnolen on normalizing repl setup seems to address that , but I don't yet understand the full effects/ripples in the larger ecosystem.
Reply all
Reply to author
Forward
0 new messages