<< Back to previous view

[CLJS-593] Unexpected clj->js behavior with advanced compilation after first compilation (after r1877) Created: 20/Sep/13  Updated: 12/Nov/13  Resolved: 12/Nov/13

Status: Closed
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Marco Munizaga Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None
Environment:

Replicated in OS X 10.8.4 and Arch with latest packages


Attachments: Zip Archive test-cljs-master.zip    

 Description   

This release seemed to introduce a subtle bug with (clj->js ...) in advanced compilation. Here is the demo project (https://github.com/MarcoPolo/test-cljs).

If you run (lein cljsbuild clean && lein cljsbuild auto) and use lein trampoline repl-listen (just for the webserver).

The first compilation results in the expected (cljs->js {:command "function"}) to {command:"function"}, but subsequent compilations (after adding or deleting a line in core.cljs) causes (cljs->js {:command "function"}) to return {command:null}.

Also if the code is (cljs->js {"command" "function"}) after the first compilation it results in {null : null}

This doesn't seem to happen in r1859.



 Comments   
Comment by David Nolen [ 20/Sep/13 2:17 PM ]

This likely related to issues between how we handle keywords now under advanced compilation and incremental compilation. Thanks for the report, will look into it.

Comment by Marco Munizaga [ 20/Sep/13 5:20 PM ]

So I played around with this further and checkout the git repo for cljs, and it doesn't happen when using the repo tag r1889, but when using the dependency org.clojure/clojurescript "0.0-1889" it does. Weird... Any idea?

Comment by David Nolen [ 24/Sep/13 7:28 PM ]

Until we get around to resolving the issue your best bet is just going to be to clean the build before doing an advanced build. I'm pretty sure this happens because we don't preserve sensible dependency order during incremental builds.

Comment by David Nolen [ 28/Oct/13 8:52 AM ]

Marco can you test with 1978? I've made incremental compilation a bit more robust.

Comment by Marco Munizaga [ 12/Nov/13 1:28 PM ]

Looks fixed, thanks!

Comment by David Nolen [ 12/Nov/13 2:07 PM ]

fixed

Generated at Mon Jul 28 07:24:31 CDT 2014 using JIRA 4.4#649-r158309.