ClojureScript

Unexpected clj->js behavior with advanced compilation after first compilation (after r1877)

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Replicated in OS X 10.8.4 and Arch with latest packages

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.

Activity

Hide
David Nolen added a comment -

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.

Show
David Nolen added a comment - 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.
Hide
Marco Munizaga added a comment -

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?

Show
Marco Munizaga added a comment - 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?
Hide
David Nolen added a comment -

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.

Show
David Nolen added a comment - 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.
Hide
David Nolen added a comment -

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

Show
David Nolen added a comment - Marco can you test with 1978? I've made incremental compilation a bit more robust.
Hide
Marco Munizaga added a comment -

Looks fixed, thanks!

Show
Marco Munizaga added a comment - Looks fixed, thanks!
Hide
David Nolen added a comment -

fixed

Show
David Nolen added a comment - fixed

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: