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)
My real function is pulling from local-storage which is why I don't need any args.
@oscar This looks like a regression, not yet sure where, looking into it.
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]
Yup, got it.
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.
Regarding check-coverage
– am I understanding this correctly, you want to disable it for a single plain defn
that is defined without >defn
?
Yeah. It's tripping for a defn that's buried inside a library macro.
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.
Regarding the declare
thing – can you open a GitHub issue?
Sure thing. Thanks!
@oscar Looking good, running tests to make sure the fixes didn't break anything, will deploy new pre-release snapshot in a few minutes.
@oscar Okay, try 0.2.3-SNAPSHOT
, both check-coverage
and the empty arg situation should be fixed now.
Everyone, quick poll out of curiosity – which syntax do you prefer for the gspec operators:
🔤 Keyword operators – :ret
, :st
, :gen
➡️ Symbolic operators – =>
, |
, <-
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.
@clojurians.net check-coverage
looks like it's fixed. I'm still having an issue with empty args.
The same one?
Yeah. Same code as above triggers it. I'm restarting my REPL to try repulling the snapshot.
Try cleaning your build / build cache, just in case
... After cleaning, both issues are present... Maybe I didn't get the newest snapshot? I'll clear out .m2
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.
Okay. They're both fixed. Must've been a caching thing.
@oscar Okay, redeployed new snapshot, clean everything, see if you can get your tests to fail
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.
Great, let me know. I'm deploying the official 0.2.3 release in the meantime.