Skip to content

playing with modern-cljs: ClassCastException #83

@phi1ipp

Description

@phi1ipp

Hi, a newb here trying to follow modern-cljs, failed at step 15 (using 0.3.5-SNAPSHOT) and

(deftask testing
  "Add test/cljc for CLJ/CLJS testing purpose"
  []
  (set-env! :source-paths #(conj % "test/cljc"))
  identity)

(deftask tdd
  "Launch a TDD Environment"
  []
  (comp
   (serve :handler 'modern-cljs.core/app
          :resource-root "target"
          :reload true)
   (testing)
   (watch)
   (reload :ws-host "localhost")
   (cljs-repl)
   (test-cljs :out-file "main.js"
              :js-env :phantom
              :namespaces '#{modern-cljs.shopping.validators-test}
              :update-fs? true)
   (test :namespaces '#{modern-cljs.shopping.validators-test})
   (target :dir #{"target"})))

below is a stack-trace

Starting reload server on ws://localhost:49637
Writing boot_cljs_repl.cljs...
Adding: ([doo "0.1.8"]) to :dependencies
[boot-cljs] :out-file is deprecated, please use :ids
                              java.lang.Thread.run              Thread.java:  834
java.util.concurrent.ThreadPoolExecutor$Worker.run  ThreadPoolExecutor.java:  628
 java.util.concurrent.ThreadPoolExecutor.runWorker  ThreadPoolExecutor.java: 1128
               java.util.concurrent.FutureTask.run          FutureTask.java:  264
                                               ...                               
               clojure.core/binding-conveyor-fn/fn                 core.clj: 2030
                                 boot.core/boot/fn                 core.clj: 1033
                                               ...                               
                         boot.core/construct-tasks                 core.clj:  995
                                clojure.core/apply                 core.clj:  665
                                               ...                               
              boot.user$eval1475$fn__1476.doInvoke                         :   55
                                               ...                               
            crisptrutski.boot-cljs-test/eval625/fn       boot_cljs_test.clj:  298
                                clojure.core/swap!                 core.clj: 2345
java.lang.ClassCastException: class clojure.lang.Var$Unbound cannot be cast to class clojure.lang.IAtom (clojure.lang.Var$Unbound and clojure.lang.IAtom are in unnamed module of loader boot.AddableClassLoader @521e5a6a)
  clojure.lang.ExceptionInfo: class clojure.lang.Var$Unbound cannot be cast to class clojure.lang.IAtom (clojure.lang.Var$Unbound and clojure.lang.IAtom are in unnamed module of loader boot.AddableClassLoader @521e5a6a)
    line: 76

boot.properties

#http://boot-clj.com
#Sun Feb 17 11:27:01 CST 2019
BOOT_VERSION=2.8.2
BOOT_CLOJURE_VERSION=1.10.0
BOOT_CLOJURE_NAME=org.clojure/clojure

Any ideas what could go wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions