lein-figwheel

2018-10-07T11:29:28.000100Z

@bhauman The :ring-handler option works great! Just one (minor) issue for me: for some reason when I try to compile server-side stuff (.clj), the cljs compiler gets triggered (and complains), even though I have put only [src/cljc, src/cljs] inside cljs build-paths. The server-side clj compiler still works and the changes get applied, but I wonder why cljs gets triggered? Thank you for any comment.. (ns ... (:require ... [org.httpkit.client :as http])) .... <COMPILE ERROR> 2. Unhandled clojure.lang.ExceptionInfo failed compiling file:/Users/me/my-app/src/clj/my_app/handler.clj … core.clj: 4739 clojure.core/ex-info core.clj: 4739 clojure.core/ex-info compiler.cljc: 1562 … closure.clj: 573 cljs.closure/compile-file closure.clj: 564 cljs.closure/compile-file … repl.cljc: 586 cljs.repl$load_file$fn__6378/invoke piggieback.clj: 170 cider.piggieback/do-eval … piggieback.clj: 217 cider.piggieback/load-file … 1. Caused by clojure.lang.ExceptionInfo No such namespace: org.httpkit.client, could not locate org/httpkit/client.cljs, org/httpkit/client.cljc, or JavaScript source providing “org.httpkit.client” in file /Users/me/my-app/src/clj/my_app/handler.clj {:tag :cljs/analysis-error} … core.clj: 652 clojure.core/apply repl.cljc: 724 cljs.repl$wrap_self$g__6408/invoke piggieback.clj: 170 cider.piggieback/do-eval piggieback.clj: 155 cider.piggieback/do-eval … piggieback.clj: 224 cider.piggieback/wrap-cljs-repl/fn/fn/fn

bhauman 2018-10-07T11:45:26.000100Z

@kingcode you mean when you try to save .clj files?

2018-10-07T11:52:45.000100Z

@bhauman No, only when I try to compile the handler.clj - saving doesn’t do anything..

2018-10-07T11:53:05.000100Z

It is looking for the library inside my src dir…

2018-10-07T11:53:23.000100Z

See middle of error msgg

2018-10-07T11:56:17.000100Z

“No such namespace: org.httpkit.client, could not locate org/httpkit/client.cljs, org/httpkit/client.cljc, or JavaScript source providing “org.httpkit.client” in file /Users/me/my-app/src/clj/my_app/handler.clj”

2018-10-07T11:58:31.000100Z

@bhauman I should add that other external libs (ring, compojure) don’t cause that issue, only when I added http-kit, and used that clause…

2018-10-07T12:01:43.000100Z

@bhauman sorry, I take that back! The cljs repl complains whenever I try to compile <any> of my own src .clj files

2018-10-07T12:02:40.000100Z

It’s not a big deal - I can still do work, but it is an annoyance perhaps others have experienced? Thanks again for a great tool.

bhauman 2018-10-07T12:07:57.000100Z

@kingcode when you say compile what do you mean?

bhauman 2018-10-07T12:08:22.000100Z

compile from the editor, calling compile in clojure REPL?

2018-10-07T12:09:20.000100Z

@bhauman When I compile a src .clj file from within the source itself within Cider (C-c C-k)

2018-10-07T12:11:06.000100Z

Saving within .cljs file works great - only issue is with .clj when compiling only

2018-10-07T12:11:45.000100Z

This could be a Cider issue?

bhauman 2018-10-07T12:12:13.000100Z

OK C-c C-k loads and evals the current file

2018-10-07T12:12:27.000100Z

Ok…

bhauman 2018-10-07T12:12:48.000200Z

is figwheel doing anything when you load the file?

bhauman 2018-10-07T12:13:29.000100Z

because its sounds like you are getting a Clojure error when you load the file

bhauman 2018-10-07T12:13:43.000200Z

which has nothing to do with figwheel

2018-10-07T12:15:17.000100Z

No, when I start clj and cljs repls at once, everything works fine since the file was compiled (albeith with cljs errors) during the last repl session

2018-10-07T12:15:41.000100Z

Hmm..let me look at figwheel log..

bhauman 2018-10-07T12:16:26.000100Z

@kingcode yeah this isn’t figwheel, this is a Clojure error

bhauman 2018-10-07T12:17:06.000100Z

either httpkit isn’t on your classpath or something else is wrong

bhauman 2018-10-07T12:17:39.000100Z

figwheel only responds to files that are saved

2018-10-07T12:17:39.000200Z

Something strange happened….I deleted the figwheel server log during the session, and the issue disappeared!?

bhauman 2018-10-07T12:18:07.000100Z

it simply sounds like a environmental state problem

bhauman 2018-10-07T12:18:31.000100Z

this can certainly happen when you are working in the REPL

2018-10-07T12:18:45.000100Z

OK….sorry for taking your time…much appreciate!

bhauman 2018-10-07T12:18:51.000100Z

no worries