Concurrent builds lead to incorrect keyword constants when using clojurescript >= 0.0-1978 #253

Closed
sfnelson opened this Issue Oct 30, 2013 · 6 comments

Comments

Projects
None yet
2 participants
Contributor

sfnelson commented Oct 30, 2013

Define a cljsbuild project with two builds, the first using :optimizations :whitespace and the second using :optimizations :advanced. The constants_table.js generated for the second build will not include constants that were also used in the first build, leading to an output with missing keyword definitions.

David Nolen suggested that this might be because cljsbuild does not correctly call the reset flag between builds (see http://dev.clojure.org/jira/browse/CLJS-643).

Minimal example: https://github.com/sfnelson/cljs-derive-1978

Collaborator

cemerick commented Oct 30, 2013

Yeah, I wasn't aware of the reset flag. I've commented on the CLJS issue; hoping that we can get that sorted out so the API is more amenable to being used by more than one caller, potentially concurrently. For now, I would suggest sticking with older revs of ClojureScript.

Contributor

sfnelson commented Oct 30, 2013

I got the impression it's very new, would have been nice if it was announced somehow. Thanks.

Collaborator

cemerick commented Oct 30, 2013

Relatively new, yes. We'll see what we can do. :-)

Collaborator

cemerick commented Nov 6, 2013

CLJS-643 has been "fixed", and the results are on ClojureScript master. If you're up for it, you can pull it and build it locally; lein-cljsbuild will work with it as it sits. That will fix your immediate issue until a new ClojureScript release is done.

gh-264 is the only work that needs to be done here to support CLJS-643. Will leave this open until that new release is out.

Contributor

sfnelson commented Nov 6, 2013

I've been following your discussion on the cljs tracker, thanks for all your hard work!

I've been using a workaround so no immediate need for me to upgrade, but I'll try using master to verify.

Collaborator

cemerick commented Nov 7, 2013

[org.clojure/clojurescript "0.0-2014"] is now available, and can be used with lein-cljsbuild without any modification to the latter. A cljsbuild release supporting the new compilation environments (and requiring build 2014) will be out shortly.

cemerick closed this Nov 7, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment