Coder Social home page Coder Social logo

boot-clj / boot-figreload Goto Github PK

View Code? Open in Web Editor NEW
48.0 12.0 1.0 194 KB

Boot task providing live-reload using Fighweel client

License: Eclipse Public License 1.0

Clojure 99.49% Shell 0.51%
figwheel boot clojurescript clojure hot-reload livereload javascript boot-tasks

boot-figreload's Introduction

boot-figreload

Clojars Project

Boot task to automatically reload resources in the browser when files in the project change. Featuring lein-figwheel.

  • Provides the reload task
  • Reload client can show warnings and exceptions from ClojureScript build on heads-up display.
    • Requires adzerk/boot-cljs >= 2.0.0

Usage

Add dependency to build.boot and require the task:

(set-env! :dependencies '[[adzerk/boot-cljs "LATEST" :scope "test"]
                          [powerlaces/boot-figreload "LATEST" :scope "test"]
                          [pandeiro/boot-http "0.7.6" :scope "test"]

                          [adzerk/boot-cljs-repl "0.3.3" :scope "test"]
                          [com.cemerick/piggieback "0.2.1"  :scope "test"]
                          [weasel "0.7.0"  :scope "test"]
                          [org.clojure/tools.nrepl "0.2.12" :scope "test"]])

(require '[adzerk.boot-cljs          :refer [cljs]]
         '[adzerk.boot-cljs-repl     :refer [cljs-repl]]
         '[powerlaces.boot-figreload :refer [reload]]
         '[pandeiro.boot-http        :refer [serve]])

Add the task to your development pipeline before (cljs ...):

(deftask dev []
  (comp (serve)
        (watch)
        (reload)
        (cljs-repl)
        (cljs :source-map true
              :optimizations :none)))

Dirac

Boot-figreload is compatible with Dirac, enabling REPL evaluation in-browser on top of Figwheel's reloading.

Your dev task could therefore become:

(set-env! :dependencies '[[adzerk/boot-cljs "LATEST" :scope "test"]
                          [powerlaces/boot-figreload "LATEST" :scope "test"]
                          [pandeiro/boot-http "0.7.6" :scope "test"]

                          ;; Dirac and cljs-devtoos
                          [binaryage/dirac "RELEASE" :scope "test"]
                          [binaryage/devtools "RELEASE" :scope "test"]
                          [powerlaces/boot-cljs-devtools "0.2.0" :scope "test"]

                          [adzerk/boot-cljs-repl "0.3.3" :scope "test"]
                          [com.cemerick/piggieback "0.2.1"  :scope "test"]
                          [weasel "0.7.0"  :scope "test"]

                          ;; Has to be `0.2.13`
                          [org.clojure/tools.nrepl "0.2.13" :scope "test"]])

(require '[adzerk.boot-cljs              :refer [cljs]]
         '[adzerk.boot-cljs-repl         :refer [cljs-repl]]
         '[powerlaces.boot-figreload     :refer [reload]]
         '[powerlaces.boot-cljs-devtools :refer [dirac cljs-devtools]]
         '[pandeiro.boot-http            :refer [serve]])

...

(deftask dev [D with-dirac bool "Enable Dirac Devtools."]
  (comp (serve)
        (watch)
        (cljs-devtools)
        (reload)
        (if-not with-dirac
          (cljs-repl)
          (dirac))
        (cljs :source-map true
              :optimizations :none
              :compiler-options {:external-config
                                 {:devtools/config {:features-to-install [:formatters :hints]
                                                    :fn-symbol "λ"
                                                    :print-config-overrides true}}})))

Node.js

It should work out of the box. Two things to be aware of:

  • you need to have a main.cljs.edn like:

    {:compiler-options {:target :nodejs}
     :init-fns [server.core/main]}
  • you need to launch your built artifact using node:

    $ cd target
    $ node main.js

Figwheel Integration Status

Ok this is a super alpha of the figwheel client in boot-reload.

At the moment the implemented server to client messages are:

  • :files-changed
  • :compile-warning
  • :compile-failed
  • :css-files-changed

Whereas the implemented client to server messages are:

  • "file-selected"
  • "callback"

Other tasks to complete:

  • Inject the Figwheel bootstrap script
  • Handle individual js-onload per build id (untested but there)
  • Figwheel version
  • Use Figwheel init code (?)
  • Handle boot-reload's :asset-host in Figwheel (link to comments)
  • Pass the right :open-file option to Figwheel
  • Solve the "first message lost" problem with a message queue (?)
  • Assert needed dependencies
  • Repl integration (at the moment supported via boot-cljs-repl)

To be thorougly tested:

  • Node client
  • Web-worker client
  • Trigger of multiple js-onloads

Additional Info

You can see the options available on the command line:

boot reload --help

or in the REPL:

boot.user=> (doc reload)

Examples

For an up-to-date demo project check figreload-demo.

Legacy examples of how to use reload in development can be useful as well. See Boot templates and example projects in the ClojureScript wiki.

License

Copyright © 2014 Adzerk
Copyright © 2015-2016 Juho Teperi
Copyright © 2017 Juho Teperi and Andrea Richiardi

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

boot-figreload's People

Contributors

alandipert avatar alesya-h avatar anmonteiro avatar arichiardi avatar bhagany avatar deraen avatar empperi avatar jobez avatar kommen avatar manicolosi avatar martinklepsch avatar micha avatar mitchelkuijpers avatar myguidingstar avatar pandeiro avatar pesterhazy avatar piranha avatar regularfellow avatar samroberton avatar schmir avatar skammer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

nextjournal

boot-figreload's Issues

newly added files cause IllegalArgumentException

It's (hopefully) easy to reproduce - just try to create a new file having boot-figreload task running. It ends up with following exception:

java.lang.IllegalArgumentException:
/Users/michal/.boot/cache/tmp/Users/michal/workspace/clojure/demo/1g9l/-of1h48/scripts/foo.js is not a relative path

IllegalArgumentException on code change

I just dropped in boot-figreload instead of boot-reload into my existing project.

But after every code change I get an IllegalArgumentException and the code is not reloaded.

Full stack trace:

                                                                java.lang.Thread.run                  Thread.java:  745
                                   java.util.concurrent.ThreadPoolExecutor$Worker.run      ThreadPoolExecutor.java:  617
                                    java.util.concurrent.ThreadPoolExecutor.runWorker      ThreadPoolExecutor.java: 1142
                                                  java.util.concurrent.FutureTask.run              FutureTask.java:  266
                                                                                  ...                                   
                                                  clojure.core/binding-conveyor-fn/fn                     core.clj: 2020
                                                                    boot.core/boot/fn                     core.clj: 1029
                                                                  boot.core/run-tasks                     core.clj: 1019
                                                 pandeiro.boot-http/eval1079/fn/fn/fn                boot_http.clj:  110
                                                       boot.task.built-in/fn/fn/fn/fn                 built_in.clj:  427
                                                    boot.task.built-in/fn/fn/fn/fn/fn                 built_in.clj:  430
                                                 boot.task.built-in/fn/fn/fn/fn/fn/fn                 built_in.clj:  430
                                      powerlaces.boot-cljs-devtools/eval1645/fn/fn/fn       boot_cljs_devtools.clj:   63
                                           powerlaces.boot-figreload/eval534/fn/fn/fn           boot_figreload.clj:  232
                                              powerlaces.boot-figreload/send-changed!           boot_figreload.clj:   62
                                                                    boot.pod/call-in*                      pod.clj:  413
                                                                                  ...                                   
                          org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke  ClojureRuntimeShimImpl.java:  102
                          org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke  ClojureRuntimeShimImpl.java:  109
                                                                                  ...                                   
                                                                    boot.pod/call-in*                      pod.clj:  410
                                                                boot.pod/eval-fn-call                      pod.clj:  359
                                                                   clojure.core/apply                     core.clj:  657
                                                                                  ...                                   
                                       powerlaces.boot-figreload.server/send-changed!                   server.clj:   61
                                                                    clojure.core/mapv                     core.clj: 6779
                                                                  clojure.core/reduce                     core.clj: 6704
                                                          clojure.core.protocols/fn/G                protocols.clj:   13
                                                            clojure.core.protocols/fn                protocols.clj:   75
                                                    clojure.core.protocols/seq-reduce                protocols.clj:   24
                                                                     clojure.core/seq                     core.clj:  137
                                                                                  ...                                   
                                                                  clojure.core/map/fn                     core.clj: 2728
                                                              clojure.core/partial/fn                     core.clj: 2597
                                                                                  ...                                   
                                      powerlaces.boot-figreload.figwheel/eval15809/fn                 figwheel.clj:  108
                                                                    clojure.core/mapv                     core.clj: 6779
                                                                  clojure.core/reduce                     core.clj: 6703
                                                                                  ...                                   
                                                                 clojure.core/mapv/fn                     core.clj: 6788
                                   powerlaces.boot-figreload.figwheel/sendable-js-map                 figwheel.clj:   86
                                   powerlaces.boot-figreload.figwheel/guess-namespace                 figwheel.clj:   67
           figwheel-sidecar.build-middleware.javascript-reloading/js-file->namespaces     javascript_reloading.clj:   39
                figwheel-sidecar.build-middleware.javascript-reloading/best-try-js-ns     javascript_reloading.clj:   34
 figwheel-sidecar.build-middleware.javascript-reloading/cljs-target-file-from-foreign     javascript_reloading.clj:   15
                                                                 clojure.java.io/file                       io.clj:  426
                                                     clojure.java.io/as-relative-path                       io.clj:  414
 java.lang.IllegalArgumentException: /build/boot_home/cache/tmp/editor/apps/journal/5/-ueasqk/js/editor.out/cljs_deps.js is not a relative path

Any more information I can provide you to help?

ClassCastException thrown by boot-figreload

Currently my code is throwing the following error when running the command boot -vv figwheel:

java.lang.ClassCastException: clojure.lang.Symbol cannot be cast to java.lang.String
	at java.lang.String.compareTo(String.java:111)
	at clojure.lang.Util.compare(Util.java:153)
	at clojure.lang.RT$DefaultComparator.compare(RT.java:280)
	at clojure.lang.PersistentTreeMap.doCompare(PersistentTreeMap.java:311)
	at clojure.lang.PersistentTreeMap.entryAt(PersistentTreeMap.java:298)
	at clojure.lang.PersistentTreeMap.containsKey(PersistentTreeMap.java:94)
	at clojure.lang.APersistentSet.contains(APersistentSet.java:34)
	at clojure.lang.PersistentTreeSet.cons(PersistentTreeSet.java:52)
	at clojure.lang.PersistentTreeSet.cons(PersistentTreeSet.java:17)
	at clojure.lang.RT.conj(RT.java:652)
	at clojure.core$conj__4345.invokeStatic(core.clj:85)
	at clojure.core$conj__4345.invoke(core.clj:82)
	at adzerk.boot_cljs.middleware$main.invokeStatic(middleware.clj:76)
	at adzerk.boot_cljs.middleware$main.invoke(middleware.clj:52)
	at adzerk.boot_cljs$compile_1.invokeStatic(boot_cljs.clj:154)
	at adzerk.boot_cljs$compile_1.invoke(boot_cljs.clj:141)
	at adzerk.boot_cljs$eval813$fn__814$fn__819$fn__820$fn__821.invoke(boot_cljs.clj:276)
	at clojure.core$map$fn__4785.invoke(core.clj:2646)
	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 adzerk.boot_cljs$eval813$fn__814$fn__819$fn__820.invoke(boot_cljs.clj:274)
	at adzerk.boot_cljs$eval758$fn__759$fn__764$fn__765.invoke(boot_cljs.clj:174)
	at adzerk.boot_cljs_repl$eval916$fn__917$fn__926$fn__927.invoke(boot_cljs_repl.clj:187)
	at boot.task.built_in$fn__2414$fn__2415$fn__2432$fn__2433.invoke(built_in.clj:479)
	at boot.task.built_in$fn__2414$fn__2415$fn__2424$fn__2425.invoke(built_in.clj:477)
	at powerlaces.boot_figreload$eval1336$fn__1337$fn__1346$fn__1347$fn__1354.invoke(boot_figreload.clj:222)
	at powerlaces.boot_figreload$eval1336$fn__1337$fn__1346$fn__1347.invoke(boot_figreload.clj:221)
	at boot.task.built_in$fn__2345$fn__2346$fn__2351$fn__2352$fn__2370$fn__2371.invoke(built_in.clj:430)
	at boot.task.built_in$fn__2345$fn__2346$fn__2351$fn__2352$fn__2370.invoke(built_in.clj:430)
	at boot.task.built_in$fn__2345$fn__2346$fn__2351$fn__2352.invoke(built_in.clj:427)
	at boot.core$run_tasks.invoke(core.clj:1019)
	at boot.core$boot$fn__918.invoke(core.clj:1029)
	at clojure.core$binding_conveyor_fn$fn__4676.invoke(core.clj:1938)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

This is the figwheel task:

(deftask figwheel
  "Runs figwheel and enables reloading."
  []
  (dev)
  (require '[powerlaces.boot-figreload :refer [reload]]
           '[pandeiro.boot-http :refer [serve]])
  (let [reload (resolve 'powerlaces.boot-figreload/reload)
        serve (resolve 'pandeiro.boot-http/serve)]
    (comp
     (watch)
     (reload :client-opts {:debug true})
     (cljs-repl)
     (cljs)
     )))

This occurs after boot outputs "Compiling ClojureScript". I do not see this error if I run boot cljs or boot cljs-repl without the figwheel setup.

You can see my full build.boot file here.

My main.cljs.edn file is:

{:require [test.core]
 :compiler-options {:main "test.app",
                    :asset-path "/js/out",
                    :output-to "target/cljsbuild/public/js/app.js",
                    :output-dir "target/cljsbuild/public/js/out",
                    :source-map true,
                    :optimizations :none,
                    :pretty-print true}}

Unable to resolve var

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))))

Release versioning

Hello folks!

I am opening this issue in order to understand what is the best course of action for releasing boot-figreload now that it seems kind of time for getting rid of -SNAPSHOT.

The thing is, I was thinking of releasing following lein-figwheel stable versions, because being figwheel a huge project there might be things that work in a stable version and don't work in some other stable version. If we tie boot-figreload and lein-figwheel the version makes clear what we are running.

Objections? Better ideas?

I have already tried 0.5.11 and it works very well so I might as well start from that one, bumping this accordingly.

/cc @kommen @mbuczko and everyone interested

Thanks!

Read preload ns from resources for fixing 0.5.15

The latest lein-figwheel 0.5.15 takes away a couple of functions that were used to build up the bootstrapping/connection scripts and namespaces.

The new version would need to come up with a way to read the scripts themselves using io/resource.

Assert failure on incremental build.

I'm invoking the reload task like so.

(reload :asset-path "/public"
           :port 33887
           :ws-host   "localhost"
           :on-jsload 'arc.combined/run
           :client-opts {:debug true})

Initial compile seems to work fine, but incremental builds result in this stack trace.

java.lang.AssertionError: Assert failed: The compiler options :asset-path cannot be nil. This might be a bug.
                          (:asset-path compile-opts)
powerlaces.boot-figreload.messages/file-map-matches?/invokeStatic                     messages.clj:   11
             powerlaces.boot-figreload.messages/file-map-matches?                     messages.clj:    9
                                          clojure.core/partial/fn                         core.clj: 2515
                                           clojure.core/filter/fn                         core.clj: 2708
                                                              ...                                       
                                  clojure.core/first/invokeStatic                         core.clj:   55
                                               clojure.core/first                         core.clj:   55
           powerlaces.boot-figreload.messages/assign-cljs-opts/fn                     messages.clj:   24
                                             clojure.core/mapv/fn                         core.clj: 6627
                  clojure.core.protocols/iter-reduce/invokeStatic                    protocols.clj:   49
                           clojure.core.protocols/fn/invokeStatic                    protocols.clj:   75
                                        clojure.core.protocols/fn                    protocols.clj:   75
                                      clojure.core.protocols/fn/G                    protocols.clj:   13
                                 clojure.core/reduce/invokeStatic                         core.clj: 6545
                                   clojure.core/mapv/invokeStatic                         core.clj: 6618
                                                clojure.core/mapv                         core.clj: 6618
 powerlaces.boot-figreload.messages/assign-cljs-opts/invokeStatic                     messages.clj:   24
              powerlaces.boot-figreload.messages/assign-cljs-opts                     messages.clj:   15
                                          clojure.core/partial/fn                         core.clj: 2516
 powerlaces.boot-figreload.messages/changed-messages/invokeStatic                     messages.clj:   58
              powerlaces.boot-figreload.messages/changed-messages                     messages.clj:   51
      powerlaces.boot-figreload.server/send-changed!/invokeStatic                       server.clj:   60
                   powerlaces.boot-figreload.server/send-changed!                       server.clj:   53

Null Pointer Exception

I'm trying to run a project with boot-figreload, and getting a fairly cryptic error when I run it. Below is the error and here is the build.boot file. Any idea what is causing this?

>boot -vv figwheel
....
clojure.lang.ExceptionInfo: null {:line 146}
	at clojure.core$ex_info.invokeStatic(core.clj:4617)
	at clojure.core$ex_info.invoke(core.clj:4617)
	at boot.main$_main$fn__1201.invoke(main.clj:222)
	at boot.main$_main.invoke(main.clj:216)
	at clojure.lang.Var.invoke(Var.java:394)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:159)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:150)
	at boot.App.runBoot(App.java:399)
	at boot.App.main(App.java:491)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at Boot.main(Boot.java:258)
Caused by: java.lang.NullPointerException
	at clojure.core$apply.invokeStatic(core.clj:646)
	at clojure.core$apply.invoke(core.clj:641)
	at boot.user$eval1302$fn__1303$fn__1308$fn__1309.invoke(Unknown Source)
	at adzerk.boot_cljs$eval1001$fn__1002$fn__1007$fn__1008.invoke(boot_cljs.clj:250)
	at adzerk.boot_cljs$eval946$fn__947$fn__952$fn__953.invoke(boot_cljs.clj:169)
	at adzerk.boot_cljs_repl$eval1104$fn__1105$fn__1114$fn__1115.invoke(boot_cljs_repl.clj:187)
	at boot.task.built_in$fn__2136$fn__2137$fn__2154$fn__2155.invoke(built_in.clj:491)
	at boot.task.built_in$fn__2136$fn__2137$fn__2146$fn__2147.invoke(built_in.clj:489)
	at powerlaces.boot_figreload$eval2099$fn__2100$fn__2109$fn__2110$fn__2118.invoke(boot_figreload.clj:221)
	at powerlaces.boot_figreload$eval2099$fn__2100$fn__2109$fn__2110.invoke(boot_figreload.clj:220)
	at boot.core$run_tasks.invoke(core.clj:1021)
	at boot.core$boot$fn__933.invoke(core.clj:1031)
	at clojure.core$binding_conveyor_fn$fn__4676.invoke(core.clj:1938)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Not working with latest figwheel-sidecar

Give the following error if I use [figwheel-sidecar "LATEST"] [powerlaces/boot-figreload "LATEST" :scope "test"]

             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)

It works only with figwheel-sidecar 0.5.14

hoplon + boot-figreload generates invalid edn

Not sure weather this is an issue of hoplon or boot-figreload but since the invalid string in the index.html.edn.cljs is added by boot-figreload I assume it belongs here.

I'm trying to use hoplon with boot-figreload. Hoplon generated an .cljs.edn file which normally lookes something like:

{:require [hoplon.app-pages._index_DOT_html adzerk.boot-reload.index adzerk.boot-cljs-repl]}

Now, with boot-figreload a long invalid namespace is added to the edn:

{:require [hoplon.app-pages._index_DOT_html figwheel.connect./Users/foo/.boot/cache/tmp/Users/foo/Projects/MyProject/ra0/-u2t4ne/index.html.cljs.edn-ef950fab]}

Resulting in an error when I try to compile the cljs:

Writing HTML files...
• index.html
Writing figwheel.connect./Users/foo/.boot/cache/tmp/Users/foo/Projects/MyProject/ra0/-u2t4ne/index.html.cljs.edn-ef950fab namespace to index.html.cljs.edn_ef950fab.cljs...
Adding :require(s) to index.html.cljs.edn...
nREPL server started on port 9009 on host 127.0.0.1 - nrepl://127.0.0.1:9009
Adding :require adzerk.boot-cljs-repl to index.html.cljs.edn...
Compiling ClojureScript...
                              java.lang.Thread.run              Thread.java:  748
java.util.concurrent.ThreadPoolExecutor$Worker.run  ThreadPoolExecutor.java:  617
 java.util.concurrent.ThreadPoolExecutor.runWorker  ThreadPoolExecutor.java: 1142
               java.util.concurrent.FutureTask.run          FutureTask.java:  266
                                               ...
               clojure.core/binding-conveyor-fn/fn                 core.clj: 1938
                                 boot.core/boot/fn                 core.clj: 1029
                               boot.core/run-tasks                 core.clj: 1019
                    boot.task.built-in/fn/fn/fn/fn             built_in.clj:  427
                 boot.task.built-in/fn/fn/fn/fn/fn             built_in.clj:  430
              boot.task.built-in/fn/fn/fn/fn/fn/fn             built_in.clj:  430
              hoplon.boot-hoplon/eval4202/fn/fn/fn          boot_hoplon.clj:  162
       powerlaces.boot-figreload/eval4417/fn/fn/fn       boot_figreload.clj:  221
    powerlaces.boot-figreload/eval4417/fn/fn/fn/fn       boot_figreload.clj:  222
                    boot.task.built-in/fn/fn/fn/fn             built_in.clj:  477
                    boot.task.built-in/fn/fn/fn/fn             built_in.clj:  479
            adzerk.boot-cljs-repl/eval368/fn/fn/fn       boot_cljs_repl.clj:  187
                 adzerk.boot-cljs/eval210/fn/fn/fn            boot_cljs.clj:  174
                 adzerk.boot-cljs/eval265/fn/fn/fn            boot_cljs.clj:  274
                                clojure.core/doall                 core.clj: 3039
                                clojure.core/dorun                 core.clj: 3024
                                  clojure.core/seq                 core.clj:  137
                                               ...
                               clojure.core/map/fn                 core.clj: 2646
              adzerk.boot-cljs/eval265/fn/fn/fn/fn            boot_cljs.clj:  276
                        adzerk.boot-cljs/compile-1            boot_cljs.clj:  152
                 adzerk.boot-cljs/assert-cljs-edn!            boot_cljs.clj:  125
java.lang.AssertionError: Assert failed: Every .cljs.edn :require item should be a symbol referring to a namespace, i.e. symbol should only have a name:
                          [hoplon.app-pages._index_DOT_html figwheel.connect./Users/foo/.boot/cache/tmp/Users/foo/Projects/Prive/MyProject/ra0/-u2t4ne/index.html.cljs.edn-ef950fab adzerk.boot-cljs-repl]
                          (and (every? (fn [v] (and (symbol? v) (not (namespace v)))) (:require main)))

Snipped from build.boot:

(set-env!
  :dependencies
    '[[org.clojure/clojure          "1.9.0-alpha17"]
      [org.clojure/clojurescript    "1.9.671"]
      [hoplon                       "7.0.2"]
      [adzerk/boot-cljs-repl        "0.3.3"     :scope "test"]
      [adzerk/boot-cljs             "2.1.0-SNAPSHOT" :scope "test"]
      [com.cemerick/piggieback      "0.2.2"     :scope "test"]
      [weasel                       "0.7.0"     :scope "test"]
      [powerlaces/boot-figreload    "0.1.1-SNAPSHOT" :scope "test"]])

(require
  '[adzerk.boot-cljs            :refer [cljs]]
  '[adzerk.boot-cljs-repl       :refer [cljs-repl]]
  '[hoplon.boot-hoplon          :refer [hoplon]]
  '[powerlaces.boot-figreload   :refer [reload]])

(deftask run-cljs-dev []
  (comp
    (hoplon)
    (reload)
    (cljs-repl :nrepl-opts {:port 9009})
    (cljs :optimizations :none :source-map true)))

configuration conflict with boot-cljs

To set the path prefix for files output by boot-cljs, they recommend storing the .cljs.edn file in the path where you'd like the files to be output. boot-figreload names the figwheel.connect... namespace according to the :id. If I store the .cljs.edn file at js/dev.cljs.edn, the figwheel namespace becomes figwheel.connect.js/dev. This causes a compilation error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.