lein-figwheel

zak 2017-02-08T09:46:12.000573Z

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

Aron 2017-02-08T15:20:39.000581Z

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

Aron 2017-02-08T15:20:45.000582Z

it's becoming really annoying

Aron 2017-02-08T15:20:50.000583Z

that i can't trust it

Aron 2017-02-08T15:20:56.000584Z

like i remove half the code

Aron 2017-02-08T15:21:18.000585Z

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

Aron 2017-02-08T15:23:40.000586Z

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

isak 2017-02-08T15:49:38.000587Z

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

isak 2017-02-08T15:50:18.000588Z

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

Aron 2017-02-08T16:05:03.000592Z

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

Aron 2017-02-08T16:05:19.000593Z

i am not talking about live reloading

Aron 2017-02-08T16:05:34.000594Z

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

Aron 2017-02-08T16:05:45.000595Z

and it was still showing me code that i removed

Aron 2017-02-08T16:05:52.000596Z

that should never ever happen normally

isak 2017-02-08T16:11:11.000597Z

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

isak 2017-02-08T16:12:43.000598Z

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

Aron 2017-02-08T16:16:24.000601Z

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

isak 2017-02-08T16:17:35.000603Z

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

Aron 2017-02-08T16:18:08.000604Z

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

Aron 2017-02-08T16:18:23.000605Z

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

Aron 2017-02-08T16:18:37.000606Z

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

isak 2017-02-08T16:18:46.000607Z

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

Aron 2017-02-08T16:18:52.000608Z

yeah 🙂

danielcompton 2017-02-08T22:26:47.000615Z

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