Fork me on GitHub
#shadow-cljs
<
2020-10-06
>
jhacks14:10:17

Is there a config setting in shadow-cljs for preventing hot reloading of code when there is a compilation error? I was watching this figwheel presentation https://youtu.be/j-kj2qwJa_E?t=1164 (linked to time in video) where Bruce Hauman shows figwheel not loading the code after a compilation error. I didn’t see anything in the shadow-cljs guide that directly mentions this (although I could have missed it), but at the end of this article: https://code.thheller.com/blog/shadow-cljs/2019/08/25/hot-reload-in-clojurescript.html Thomas writes: > Note that an exception during the load of a namespace process may break hot-reload entirely. Avoid running code as much as possible and instead use the `^:dev/after-load` hooks when needed. Maybe that’s the intended way to deal with compilation errors in shadow-cljs?

victorb15:10:31

There is an *:ignore-warnings`*` option in shadow-cljs that defaults to false. shadow-cljs should already avoid compiling when there is warnings, but you can set :ignore-warnings to true to compile anyways (which might lead to breakage). I know you mentioned compilation errors, but I do think Bruce talks about compilation warnings, not errors

jhacks15:10:39

Ahh, thanks @UEJ5FMR6K! Also, you’re absolutely right, in the video Bruce talks about warnings, not errors. Sorry for the mixup.

❤️ 3
souenzzo18:10:00

There is some shadow-cljs tools that acts like warn-on-reflection ? I mean, to be "super safe" about to access .-props

thheller19:10:09

no such thing as "reflection" in JS