Closed gmp26 closed 7 years ago
lein test gives
lein test
Exception in thread "main" clojure.lang.ExceptionInfo: Call to clojure.core/defn did not conform to spec: In: [1 2] val: [{:keys (angle width fill width2 fill2)}] fails spec: :clojure.core.specs/local-name at: [:args :bs :arity-1 :args :varargs :form :sym] predicate: simple-symbol? In: [1 2 0] val: ({:keys (angle width fill width2 fill2)}) fails spec: :clojure.core.specs/seq-binding-form at: [:args :bs :arity-1 :args :varargs :form :seq] predicate: (cat :elems (* :clojure.core.specs/binding-form) :rest (? (cat :amp #{(quote &)} :form :clojure.core.specs/binding-form)) :as (? (cat :as #{:as} :sym :clojure.core.specs/local-name))), Extra input In: [1 2 0] val: {:keys (angle width fill width2 fill2)} fails spec: :clojure.core.specs/map-binding at: [:args :bs :arity-1 :args :varargs :form :map :mb] predicate: vector? In: [1 2 0] val: {:keys (angle width fill width2 fill2)} fails spec: :clojure.core.specs/ns-keys at: [:args :bs :arity-1 :args :varargs :form :map :nsk] predicate: vector? In: [1 2 0] val: {:keys (angle width fill width2 fill2)} fails spec: :clojure.core.specs/map-bindings at: [:args :bs :arity-1 :args :varargs :form :map :msb] predicate: vector? In: [1 2] val: [{:keys (angle width fill width2 fill2)}] fails spec: :clojure.core.specs/map-special-binding at: [:args :bs :arity-1 :args :varargs :form :map] predicate: map? In: [1 0] val: id fails spec: :clojure.core.specs/arg-list at: [:args :bs :arity-n :bodies :args] predicate: vector? :clojure.spec/args (stripe-pattern [id & [{:keys (angle width fill width2 fill2)}]] (let [width (or width 10) width2 (or width2 width) fill (or fill :black) fill2 (or fill2 :white) pattern [:pattern (merge {:id id, :width 10, :height (+ width width2), :patternUnits :userSpaceOnUse} (when angle {:patternTransform (str "rotate(" angle ")")})) [:rect {:fill fill, :stroke :none} [0 0] [10 width]]]] (if-not fill2 pattern (conj pattern [:rect {:fill fill2, :stroke :none} [0 width] [10 width2]])))) #:clojure.spec{:problems ({:path [:args :bs :arity-1 :args :varargs :form :sym], :pred simple-symbol?, :val [{:keys (angle width fill width2 fill2)}], :via [:clojure.core.specs/defn-args :clojure.core.specs/args+body :clojure.core.specs/arg-list :clojure.core.specs/arg-list :clojure.core.specs/binding-form :clojure.core.specs/binding-form :clojure.core.specs/local-name], :in [1 2]} {:path [:args :bs :arity-1 :args :varargs :form :seq], :reason "Extra input", :pred (cat :elems (* :clojure.core.specs/binding-form) :rest (? (cat :amp #{(quote &)} :form :clojure.core.specs/binding-form)) :as (? (cat :as #{:as} :sym :clojure.core.specs/local-name))), :val ({:keys (angle width fill width2 fill2)}), :via [:clojure.core.specs/defn-args :clojure.core.specs/args+body :clojure.core.specs/arg-list :clojure.core.specs/arg-list :clojure.core.specs/binding-form :clojure.core.specs/binding-form :clojure.core.specs/seq-binding-form], :in [1 2 0]} {:path [:args :bs :arity-1 :args :varargs :form :map :mb], :pred vector?, :val {:keys (angle width fill width2 fill2)}, :via [:clojure.core.specs/defn-args :clojure.core.specs/args+body :clojure.core.specs/arg-list :clojure.core.specs/arg-list :clojure.core.specs/binding-form :clojure.core.specs/binding-form :clojure.core.specs/map-binding-form :clojure.core.specs/map-bindings :clojure.core.specs/map-binding], :in [1 2 0]} {:path [:args :bs :arity-1 :args :varargs :form :map :nsk], :pred vector?, :val {:keys (angle width fill width2 fill2)}, :via [:clojure.core.specs/defn-args :clojure.core.specs/args+body :clojure.core.specs/arg-list :clojure.core.specs/arg-list :clojure.core.specs/binding-form :clojure.core.specs/binding-form :clojure.core.specs/map-binding-form :clojure.core.specs/map-bindings :clojure.core.specs/ns-keys], :in [1 2 0]} {:path [:args :bs :arity-1 :args :varargs :form :map :msb], :pred vector?, :val {:keys (angle width fill width2 fill2)}, :via [:clojure.core.specs/defn-args :clojure.core.specs/args+body :clojure.core.specs/arg-list :clojure.core.specs/arg-list :clojure.core.specs/binding-form :clojure.core.specs/binding-form :clojure.core.specs/map-binding-form :clojure.core.specs/map-bindings], :in [1 2 0]} {:path [:args :bs :arity-1 :args :varargs :form :map], :pred map?, :val [{:keys (angle width fill width2 fill2)}], :via [:clojure.core.specs/defn-args :clojure.core.specs/args+body :clojure.core.specs/arg-list :clojure.core.specs/arg-list :clojure.core.specs/binding-form :clojure.core.specs/binding-form :clojure.core.specs/map-binding-form :clojure.core.specs/map-special-binding], :in [1 2]} {:path [:args :bs :arity-n :bodies :args], :pred vector?, :val id, :via [:clojure.core.specs/defn-args :clojure.core.specs/args+body :clojure.core.specs/args+body :clojure.core.specs/args+body :clojure.core.specs/arg-list :clojure.core.specs/arg-list], :in [1 0]}), :args (stripe-pattern [id & [{:keys (angle width fill width2 fill2)}]] (let [width (or width 10) width2 (or width2 width) fill (or fill :black) fill2 (or fill2 :white) pattern [:pattern (merge {:id id, :width 10, :height (+ width width2), :patternUnits :userSpaceOnUse} (when angle {:patternTransform (str "rotate(" angle ")")})) [:rect {:fill fill, :stroke :none} [0 0] [10 width]]]] (if-not fill2 pattern (conj pattern [:rect {:fill fill2, :stroke :none} [0 width] [10 width2]]))))}, compiling:(dali/prefab.cljc:3:1) at clojure.lang.Compiler.load(Compiler.java:7442) at clojure.lang.RT.loadResourceScript(RT.java:374) at clojure.lang.RT.loadResourceScript(RT.java:365) at clojure.lang.RT.load(RT.java:455) at clojure.lang.RT.load(RT.java:421) at clojure.core$load$fn__7831.invoke(core.clj:6008) at clojure.core$load.invokeStatic(core.clj:6007) at clojure.core$load.doInvoke(core.clj:5991) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.core$load_one.invokeStatic(core.clj:5812) at clojure.core$load_one.invoke(core.clj:5807) at clojure.core$load_lib$fn__7776.invoke(core.clj:5852) at clojure.core$load_lib.invokeStatic(core.clj:5851) at clojure.core$load_lib.doInvoke(core.clj:5832) at clojure.lang.RestFn.applyTo(RestFn.java:142) at clojure.core$apply.invokeStatic(core.clj:659) at clojure.core$load_libs.invokeStatic(core.clj:5889) at clojure.core$load_libs.doInvoke(core.clj:5873) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invokeStatic(core.clj:659) at clojure.core$require.invokeStatic(core.clj:5911) at clojure.core$require.doInvoke(core.clj:5911) at clojure.lang.RestFn.invoke(RestFn.java:930) at dali.examples$eval2987$loading__7717__auto____2988.invoke(examples.clj:1)
Thanks, I'll look into it!
This is now fixed in version 0.7.4.
lein test
gives