Fork me on GitHub
#lein-figwheel
<
2018-10-07
>
kingcode11:10:28

@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

bhauman11:10:26

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

kingcode11:10:45

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

kingcode11:10:05

It is looking for the library inside my src dir…

kingcode11:10:23

See middle of error msgg

kingcode11:10:17

“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”

kingcode11:10:31

@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…

kingcode12:10:43

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

kingcode12:10:40

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.

bhauman12:10:57

@kingcode when you say compile what do you mean?

bhauman12:10:22

compile from the editor, calling compile in clojure REPL?

kingcode12:10:20

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

kingcode12:10:06

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

kingcode12:10:45

This could be a Cider issue?

bhauman12:10:13

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

bhauman12:10:48

is figwheel doing anything when you load the file?

bhauman12:10:29

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

bhauman12:10:43

which has nothing to do with figwheel

kingcode12:10:17

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

kingcode12:10:41

Hmm..let me look at figwheel log..

bhauman12:10:26

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

bhauman12:10:06

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

bhauman12:10:39

figwheel only responds to files that are saved

kingcode12:10:39

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

bhauman12:10:07

it simply sounds like a environmental state problem

bhauman12:10:31

this can certainly happen when you are working in the REPL

kingcode12:10:45

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

bhauman12:10:51

no worries