stathissideris / spec-provider

Infer Clojure specs from sample data. Inspired by F#'s type providers.
519 stars 22 forks source link

Heterogenously namespaced keywords #20

Closed zalky closed 6 years ago

zalky commented 6 years ago

Hi, thanks for putting together this fantastic library!

I'm having trouble figuring out how to generate specs for entity maps with heterogenously namespaced keywords. For example:

{:a/b :value
 :c/d "value"}

As best I can tell, spec-provider assumes that all keys in a map are either un-namespaced, or that they all have the same namespace. Am I missing something?

stathissideris commented 6 years ago

Confirmed, this is really a bug and it's due to an assumption in the code that had to do with my poor understanding of namespaces and spec when I was first developing spec-provider. Thanks for reporting this, I'm working on a fix.

stathissideris commented 6 years ago

Fixed in v0.4.14