test-check

adamfrey 2020-04-30T14:07:44.041200Z

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.

2020-04-30T14:10:12.041500Z

I've never heard of it

2020-04-30T14:12:00.042Z

What test.check version are you using?

adamfrey 2020-04-30T14:13:05.043100Z

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

2020-04-30T14:13:17.043300Z

That's not a version

adamfrey 2020-04-30T14:13:26.043600Z

oh, one sec

2020-04-30T14:14:47.044200Z

Woah

adamfrey 2020-04-30T14:15:09.044600Z

lol, I'm bringing all the news today

2020-04-30T14:15:11.044800Z

I guess Alex released it

2020-04-30T14:15:20.045Z

Okay well anyhow

2020-04-30T14:15:54.045600Z

Line 999 doesn't have a <= call

2020-04-30T14:16:22.046Z

So I have no idea what it might be referring to

2020-04-30T14:17:01.046600Z

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

2020-04-30T14:17:19.046900Z

I'd ask in #cljs

adamfrey 2020-04-30T14:18:39.047600Z

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

ghadi 2020-04-30T14:22:44.048500Z

cljc causes different line numbers?

2020-04-30T14:23:13.049Z

Yeah that's news to me

ghadi 2020-04-30T14:23:31.049400Z

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

ghadi 2020-04-30T14:24:10.050600Z

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

adamfrey 2020-04-30T14:24:18.051100Z

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

alexmiller 2020-04-30T14:24:25.051300Z

surprise!

❤️ 1
🎉 2
2020-04-30T14:24:34.051900Z

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

2020-04-30T14:25:00.052600Z

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

adamfrey 2020-04-30T14:26:37.054100Z

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

2020-04-30T14:26:54.054600Z

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

adamfrey 2020-04-30T14:26:57.054700Z

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

2020-04-30T14:27:01.054900Z

Yeah

2020-04-30T14:27:05.055100Z

At least initially

adamfrey 2020-04-30T14:27:29.055600Z

Thanks for your help, Gary and Ghadi.

👍 1
adamfrey 2020-04-30T14:32:36.057Z

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