exoscale / coax

Clojure.spec coercion library for clj(s)
Other
118 stars 4 forks source link

Compilation warnings with ClojureScript and shadow-cljs #13

Closed eerohele closed 2 years ago

eerohele commented 3 years ago

Given:

{:deps {org.clojure/clojurescript {:mvn/version "1.10.773"}
        thheller/shadow-cljs {:mvn/version "2.11.15"}
        exoscale/coax {:mvn/version "1.0.0-alpha11"}}}

shadow-cljs reports:

------ WARNING #1 - :undeclared-var --------------------------------------------
 Resource: exoscale/coax/coercer.cljc:23:4
 Can't take value of macro exoscale.coax.coercer/invalid-on-throw!
--------------------------------------------------------------------------------

------ WARNING #2 - :undeclared-var --------------------------------------------
 Resource: exoscale/coax/coercer.cljc:35:4
 Can't take value of macro exoscale.coax.coercer/invalid-on-throw!
--------------------------------------------------------------------------------

------ WARNING #3 - :undeclared-var --------------------------------------------
 Resource: exoscale/coax/coercer.cljc:69:6
 Can't take value of macro exoscale.coax.coercer/invalid-on-throw!
--------------------------------------------------------------------------------

------ WARNING #4 - :undeclared-var --------------------------------------------
 Resource: exoscale/coax/coercer.cljc:80:6
 Can't take value of macro exoscale.coax.coercer/invalid-on-throw!
--------------------------------------------------------------------------------

I haven't yet managed to make a minimal repro, so I don't know what exactly is the problem. I can look into it, but I just wanted to create the issue so that I don't forget.

All I use are coax/def and coax/coerce, so it's either of those.

mpenet commented 3 years ago

Hi, thanks for the report. I will also have a look.

mpenet commented 3 years ago

Does it cause any issue actually? (since it's just a warning, I am trying to gauge the priority)

eerohele commented 3 years ago

Not that I can tell. It's just somewhat of an annoyance. There might be a way to tell shadow-cljs to suppress those warnings — I'll need to look into it.

I am trying to gauge the priority

Yeah, as low as it gets, I think.

mpenet commented 3 years ago

I need to dust off the cljs side of things (the test suite for instance), I might take another look at this when this happens.

jellelicht commented 2 years ago

I was not able to get this really cool library to work in any way /w my clojurescript project, so I tried my hand at fixing the issues I ran into.