-
Notifications
You must be signed in to change notification settings - Fork 257
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
schema.core/protocol is incompatible with metadata-based protocol implementation #424
Comments
Thanks for the pointer. That said, I think my opinion is that it's not this library's job to work around bugs in Clojure (especially since users are free to write their own |
Hi @w01fe , thanks for the reply!
This is not practical, since there are 3rd party libraries written in Schema. I cannot control whether they use
That's one way to conceptualize it. Another is that
I have made the effort of trying to imagine such an scenario and fail to see it possible. The worst thing that can possibly happen is that the extra check becomes redundant because in a future There's the possibility that https://dev.clojure.org/jira/browse/CLJ-2426 gets closed in the opposite direction (i.e. " |
https://clojure.org/reference/protocols says "Protocols are fully reified and support reflective capabilities via extends? , extenders , and satisfies?." Is there documentation of another public interface that can be used to detect satisfaction?
Well, for instance your implementation relies on |
s/protocol
usesclojure.core/satisfies?
:schema/src/cljx/schema/core.cljx
Line 347 in ddb54c8
In turn,
satisfies?
does not honor metadata-based protocol implementation: https://dev.clojure.org/jira/browse/CLJ-2426metadata-based protocol implementation is a fine tool that can solve a variety of problems. Having
s/protocol
fail on it is very inconvenient.You may find inspiration for a drop-in replacement for
satisfies?
here.Thanks - V
The text was updated successfully, but these errors were encountered: