bensu / doo

doo is a library and lein plugin to run cljs.test on different js environments.
Eclipse Public License 1.0
324 stars 63 forks source link

Using source-paths from different profiles #92

Closed DeLaGuardo closed 8 years ago

DeLaGuardo commented 8 years ago

Leiningen merge vectors with concat function. Trying to unquote this list raise exception:

java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn
    at user$eval4172.invoke(form-init2828817098075337047.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:6782)
    at clojure.lang.Compiler.eval(Compiler.java:6772)
    at clojure.lang.Compiler.load(Compiler.java:7227)
    at clojure.lang.Compiler.loadFile(Compiler.java:7165)
    at clojure.main$load_script.invoke(main.clj:275)
    at clojure.main$init_opt.invoke(main.clj:280)
    at clojure.main$initialize.invoke(main.clj:308)
    at clojure.main$null_opt.invoke(main.clj:343)
    at clojure.main$main.doInvoke(main.clj:421)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:383)
    at clojure.lang.AFn.applyToHelper(AFn.java:156)
    at clojure.lang.Var.applyTo(Var.java:700)
    at clojure.main.main(main.java:37)
joelittlejohn commented 8 years ago

Is there any kind of workaround that should be used for this issue? Is doo unusable until this fix is released?

bensu commented 8 years ago

The fix was released under [lein-doo "0.1.7-SNAPSHOT"]

benalbrecht commented 8 years ago

Are you sure about that? According to clojars, the latest version was pushed on Dec 15, 2015.

joelittlejohn commented 8 years ago

@benalbrecht If you're looking at this page, it shows the latest non-snapshot version. 0.1.7-SNAPSHOT is available on clojars.

benalbrecht commented 8 years ago

Yes, there is a 0.1.7-SNAPSHOT version of lein-doo on clojars, but that version was released on december 15 as lein-doo-0.1.7-20151215.193410-2.jar. This issue was only fixed on january 19 and is not included in that version. @bensu could you please release an updated snapshot of lein-doo?

joelittlejohn commented 8 years ago

Ah sorry. I built my own snapshot and published to our own private Clojars so I managed to proceed.

bensu commented 8 years ago

@benalbrecht I was thinking about [doo 0.1.7-SNAPSHOT] which was released with the fix and I though the other snapshot would point to it. I'll cut a new snapshot version this week.

nyoung-figly commented 8 years ago

just hit this issue, but didn't find this thread until after I had already worked out a workaround using ^:replace in project.clj and created a patch with a bit of a different approach, using unquote-splicing (~@).

For anybody googling in the future, the workaround looked like this:

:profiles {:test {:cljsbuild {:builds {:app {:source-paths ^:replace ["src" "test"]

where you have to provide the entire value to replace, not just a seq of items to add to the base profile.

and my attempt at a patch: https://github.com/bensu/doo/compare/master...nyoung-figly:source-paths.cleanup

Glad to hear that there's already a patched version up on Clojars!