active-group/active-clojure

Field spec should be named like selector...

Closed this issue · 4 comments

cresh commented

;; Generate a spec for each constructor arg. Uses each constructor arg and prepends the type name + "-" as the name.

... not type+fieldname. Or is there a good reason against it, @neshtea ?

I think the thought process was to enable speccing both the "type"/spec of the selector argument (as in the parameter passed to the constructor function) and the selector function itself. We should be open to explore different ideas because the implementation as of right now is not really stable -- which means the specs get overwritten easily when defining multiple record-types with similar names/fields.

This issue is irrelevant with the new records, because they don't generate specs for selectors.
I think, we can close this issue although the namespace active.clojure.record-spec.clj still exists. @neshtea ?

What is the status of this issue? I would propose to keep active.clojure.record-spec around just to make sure that no old code breaks unexpecteldy and mark the whole namespace as deprecated (and close this issue). Thoughts?

What is the status of this issue? I would propose to keep active.clojure.record-spec around just to make sure that no old code breaks unexpecteldy and mark the whole namespace as deprecated (and close this issue). Thoughts?

As previously mentioned, we'll keep the old implementation around (for now).