fulcrologic / guardrails

Efficient, hassle-free function call validation with a concise inline syntax for clojure.spec and Malli
Eclipse Public License 2.0
240 stars 26 forks source link

Nested arg destructuring breaks #10

Closed saikyun closed 4 years ago

saikyun commented 4 years ago

This breaks:

(>defn add
  [[[k v] & wat]]
  [any? => number?]
  (+ 1 1))
;;=> Syntax error macroexpanding clojure.core/defn at (REPL:81:1).
;;=> ((k v) & wat :as arg_6480) - failed: Extra input at: [:fn-tail :arity-n :bodies :params] spec: :clojure.core.specs.alpha/param-list
;;=> ([(k v) & wat :as arg_6480]) - failed: Extra input at: [:fn-tail :arity-1 :params] spec: :clojure.core.specs.alpha/param-list
awkay commented 4 years ago

Looks like GR is converting the outer vector to a list. I have no time to work on this. My policy on issues is: if it isn't going to get worked on, I don't leave the noise in the issue tracker. If you care to try to make a PR for it, then feel free. Glad to look at a PR and merge it if it is sound. If nothing happens for a few weeks, I'll close this issue as "won't fix".

saikyun commented 4 years ago

Sorry for not replying earlier. I understand you position. Thanks for taking the time to reply. :)