Fork me on GitHub
#shadow-cljs
<
2022-08-10
>
Jack Arrington19:08:11

Bit of an odd question: can I silence compiler warnings from a dependency (not from my own source code)? I upgraded from an older version of shadow and now get this warning:

------ WARNING #1 - :redef -----------------------------------------------------
  Resource: garden/color.cljc:390:1
 --------------------------------------------------------------------------------
  387 |      (let [d (util/clip 1 179 distance-from-complement)]
  388 |          (hue-rotations color 0 d (- d)))))
  389 |
  390 | (defn- abs
 -------^------------------------------------------------------------------------
  abs already refers to: cljs.core/abs being replaced by: garden.color/abs
 --------------------------------------------------------------------------------
  391 |   [x]
  392 |   (if (neg? x) (- x) x))
  393 |
  394 | (defn tetrad
 --------------------------------------------------------------------------------
I will probably submit a PR to the Garden project on GH, but it would be kind of nice to not have that warning in the meantime. It's not affecting me anyway.

Jack Arrington19:08:09

And to clarify—I don't want to disable all warnings, just the one

Jack Arrington19:08:00

Also, on a little further investigation, I'm not sure why this warning is even happening anyway. There isa (:refer-clojure :exclude [abs complement]) in the NS form of the relevant garden/color.cljc file. Not sure if that has anything to do with shadow-cljs though, or is an issue with the CLJS compiler

thheller19:08:53

I'm guessing you just have an older garden version? or maybe that change is not in a release yet?

thheller19:08:29

and no there is no setting to disable specific warnings

Jack Arrington20:08:10

My garden version is the latest at 1.3.10, and it looks like that version release was made after the commit you linked above, so it'd be odd for it not to be included in the release

thheller20:08:50

you can easily check. open up a REPL and ( "garden/color.cljc") and just look at it

thheller20:08:27

but just judging from the commit history the last release is much older than that commit

thheller20:08:59

over 2 years older actually

Jack Arrington20:08:27

Ah, I had misread the year there 🙂

Jack Arrington20:08:48

I can nudge the repo owner to create a new release. Thanks for the help