Anyway to disable/ignore unreachable code
warnings when releasing? Seems it is not coming from cljs.analyzer/*cljs-warnings*
as for example :warnings-as-errors true
has no effect on it ๐
not sure, maybe :compiler-options {:closure-warnings {:unreachable-code :off}}
?
the warning is from the closure compiler, not the cljs compiler
thanks, indeed it seems so.. however when I try it, I get the following when releasing:
[:front] Compiling ...
{:type :shadow.build.closure/invalid-closure-warning, :key :check-useless-code, :level :off, :shadow.build.log/level :warn}
and the warning is still printed :thinking_face:
build release config is:
:release {:compiler-options
{:warnings-as-errors true
:closure-warnings {:check-useless-code :off}}}
At least the ClojureScript docs says that :check-useless-code
should be available. Hmm..this is with :lein true
and [thheller/shadow-cljs "2.14.1"]
& [org.clojure/clojurescript "1.10.866"]
, i will check the sources tomorrow unless you donโt have any idea from the top of your head, thx :thumbsup:
the docs may be out of date. the closure compiler changes the names of those things constantly.
might just be :useless-code
or :uselessCode
๐:skin-tone-2: anyone have experience evaluating clojurescript code in the browser within a shadow-cljs project? https://yogthos.net/posts/2015-11-12-ClojureScript-Eval.html Iโm following this example but it looks like (empty-state)
is missing cljs.core because when I eval (+ 1 1)
I get
WARNING: Use of undeclared Var cljs.user/+ at line 1
but when I clone the repo used in the example (which uses figwheel) itโs working, so just wondering if there is some compiler setting I might needthank you, I found how you used (DiagnosticGroups/getRegisteredGroups)
and found from there that it is nowadays "uselessCode" -> :useless-code
update, Iโm reading here https://code.thheller.com/blog/shadow-cljs/2017/10/14/bootstrap-support.html
stealing from here https://github.com/mhuebert/shadow-bootstrap-example