bhauman / lein-figwheel

Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding!
Eclipse Public License 1.0
2.88k stars 210 forks source link

Changes picked up too soon by browser? #688

Closed mtruyens closed 6 years ago

mtruyens commented 6 years ago

In my codebase, I perform extensive Spec-checking on the data stored at CLJS-side (as recommended by re-frame).

Lately, I frequently encounter situations (see also the older issue https://github.com/bhauman/lein-figwheel/issues/661) where a change in a CLJS-file causes warnings regarding instance? checks on records (as embedded in a Spec) no longer being met, even though nothing changed in the data compared to the situation before the file reload. Although I have difficulties reproducing this outside my codebase, it seems to usually occur when changing a utilities-namespace that is used by many other namespaces.

Could it be the case that ReactJS/Reagent already picks up the changes advertised to the browser by Figwheel, even when several other files were also changed but are still "waiting in the queue" to be reloaded by the browser? It seems to me that some parts of my application are already being reloaded, even though some other parts are still being waited to be processed by the browser. Or am I misunderstanding how everything interacts?

I'm using Figwheel 5.15 with Chrome.

mtruyens commented 6 years ago

Perhaps submitted too soon. I'm trying to further narrow down the problem, to rule out problems specifically linked to reloading changed definitions of a record.