This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-18
Channels
- # announcements (19)
- # babashka (30)
- # beginners (51)
- # biff (12)
- # calva (20)
- # cider (27)
- # clara (20)
- # clj-kondo (19)
- # clojure (128)
- # clojure-canada (1)
- # clojure-dev (5)
- # clojure-europe (29)
- # clojure-nl (1)
- # clojure-norway (48)
- # clojure-uk (5)
- # clojurescript (6)
- # clr (37)
- # core-async (17)
- # cursive (2)
- # data-oriented-programming (2)
- # datahike (1)
- # datomic (5)
- # emacs (22)
- # exercism (1)
- # funcool (17)
- # humbleui (15)
- # jobs (1)
- # malli (44)
- # off-topic (11)
- # podcasts-discuss (1)
- # pomegranate (1)
- # react (1)
- # remote-jobs (1)
- # shadow-cljs (25)
- # tools-build (12)
- # tools-deps (70)
- # xtdb (24)
is there a reason why no compiler warnings are printed when I run npx shadow-cljs release app
but plenty are when I run npx shadow-cljs compile app
?
do you have an example? compile includes preloads and other development stuff, release does not. so if the warnings are in dev-only files they wouldn't show up in release.
The warnings are all of the WARNING #1 - :infer-warning
type, and started showing up as a result of https://github.com/thheller/shadow-cljs/blob/master/CHANGELOG.md#22017---2023-01-04 to shadow-cljs.
We have :compiler-options {:warnings-as-errors true}
set on our :release
but our CI system didn't fail as expected because the warnings are only showing up locally when we run shadow-cljs compile or watch
hmm not sure why they wouldn't show up for release. there is no difference in how that is handled. what happens if you run release locally?
do you have examples for me? maybe the recent changes I did now show some invalid warnings?
If I run the release locally they do not show up either. I'm not sure how easily I can create a reproducible example of this... I'll try some things
can you give an example of a warning? did you maybe just disable the warnings for release builds?
they are all :infer-warning
from reagent/with-let
as per https://github.com/reagent-project/reagent/issues/585
I have reproduced it with a vanilla sandpit shadow-cljs app now, so not to do with our setup.
thanks. figured out why it doesn't show for release. https://github.com/reagent-project/reagent/blob/master/src/reagent/ratom.clj#L59
in release builds *assert*
is bound to false, so the code with the problem is never used
:compiler-options {:elide-asserts false}
makes it show up, but you don't really want asserts in release build
do you have a feeling for the best way to get this issue with reagent fixed? I saw your comments on the GitHub issue, and I've volunteered to do a pull request... all these compiler warnings are irksome.