test-check 2020-04-30

When compiling an application including test.check in CLJS 1.10.597 I see this warning:

WARNING: cljs.core/<=, all arguments must be numbers, got [#{nil js/Number} number] instead at line 999 target/cljsbuild-compiler-2/clojure/test/check/generators.cljc
googling that message shows me that it's been appearing in people's stack traces for years, but I couldn't find any discussion about that warning in particular on the slack archives or on JIRA. If anyone remembers prior discussion about this message would you mind pointing me to it or summarizing? Thanks.

I've never heard of it

What test.check version are you using?

I believe 1.0.0. This is all part of a big application, I think I'll try to recreate a minimal example

That's not a version

oh, one sec

lol, I'm bringing all the news today

I guess Alex released it

Alex Miller (Clojure team) 2020-04-30T14:24:25.051300Z

surprise!

❤️ 1
🎉 2

Line 999 doesn't have a <= call

So I have no idea what it might be referring to

That line just defs a number to be the negation of another

the difference in line numbers might be because of cljc but this is the line that 999 points to in my target directory: https://github.com/clojure/test.check/blob/master/src/main/clojure/clojure/test/check/generators.cljc#L1193

cljc causes different line numbers?

Yeah that's news to me

it shouldn't, and whether it does is a verifiable assertion

(i know you qualified it with "might" @adamfrey )

yeah, sorry, I threw that out there as an guess

Looking at the code it's pretty obvious via human analysis that the args can't be nil

If those cljs warnings have false positives, maybe they have a way to suppress them?

Adding to the false positives likelihood I found a recent message of a similar vein: https://clojurians.slack.com/archives/C07UQ678E/p1587734805230700

I don't know what cljs wants us to do 🙂

so maybe this is a #cljs-dev question rather than #test-check

Thanks for your help, Gary and Ghadi.

👍 1

the difference in line numbers looks like it's because I'm not actually getting 1.0.0 , but an older version in my compilation output even though 1.0.0 is in my project.clj . I'll figure that part out. Sorry for the wild speculation, ha

👍 1