Fork me on GitHub
#figwheel-main
<
2020-08-25
>
curlyfry14:08:20

Hi! I'm reading through this guide: https://figwheel.org/docs/cursive.html and I'm curious why I have to "Select `Use clojure.main in normal JVM process` ". Is nREPL not compatible with figwheel main?

emak20:08:17

I would say, yes it is but as I understand nREPL is not sufficient to get things rolling: https://figwheel.org/docs/editor-integration.html

folcon15:08:14

Anyone using deps.cljs with figwheel-main? I've got it working with my project, but there's some odd interactions when a dependency also has it...

folcon15:08:21

Syntax error (ClassCastException) compiling at (/tmp/form-init13741706945696949699.clj:1:74).
class clojure.lang.PersistentHashSet cannot be cast to class java.lang.Comparable (clojure.lang.PersistentHashSet is in unnamed module of loader 'app'; 
parable is in module java.base of loader 'bootstrap')
removing the deps.cljs file in the dep "fixes" it...

folcon16:09:16

Still trying to debug this... Does anyone know of any way to get figwheel to give more info regarding these syntax errors? I have no idea whatsoever where this cast is happening...

grumplet21:09:49

Not sure why you are using deps.cljs. Do you mean deps.edn?

grumplet15:09:50

@U0JUM502E OK - interesting.

folcon19:09:55

Less that and more just trying to do what reagent did, but I'll be trying that later...

folcon19:09:46

Basically I originally wrote an application using figwheel-main, ended up needing npm libraries and now need to turn part of my application UI into a library while still using it...

Scott Starkey18:08:57

Hi there! I’m new to figwheel-main and trying to teach myself Clojure and Clojurescript with a simple tic-tac-toe game. I’ve got the base game going in Clojure, and now I’m trying to learn Clojurescript by porting it over. I set up figwheel-main using lein, and have been able to load a test table using the logic of the tic-tac-toe game. I’ve successfully declared each of the TRs of my table to have an integer ID which I pass to my logic. I can see the ID being declared in the console! So, some good first steps! I’m now trying to get an :onClick to register a click and perform the function. Strangely, the screen does not seem to update after I pass it the swap! statement… until I actually make my next change of code and save it. Once I do that and flip back, I see the change made! I think this has something to do with “Hot Reloading” but I can’t quite grok what I need to do. (https://figwheel.org/docs/hot_reloading.html) Can someone please point me in the right direction?

grumplet21:08:02

@scotto Difficult to say, but from your description the problem lies in the on-click -> state-update -> render flow rather than in figwheel? Then somehow a reload kicks that flow on so it completes properly? So maybe check that the click function updates the state, and also that a state update gets re-rendered. If using reagent, it’s worth a check that the ratom deref really does take place inside a component render function.

folcon16:09:16

Still trying to debug this... Does anyone know of any way to get figwheel to give more info regarding these syntax errors? I have no idea whatsoever where this cast is happening...