This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-14
Channels
- # announcements (3)
- # babashka (189)
- # beginners (157)
- # calva (5)
- # cider (5)
- # clj-kondo (7)
- # cljdoc (34)
- # clojure (61)
- # clojure-dev (2)
- # clojure-europe (42)
- # clojure-nl (15)
- # clojure-poland (1)
- # clojure-spec (5)
- # clojure-uk (6)
- # clojured (2)
- # clojurescript (31)
- # clojureverse-ops (8)
- # component (2)
- # cursive (41)
- # datomic (15)
- # depstar (44)
- # figwheel-main (9)
- # fulcro (14)
- # holy-lambda (1)
- # inf-clojure (13)
- # introduce-yourself (1)
- # jobs (1)
- # lsp (98)
- # malli (12)
- # off-topic (12)
- # pedestal (1)
- # polylith (3)
- # re-frame (51)
- # reitit (4)
- # releases (1)
- # reveal (5)
- # shadow-cljs (3)
- # tools-deps (56)
- # vim (12)
- # xtdb (36)
Hi, I'm sure it's been asked before, but googling didn't turn anything up: is there an easy way to associate comments to specs? My usecase is working together with some non-clojure (actually, non-programmer) people on a data definition. I'm used to spec and all the related tooling, but I can't expect the others to really understand everything from code.
it's not supported out of the box. you need to build your own metadata api for specs right now if you need that.
it's quite easy to do tho, basically an atom and a few functions that will work against it. We have something like that internally, we can do (-> (s/def ::foo string?) (x/vary-meta! assoc :doc "some docstring"))
s/def returns the spec key, you can take advantage of this. and from there writing x/with-doc is just a small fn
this is the most requested feature for spec and I expect it will be added in spec 2