Fork me on GitHub
#lein-figwheel
<
2017-02-08
>
zak09:02:12

Not sure about logging level, but you could throw a (.clear js/console) into whatever you've got running on figwheel's :on-jsload

Aron15:02:39

i find that often it's just easier to close lein with figwheel and start from scratch than try to refresh a hundred times the browser so it maybe updates the code that is running

Aron15:02:45

it's becoming really annoying

Aron15:02:50

that i can't trust it

Aron15:02:56

like i remove half the code

Aron15:02:18

and it still running the old file with the old functions, drawing on the canvas stuff that are no longer present anywhere in the code

Aron15:02:40

"live reload" so live that it won't kill even that is removed

isak15:02:38

@ashnur have you read about the restrictions code-reloading places on your code?

isak15:02:18

even a perfect code reloader could not handle arbitrary mutable code well

Aron16:02:03

@isak thanks, i will re read that, there will be certainly some stuff that will help. However my issue is not about state, but actual running code. If I have some code that is drawing something on a canvas, then I remove that code and restart lein with figwheel, why am I seeing the removed code still drawing stuff on the canvas?

Aron16:02:19

i am not talking about live reloading

Aron16:02:34

i am talking about closing lein entirely, then starting again with clean

Aron16:02:45

and it was still showing me code that i removed

Aron16:02:52

that should never ever happen normally

isak16:02:11

well it depends how it is added. If you add a function foo, then call (js/setTimeout foo 100000), but then remove that function, I'd expect any code reloader to still execute it, right? @ashnur

isak16:02:43

IIRC, figwheel only adds/replaces definitions, doesn't remove

Aron16:02:24

@isak, even after you close leiningen, run lein clean and then you run lein figwheel?

isak16:02:35

@ashnur if the original browser environment is still running, then yea, because it has already been mutated

Aron16:02:08

i refreshed the browser window then the server was down, so it was showing that it can't connect

Aron16:02:23

then when i started it again, it connected and shown the old code

Aron16:02:37

i repeated the process and then it was showing what i expected

isak16:02:46

Ah I see, then that sounds strange, and I don't know

Aron16:02:52

yeah 🙂

danielcompton22:02:47

@ashnur I've seen that too, I suspect it's browser caching related