We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi. I am playing with reitit and since it started using coerce instead of conform my handler stopped working: https://github.com/nenadalm/spa-demo/blob/6ead886d34c263cc8c459f7ec8746f853c27c129/server/src/app/routes/user/handler.cljs#L44.
reitit
coerce
conform
related change in reitit: metosin/reitit@cb14cf0#diff-b5391373d6c546daf15d41bb3a9368d2R125
I found that some assertion fails Assert failed: missing spec predicate spec. It fails in both clojure and clojurescript.
Assert failed: missing spec predicate spec
Here is code with which it can be reproduced:
(ns app.core (:require [clojure.spec.alpha :as s] [spec-tools.core :as st])) (s/def :resource.user/id int?) (s/def :resource/user (s/keys :req-un [:resource.user/id])) (s/def :response.user/data :resource/user) (s/def :response/user (s/keys :req-un [:response.user/data])) (def no-op-transformer (reify st/Transformer (-name [_] ::no-op) (-encoder [_ _ _]) (-decoder [_ _ _]))) (def spec (st/create-spec {:spec :response/user})) (def value {:data {:id 41, :type "user", :attributes {:name "string"}}}) (def transformer no-op-transformer) (comment ;; this works (st/conform spec value transformer) ;; Unhandled java.lang.AssertionError ;; Assert failed: missing spec predicate spec (st/coerce spec value transformer) )
project.clj
(defproject app "0.0.1-SNAPSHOT" :dependencies [[org.clojure/clojure "1.9.0"] [metosin/spec-tools "0.8.1"] [org.clojure/clojurescript "1.10.439"] [org.clojure/test.check "0.10.0-alpha2"]] :profiles {:dev {:dependencies [[com.bhauman/figwheel-main "0.1.9"]]}})
The text was updated successfully, but these errors were encountered:
e6041cb
[metosin/spec-tools "0.8.2"] should have this fixed via e6041cb.
[metosin/spec-tools "0.8.2"]
Sorry, something went wrong.
If this fixes the problem, I'll push out a new patch for reitit too.
thanks. that fixes the problem with reitit.
No branches or pull requests
Hi. I am playing with
reitit
and since it started usingcoerce
instead ofconform
my handler stopped working: https://github.com/nenadalm/spa-demo/blob/6ead886d34c263cc8c459f7ec8746f853c27c129/server/src/app/routes/user/handler.cljs#L44.related change in
reitit
: metosin/reitit@cb14cf0#diff-b5391373d6c546daf15d41bb3a9368d2R125I found that some assertion fails
Assert failed: missing spec predicate spec
. It fails in both clojure and clojurescript.Here is code with which it can be reproduced:
project.clj
The text was updated successfully, but these errors were encountered: