Fork me on GitHub
#test-check
<
2020-04-30
>
adamfrey14:04:44

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.

gfredericks14:04:12

I've never heard of it

gfredericks14:04:00

What test.check version are you using?

adamfrey14:04:05

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

gfredericks14:04:17

That's not a version

adamfrey14:04:26

oh, one sec

adamfrey14:04:09

lol, I'm bringing all the news today

gfredericks14:04:11

I guess Alex released it

alexmiller14:04:25

surprise!

🎉 8
❤️ 4
gfredericks14:04:20

Okay well anyhow

gfredericks14:04:54

Line 999 doesn't have a <= call

gfredericks14:04:22

So I have no idea what it might be referring to

gfredericks14:04:01

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

gfredericks14:04:19

I'd ask in #cljs

adamfrey14:04:39

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

ghadi14:04:44

cljc causes different line numbers?

gfredericks14:04:13

Yeah that's news to me

ghadi14:04:31

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

ghadi14:04:10

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

adamfrey14:04:18

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

gfredericks14:04:34

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

gfredericks14:04:00

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

adamfrey14:04:37

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

gfredericks14:04:54

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

adamfrey14:04:57

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

gfredericks14:04:05

At least initially

adamfrey14:04:29

Thanks for your help, Gary and Ghadi.

👍 4
adamfrey14:04:36

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

👍 4