Welcome! Please see the About page for a little more info on how this works.

+3 votes
in Docs by
Pass all args from {{defonce}} on to {{def}} so it supports docstrings (or potentially other future features) just like def.

Docstrings and other Var metadata will be lost when the {{defonce}} is reƫvaluated.

*Patch:* clj-1148-defonce-6.patch

*Screened by:*

17 Answers

0 votes

Comment made by: seancorfield

On noticing that we have a JIRA issue at work to add docstrings to the handful of {{defonce}} calls we have (via alter-meta!), I came upon this issue and wondered what is stopping it moving forward?

Is Linus's patch an acceptable solution overall (and is just missing tests)? Or is a different approach wanted? Is this blocked by CLJ-1446 and folks want that fixed before updating {{defonce}}?

0 votes
Reference: https://clojure.atlassian.net/browse/CLJ-1148 (reported by joegallo)