boot-clj / boot-figreload

Boot task providing live-reload using Fighweel client
Eclipse Public License 1.0
49 stars 1 forks source link

Unable to resolve var #17

Open DonyorM opened 6 years ago

DonyorM commented 6 years ago

I'm currently getting the following error when trying to run boot-figreload:

java.lang.RuntimeException: Unable to resolve var: figwheel-sidecar.build-middleware.injection/figwheel-connect-ns-name in this context
clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Unable to resolve var: figwheel-sidecar.build-middleware.injection/figwheel-connect-ns-name in this context, compiling:(powerlaces/boot_figreload/figwheel.clj:25:3)
             clojure.lang.ExceptionInfo: java.lang.RuntimeException: Unable to resolve var: figwheel-sidecar.build-middleware.injection/figwheel-connect-ns-name in this context, compiling:(powerlaces/boot_figreload/figwheel.clj:25:3)

Here's the task that runs when this issue is caused:

(deftask figwheel
  "Runs figwheel and enables reloading."
  []
  (dev)
  (require '[powerlaces.boot-figreload :refer [reload]])
  (let [reload (resolve 'powerlaces.boot-figreload/reload)]
    (comp
     (start-server)
     (watch)
     (reload :client-opts {:debug true})
     (cljs-repl)
     (cljs))))
arichiardi commented 6 years ago

Hi! Figwheel is tested against the version specified in the README and fortunately I haven't had time for upgrading it. Can it be a version issue?

DonyorM commented 6 years ago

Hey thanks for answering! I'm depending on figwheel-sidecar 0.5.15-SNAPSHOT which seems to be what figreload wants. It's not actually specified in the README, I can only see it in the commit log, FYI.

I check boot show -d and the output for figwheel-sidecar is a little weird:

[figwheel-sidecar "0.5.15-20180224.195519-22"]
??? [com.stuartsierra/component "0.3.2"]
?   ??? [com.stuartsierra/dependency "0.2.0"]
??? [figwheel "0.5.15-20180224.195458-12" :exclusions [[org.clojure/tools.reader]]]
??? [hawk "0.2.11" :exclusions [[org.clojure/clojure]]]
?   ??? [net.incongru.watchservice/barbary-watchservice "1.0"]
?       ??? [net.java.dev.jna/jna "3.2.2"]

Is that what you expected?

EDIT: I tried removing the figwheel-sidecar direct dependency from my build.boot, I realized it wasn't needed, and had the same error.

arichiardi commented 6 years ago

Sorry, it should be clearer in the README, but the boot-figreload version follows the supported figwheel one, so in this case we support 0.5.14.

DonyorM commented 6 years ago

Same error when I specify 0.5.14.

Fig-reload seems to use 0.5.15 (https://github.com/boot-clj/boot-figreload/commit/beabdd05a936e09c862fed6ff155ece7ed03543e#diff-0a1425bd66240468daf4c256a411ce75R1). Any chance that's the issue?

arichiardi commented 6 years ago

Ah, yes well, I was still kind of working on that, this is why it is still -SNAPSHOT. For sure that is the problem...