You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that generating metosin-spec throws and it should work out-of-the-box in my opinion. I was able to track it down to this line, which seems to be problematic. It looks to me that you are trying to implement gen* by doing the work yourself and if that's not possible falling back to standard implementation. The problem is that you are passing your naked spec data structure which was provided by user. It looks like standard gen* implementation expects massaged spec by first applying specize on it. The difference is subtle but it breaks because of it in my case.
I think I hit something which is expected to work and is broken.
Please consider this gist:
https://gist.github.com/darwin/e7748419304915f75633666b906f23f8
You can repro it on your machine with:
clojure -Srepro -Sdeps '{:deps {issue {:git/url "https://gist.github.com/darwin/e7748419304915f75633666b906f23f8" :sha "af929e906525703509a4f86ba371d74f8338dc71"}}}' -m main
The problem is that generating
metosin-spec
throws and it should work out-of-the-box in my opinion. I was able to track it down to this line, which seems to be problematic. It looks to me that you are trying to implementgen*
by doing the work yourself and if that's not possible falling back to standard implementation. The problem is that you are passing your naked spec data structure which was provided by user. It looks like standardgen*
implementation expects massaged spec by first applyingspecize
on it. The difference is subtle but it breaks because of it in my case.Please look at
gensub
helper which is doing that before callinggen*
protocol:https://github.com/clojure/spec.alpha/blob/11d21c5f055f49b6a84554837b80c91be831c058/src/main/clojure/clojure/spec/alpha.clj#L275
I'm not saying this is the exact issue. I'm new to spec and don't have deep understanding here. Maybe @puredanger could shed some light.
The text was updated successfully, but these errors were encountered: