ghostwheel

Hassle-free clojure.spec, automatic generative testing, side effect detection, and evaluation tracing for Clojure(-Script) – https://github.com/gnl/ghostwheel
2018-07-12T19:13:20.000439Z

I'm getting an error with a function that takes no arguments. This throws an error:

(>defn example [] [=> int?] 1)
This doesn't:
(>defn example [x] [int? => int?] 1)

2018-07-12T19:14:12.000173Z

My real function is pulling from local-storage which is why I don't need any args.

gnl 2018-07-12T22:05:13.000259Z

@oscar This looks like a regression, not yet sure where, looking into it.

2018-07-12T22:06:15.000186Z

For reference, this is the error:

ERROR in (example__ghostwheel-test) (Error:NaN:NaN)
Uncaught exception, not in assertion.
expected: nil
  actual: #object[Error Error: nth not supported on this type cljs.core/PersistentArrayMap]

gnl 2018-07-12T22:06:45.000317Z

Yup, got it.

2018-07-12T22:12:44.000184Z

Is there any way to turn off check-coverage on the function level or is ns level as low as it goes? Also, I've found false positives with the coverage check if I declare and then >defn later.

gnl 2018-07-12T22:17:27.000021Z

Regarding check-coverage – am I understanding this correctly, you want to disable it for a single plain defn that is defined without >defn?

2018-07-12T22:19:32.000087Z

Yeah. It's tripping for a defn that's buried inside a library macro.

gnl 2018-07-12T22:20:42.000011Z

Got it. I don't think this works now, but it's a quick fix, I'll make it possible to set ::g/check-coverage false on a plain defn to achieve that.

gnl 2018-07-12T22:21:07.000006Z

Regarding the declare thing – can you open a GitHub issue?

2018-07-12T22:21:20.000206Z

Sure thing. Thanks!

👍 1
gnl 2018-07-12T22:39:55.000066Z

@oscar Looking good, running tests to make sure the fixes didn't break anything, will deploy new pre-release snapshot in a few minutes.

👍 1
gnl 2018-07-12T22:43:39.000282Z

@oscar Okay, try 0.2.3-SNAPSHOT, both check-coverage and the empty arg situation should be fixed now.

gnl 2018-07-12T22:54:34.000224Z

Everyone, quick poll out of curiosity – which syntax do you prefer for the gspec operators: 🔤 Keyword operators – :ret, :st, :gen ➡️ Symbolic operators – =>, |, <-

🔤 1
➡️ 5
gnl 2018-07-12T23:05:37.000181Z

By the way there's a regression in 0.2.3-SNAPSHOT after bumping spec and test.check versions due to some changes in clojure.spec regarding reporting, which can lead to false negatives in gen-testing. Fixing that now.

2018-07-12T23:11:27.000048Z

@clojurians.net check-coverage looks like it's fixed. I'm still having an issue with empty args.

gnl 2018-07-12T23:11:47.000191Z

The same one?

2018-07-12T23:12:37.000157Z

Yeah. Same code as above triggers it. I'm restarting my REPL to try repulling the snapshot.

gnl 2018-07-12T23:13:11.000003Z

Try cleaning your build / build cache, just in case

2018-07-12T23:16:33.000057Z

... After cleaning, both issues are present... Maybe I didn't get the newest snapshot? I'll clear out .m2

gnl 2018-07-12T23:18:12.000133Z

Do that, but maybe also just wait for a bit, because I have to fix the test reporting regression issue. It's possible that there's some caching happening on the clojars side as well. Will let you know when I re-deploy the fixed snapshot.

2018-07-12T23:20:42.000074Z

Okay. They're both fixed. Must've been a caching thing.

👍 1
gnl 2018-07-12T23:36:20.000160Z

@oscar Okay, redeployed new snapshot, clean everything, see if you can get your tests to fail

2018-07-12T23:51:40.000219Z

So there's a lot more noise, but I think they're mostly issues on my end. I'll clean it up and let you know if the issues popped back up.

gnl 2018-07-12T23:52:50.000003Z

Great, let me know. I'm deploying the official 0.2.3 release in the meantime.