boot-clj/boot-figreload

IllegalArgumentException on code change

kommen opened this issue · 4 comments

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?

Might be the same as #4, can either you @kommen or @mbuczko provide a reproducible repo? I cannot really reproduce this. You can also fork this.

@arichiardi I tried to reproduce the issue with figreload-demo, but I never was able to trigger it.

I tried adding all the same dependencies as we use in our app, add foreign libs, update ClojureScript(1.9.494) and Clojure (1.9.0-alpha14), add a deps.cljs files with the same compiler options.

I guess I'll have to remove stuff piece by piece from our app to see what triggers it, but I'll have to do this some other time.

One thing to note: the exception is only triggered when there's a client connected to the reload websocket. As soon as the last connection is closed, the exception is no longer raised after changing code.

It seems the same as #2, I should have a repro there so let me try that one first. Thanks a lot for you debugging though!

Closing this in favor of #4