@armikhalev Code looks fine at first sight, I don't really have time to look into it right now, I'll see if I can reproduce this tonight.
I've tried everything from scratch, new re-frame app with the same relevant code for Ghostwheel (without everything else I have though), it works! Well, I still have to restart figwheel to add metadata to a new namespace if I want specs in a different ns, but at least it is consistent behavior. Now I'm really confused about what is making Ghostwheel produce empty errors in my code. Maybe something overrides it?
@armikhalev So when you say it works, what /does/ work exactly? Are you getting the same empty messages like before for every single function with the namespace code and project.clj that you posted above?
What works is that error messages appear when I add
#:ghostwheel.core{:check true
:num-tests 10}
to namespace and restart figwheel, if I don't restart it, then console doesn't show anything coming from ghostwheel.
But those error messages still empty as in the image I posted, without any change to code.I tried cljs.spec.test.alpha
methods to see what happens using them in usual way:
(>defn ^::g/outstrument addition
[a b]
[pos-int? pos-int? => int? | #(> % a) #(> % b)]
(+ a b))
(stest/instrument `addition)
(pp/pprint (stest/check `addition))
The result in the browser console:
[{:spec #object[cljs.spec.alpha.t_cljs$spec$alpha37737],
:clojure.test.check/ret
{:result true, :num-tests 1000, :seed 1534908067087},
:sym mela-reframe-app.panels.koyla/addition}]
While (g/check)
still gives me empty error. By the way, thanks for the help, really want to make it work, makes using spec much easier.Should also mention, that when I change plus to minus - expecting error, the error message appears as per ReadMe. So the only issue is that it shouldn't raise empty error on the correct function.
Finally I found what was causing the bug - I had [org.clojure/test.check "0.9.0"]
in my project.clj, that was messing up everything! I'm so happy I can use Ghostwheel now!
@armikhalev Oh great, I was starting to run out of ideas here 🙂 Can you open an issue on GitHub that this tripped it up? I want to look into it and maybe add a note to the docs.
Sure, I'll do, hope it helps someone
@armikhalev Thanks!