ghostwheel

Hassle-free clojure.spec, automatic generative testing, side effect detection, and evaluation tracing for Clojure(-Script) – https://github.com/gnl/ghostwheel
Saikyun 2020-05-20T20:24:28.011500Z

hi @hindol.adhya, afaik that's not how you do it. I solved it by creating a custom operator for generators. sadly I can't find the code, so I'm not sure I saved it anywhere online

Saikyun 2020-05-20T20:24:45.012Z

sadly there are some issues with ghostwheel, and it doesn't seem to be maintained, so I can't really recommend it

wilkerlucio 2020-05-20T20:26:29.013100Z

friendly reminder: ghostwheel has not been supported for a while, if you wanna use something thats a bit different but that is still supported I suggest you check guardrails: https://github.com/fulcrologic/guardrails

wilkerlucio 2020-05-21T21:46:05.016700Z

I think the major conflict point is around the testing features, guardrails made de design decision to don't have any of it

wilkerlucio 2020-05-21T21:46:53.016900Z

impl details I think is a bit different too, guardrails just injects validation code in the fns, while gw I guess uses the instrumentation stuff from spec (for instrument at least, but I may be wrong here, you know better :))

gnl 2020-05-22T23:16:54.019400Z

Thanks for the pointer and you're correct regarding Ghostwheel using the spec instrumentation stuff. :) I have absolutely no problem with a fork that goes in a different direction, I'd just like to minimise the duplication of effort, whatever a possible solution to that may look like. If it turns out that a merge does not make sense and/or is not desired by either party for whatever reason, we could for example extract the gspec parsing functionality into a separate shared library so that both Guardrails and Ghostwheel benefit from improvements / fixes in that area. I have to get back up to speed with my code/notes/release status and look at Tony Kay's feedback and changes to get a better picture of where I see things going and then we'll take it from there.

gnl 2020-05-22T23:21:17.019600Z

Either way, I'm happy that Guardrails has embraced the gspec syntax, because I'd really like to see that become more common throughout Clojure code bases everywhere, whatever the underlying tooling does with the information in terms of instrumentation/testing/type-completion, etc.

wilkerlucio 2020-05-23T22:13:59.020600Z

I really like the syntax too, and there are other things I miss on guardrails that may be added, like a way to annotate annonymous fns, eg: (>fn [foo bar] [int? string? => string?] ...)

👆 1
hindol 2020-05-20T20:29:26.014200Z

Thank you both. I am finding it is not so trivial to map a concept from spec to ghostwheel. I will check out guardrails.