-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:via
is empty when instrumentation fails on :ret
spec
#7
Comments
Hm, I'm not sure what I'll get this fixed. |
When I look at the instrumentation source, there's no trace of This is only after a cursor search, and I'm not yet certain of the meaning of |
AIUI, For example, note the following three spec failures. All three have the same predicate since 123 is not a string, but they arrive at that predicate via different specs: (require '[clojure.spec.alpha :as s])
(s/def :example/name string?)
(s/def :example/person (s/keys :req-un [:example/name]))
(-> (s/explain-data string? 123) ::s/problems first (select-keys [:via :pred]))
;; {:via [], :pred :clojure.spec.alpha/unknown}
;; I'm actually not 100% sure why the above is unknown
(-> (s/explain-data :example/name 123) ::s/problems first (select-keys [:via :pred]))
;; {:via [:example/name], :pred clojure.core/string?}
(-> (s/explain-data :example/person {:name 123}) ::s/problems first (select-keys [:via :pred]))
;; {:via [:example/person :example/name], :pred clojure.core/string?} |
Thanks a great explanation of I'll work to get a fix for this in the next few days. |
I've pushed a fix for this and I've tested this new orchestra version with your expound snapshot as well. The only thing missing is the "relevant specs" section on Please let me know if you have any more troubles with this. Thanks for the help! |
@jeaye It works great! Thank for the quick fix. |
Using
[orchestra "2017.07.04-1"]
My environment is a lein REPL:
lein repl
.Expected: The
:via
value should be populated (namely, it should include[:example/age :example/age]
.The text was updated successfully, but these errors were encountered: