ruedigergad/bowerick

cljs compile failed: Referred macro taoensso.truss.impl/catch-errors* does not exist {:tag :cljs/analysis-error}

Closed this issue · 2 comments

cassc commented

When I add bowerick to my project.clj, lein cljbuild failed with the following errors:

Compiling ClojureScript...
Compiling "resources/public/cljs/cmd.js" from ["src-cljs"]...
Compiling "resources/public/cljs/cmd.js" failed.
clojure.lang.ExceptionInfo: failed compiling file:src-cljs/cmd/base.cljs {:file #object[java.io.File 0x1cb929a9 "src-cljs/cmd/base.cljs"]}
    at clojure.core$ex_info.invokeStatic(core.clj:4617)
    at clojure.core$ex_info.invoke(core.clj:4617)
    at cljs.compiler$compile_file$fn__2695.invoke(compiler.cljc:1347)
    at cljs.compiler$compile_file.invokeStatic(compiler.cljc:1309)
    at cljs.compiler$compile_file.invoke(compiler.cljc:1289)
    at cljs.compiler$compile_root.invokeStatic(compiler.cljc:1384)
    at cljs.compiler$compile_root.invoke(compiler.cljc:1363)
    at cljs.closure$compile_dir.invokeStatic(closure.clj:446)
    at cljs.closure$compile_dir.invoke(closure.clj:440)
    at cljs.closure$eval3085$fn__3086.invoke(closure.clj:486)
    at cljs.closure$eval3037$fn__3038$G__3028__3045.invoke(closure.clj:391)
    at cljs.closure$eval3098$fn__3099.invoke(closure.clj:500)
    at cljs.closure$eval3037$fn__3038$G__3028__3045.invoke(closure.clj:391)
    at cljs.build.api$inputs$reify__3582$compile_input__3583.invoke(api.clj:182)
    at clojure.core$map$fn__4785.invoke(core.clj:2644)
    at clojure.lang.LazySeq.sval(LazySeq.java:40)
    at clojure.lang.LazySeq.seq(LazySeq.java:49)
    at clojure.lang.RT.seq(RT.java:521)
    at clojure.core$seq__4357.invokeStatic(core.clj:137)
    at clojure.core$apply.invokeStatic(core.clj:641)
    at clojure.core$mapcat.invokeStatic(core.clj:2674)
    at clojure.core$mapcat.doInvoke(core.clj:2674)
    at clojure.lang.RestFn.invoke(RestFn.java:423)
    at cljs.build.api$inputs$reify__3582._compile(api.clj:186)
    at cljs.closure$build.invokeStatic(closure.clj:1683)
    at cljs.closure$build.invoke(closure.clj:1633)
    at cljs.build.api$build.invokeStatic(api.clj:219)
    at cljs.build.api$build.invoke(api.clj:210)
    at cljs.build.api$build.invokeStatic(api.clj:213)
    at cljs.build.api$build.invoke(api.clj:210)
    at cljsbuild.compiler$compile_cljs$fn__3609.invoke(compiler.clj:60)
    at cljsbuild.compiler$compile_cljs.invokeStatic(compiler.clj:59)
    at cljsbuild.compiler$compile_cljs.invoke(compiler.clj:48)
    at cljsbuild.compiler$run_compiler.invokeStatic(compiler.clj:166)
    at cljsbuild.compiler$run_compiler.invoke(compiler.clj:122)
    at user$eval3743$iter__3779__3783$fn__3784$fn__3802.invoke(form-init1487475488560481501.clj:1)
    at user$eval3743$iter__3779__3783$fn__3784.invoke(form-init1487475488560481501.clj:1)
    at clojure.lang.LazySeq.sval(LazySeq.java:40)
    at clojure.lang.LazySeq.seq(LazySeq.java:49)
    at clojure.lang.RT.seq(RT.java:521)
    at clojure.core$seq__4357.invokeStatic(core.clj:137)
    at clojure.core$dorun.invokeStatic(core.clj:3024)
    at clojure.core$doall.invokeStatic(core.clj:3039)
    at clojure.core$doall.invoke(core.clj:3039)
    at user$eval3743.invokeStatic(form-init1487475488560481501.clj:1)
    at user$eval3743.invoke(form-init1487475488560481501.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:6927)
    at clojure.lang.Compiler.eval(Compiler.java:6917)
    at clojure.lang.Compiler.load(Compiler.java:7379)
    at clojure.lang.Compiler.loadFile(Compiler.java:7317)
    at clojure.main$load_script.invokeStatic(main.clj:275)
    at clojure.main$init_opt.invokeStatic(main.clj:277)
    at clojure.main$init_opt.invoke(main.clj:277)
    at clojure.main$initialize.invokeStatic(main.clj:308)
    at clojure.main$null_opt.invokeStatic(main.clj:342)
    at clojure.main$null_opt.invoke(main.clj:339)
    at clojure.main$main.invokeStatic(main.clj:421)
    at clojure.main$main.doInvoke(main.clj:384)
    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)
Caused by: clojure.lang.ExceptionInfo: Referred macro taoensso.truss.impl/catch-errors* does not exist {:tag :cljs/analysis-error}
    at clojure.core$ex_info.invokeStatic(core.clj:4617)
    at clojure.core$ex_info.invoke(core.clj:4617)
    at cljs.analyzer$error.invokeStatic(analyzer.cljc:562)
    at cljs.analyzer$error.invoke(analyzer.cljc:558)
    at cljs.analyzer$error.invokeStatic(analyzer.cljc:560)
    at cljs.analyzer$error.invoke(analyzer.cljc:558)
    at cljs.analyzer$check_use_macros.invokeStatic(analyzer.cljc:1690)
    at cljs.analyzer$check_use_macros.invoke(analyzer.cljc:1684)
    at cljs.analyzer$ns_side_effects.invokeStatic(analyzer.cljc:2526)
    at cljs.analyzer$ns_side_effects.invoke(analyzer.cljc:2499)
    at cljs.analyzer$analyze_STAR_$fn__1447.invoke(analyzer.cljc:2585)
    at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
    at clojure.core$reduce.invokeStatic(core.clj:6544)
    at clojure.core$reduce.invoke(core.clj:6527)
    at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:2585)
    at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:2575)
    at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:2600)
    at cljs.analyzer$analyze.invoke(analyzer.cljc:2587)
    at cljs.analyzer$analyze_file$fn__1498.invoke(analyzer.cljc:2844)
    at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:2839)
    at cljs.analyzer$analyze_file.invoke(analyzer.cljc:2805)
    at cljs.analyzer$analyze_deps.invokeStatic(analyzer.cljc:1666)
    at cljs.analyzer$analyze_deps.invoke(analyzer.cljc:1651)
    at cljs.analyzer$ns_side_effects.invokeStatic(analyzer.cljc:2504)
    at cljs.analyzer$ns_side_effects.invoke(analyzer.cljc:2499)
    at cljs.analyzer$analyze_STAR_$fn__1447.invoke(analyzer.cljc:2585)
    at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
    at clojure.core$reduce.invokeStatic(core.clj:6544)
    at clojure.core$reduce.invoke(core.clj:6527)
    at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:2585)
    at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:2575)
    at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:2600)
    at cljs.analyzer$analyze.invoke(analyzer.cljc:2587)
    at cljs.analyzer$analyze_file$fn__1498.invoke(analyzer.cljc:2844)
    at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:2839)
    at cljs.analyzer$analyze_file.invoke(analyzer.cljc:2805)
    at cljs.analyzer$analyze_deps.invokeStatic(analyzer.cljc:1666)
    at cljs.analyzer$analyze_deps.invoke(analyzer.cljc:1651)
    at cljs.analyzer$ns_side_effects.invokeStatic(analyzer.cljc:2504)
    at cljs.analyzer$ns_side_effects.invoke(analyzer.cljc:2499)
    at cljs.analyzer$analyze_STAR_$fn__1447.invoke(analyzer.cljc:2585)
    at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
    at clojure.core$reduce.invokeStatic(core.clj:6544)
    at clojure.core$reduce.invoke(core.clj:6527)
    at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:2585)
    at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:2575)
    at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:2600)
    at cljs.analyzer$analyze.invoke(analyzer.cljc:2587)
    at cljs.analyzer$analyze_file$fn__1498.invoke(analyzer.cljc:2844)
    at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:2839)
    at cljs.analyzer$analyze_file.invoke(analyzer.cljc:2805)
    at cljs.analyzer$analyze_deps.invokeStatic(analyzer.cljc:1666)
    at cljs.analyzer$analyze_deps.invoke(analyzer.cljc:1651)
    at cljs.analyzer$ns_side_effects.invokeStatic(analyzer.cljc:2504)
    at cljs.analyzer$ns_side_effects.invoke(analyzer.cljc:2499)
    at cljs.analyzer$analyze_STAR_$fn__1447.invoke(analyzer.cljc:2585)
    at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
    at clojure.core$reduce.invokeStatic(core.clj:6544)
    at clojure.core$reduce.invoke(core.clj:6527)
    at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:2585)
    at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:2575)
    at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:2600)
    at cljs.analyzer$analyze.invoke(analyzer.cljc:2587)
    at cljs.analyzer$analyze_file$fn__1498.invoke(analyzer.cljc:2844)
    at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:2839)
    at cljs.analyzer$analyze_file.invoke(analyzer.cljc:2805)
    at cljs.analyzer$analyze_deps.invokeStatic(analyzer.cljc:1666)
    at cljs.analyzer$analyze_deps.invoke(analyzer.cljc:1651)
    at cljs.analyzer$ns_side_effects.invokeStatic(analyzer.cljc:2504)
    at cljs.analyzer$ns_side_effects.invoke(analyzer.cljc:2499)
    at cljs.analyzer$analyze_STAR_$fn__1447.invoke(analyzer.cljc:2585)
    at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
    at clojure.core$reduce.invokeStatic(core.clj:6544)
    at clojure.core$reduce.invoke(core.clj:6527)
    at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:2585)
    at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:2575)
    at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:2600)
    at cljs.analyzer$analyze.invoke(analyzer.cljc:2587)
    at cljs.analyzer$analyze_file$fn__1498.invoke(analyzer.cljc:2844)
    at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:2839)
    at cljs.analyzer$analyze_file.invoke(analyzer.cljc:2805)
    at cljs.analyzer$analyze_deps.invokeStatic(analyzer.cljc:1666)
    at cljs.analyzer$analyze_deps.invoke(analyzer.cljc:1651)
    at cljs.analyzer$ns_side_effects.invokeStatic(analyzer.cljc:2504)
    at cljs.analyzer$ns_side_effects.invoke(analyzer.cljc:2499)
    at cljs.analyzer$analyze_STAR_$fn__1447.invoke(analyzer.cljc:2585)
    at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
    at clojure.core$reduce.invokeStatic(core.clj:6544)
    at clojure.core$reduce.invoke(core.clj:6527)
    at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:2585)
    at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:2575)
    at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:2600)
    at cljs.analyzer$analyze.invoke(analyzer.cljc:2587)
    at cljs.compiler$compile_file_STAR_$fn__2654.invoke(compiler.cljc:1218)
    at cljs.compiler$with_core_cljs.invokeStatic(compiler.cljc:1146)
    at cljs.compiler$with_core_cljs.invoke(compiler.cljc:1137)
    at cljs.compiler$compile_file_STAR_.invokeStatic(compiler.cljc:1169)
    at cljs.compiler$compile_file_STAR_.invoke(compiler.cljc:1165)
    at cljs.compiler$compile_file$fn__2695.invoke(compiler.cljc:1330)
    ... 60 more
Subprocess failed

And here is my project.clj

(defproject cmd-server "0.1.11-SNAPSHOT"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.8.0"]
                 [flake "0.4.2"]
                 [selmer "0.9.3"]
                 [org.clojure/core.async "0.2.374"]
                 [cassc/clj-props "0.1.2"]
                 [org.clojars.august/sparrows "0.2.5" :exclusions [clj-http]]
                 [com.taoensso/timbre "4.4.0"]
                 [com.taoensso/nippy "2.12.1"]
                 [org.clojure/tools.reader "1.0.0-beta1"]
                 [ring/ring-defaults "0.2.0"]
                 ;; [ring "1.5.0"]
                 [lib-noir "0.9.9" :exclusions [[ring/ring-defaults]]]
                 [ring/ring-json "0.4.0"] ;; handling json-body request
                 [ring/ring-defaults "0.2.0"] ;; supports auto set utf8 encoding in content-type
                 [compojure "1.4.0" :exclusions [org.clojure/tools.reader]]
                 [gloss "0.2.5" :exclusions [potemkin manifold]]
                 [cheshire "5.6.3"]
                 [aleph "0.4.1-beta2"]
                 [bowerick "1.99.6" :exclusions [com.taoensso/nippy]]
                 [com.taoensso/encore "2.59.0"]
                 [com.taoensso/sente "1.9.0-RC1"]

                 [me.raynes/conch "0.8.0"]
                 [environ "1.0.1"]

                 ;; cljs
                 [org.clojure/clojurescript "1.7.145"] ;;1.7.170
                 [figwheel "0.5.0-20151109.200732-4"] ;; 0.4.1 0.5.0-20151109.200732-4 0.5.0-SNAPSHOT
                 [reagent "0.5.1"]
                 [reagent-forms "0.5.12"]
                 [reagent-utils "0.1.5"]
                 [alandipert/storage-atom "1.2.4" ]
                 [secretary "1.2.3"]]
  :plugins [[lein-cljsbuild "1.1.1"]
            [lein-figwheel "0.5.0-20151109.200827-6" :exclusions [cider/cider-nrepl]]]
  :cljsbuild {:builds {:app {
                             :figwheel true
                             :source-paths ["src-cljs"]
                             :compiler {:output-to "resources/public/cljs/cmd.js"
                                        :output-dir "resources/public/cljs/out"
                                        :optimizations :none
                                        :cache-analysis true
                                        :source-map-timestamp true
                                        :source-map "resources/public/cljs/cmd.js.map"}}}}
  :clean-targets ^{:protect false} [:target-path "target" "resources/public/cljs" "out" "resources/public/prod"]
  :profiles {:dev {:env {:dev true}
                   :dependencies [[com.cemerick/piggieback "0.2.1"]
                                  [figwheel-sidecar "0.5.2"]]
                   :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}
                   :source-paths ["src-cljs" "dev" "src-dev"]}
             :uberjar {:omit-source true
                       :env {:production true}
                       :aot [cmd-server.core]
                       :hooks [leiningen.cljsbuild]
                       :cljsbuild
                       {:builds {:app
                                 {:source-map false
                                  :figwheel false
                                  :source-paths ["src-cljs"]
                                  :compiler {:output-to "resources/public/cljs/cmd.js"
                                             :output-dir "resources/public/cljs/prod"
                                             :optimizations :advanced ;; :whitespace
                                             :pretty-print false
                                             ;;:externs ^:replace ["externs/jquery-1.9.js" "externs/hljs.js"]
                                             }}}}}}
  :javac-options ["-target" "1.8" "-source" "1.8"]
  :main cmd-server.core)

Hi,

thanks a lot for your feedback,

The important clue seems to be this line:
Caused by: clojure.lang.ExceptionInfo: Referred macro taoensso.truss.impl/catch-errors* does not exist {:tag :cljs/analysis-error}

Looking at your project.clj, I see that you put "com.taoensso/nippy" in the exclusions for bowerick:
[bowerick "1.99.6" :exclusions [com.taoensso/nippy]]

However, according to the above error, there still appears to be a version mismatch with the transitive dependency "taoensso.truss.impl".

I just double checked, and "taoensso.truss.impl" is pulled in via the dependency chain:
com.taoensso/nippy -> com.taoensso/encore -> taoensso.truss.impl

You could try to update the exclusions accordingly.
However, I am not sure if this will cause other problems.
Another option to solve the problem could be to update all taoensso.* dependencies to their latest available versions.

By the way: I also just updated bowricks nippy dependency to the latest version and uploaded bowerick version 1.99.7.

I hope that this helps to solve your issue.

Cheers,

Ruediger

cassc commented

Thanks!

I tried to update all taoensso.* dependencies and it still threw strange errors.

The problem is gone when I add truss dependency explicitly to my project.clj:

[com.taoensso/truss "1.3.6"]