[CLJ-1148] adds docstring support to defonce, and stops it from stomping existing metadata Created: 17/Jan/13 Updated: 22/Nov/13
|Affects Version/s:||Release 1.5|
|Fix Version/s:||Release 1.6|
Two issues here:
1) defonce doesn't support docstrings, although def does, so it would be nice to bring the two in line with each other
2) defonce can stomp metadata, like this:
(defonce ^:private foo 5)
|Comment by Alex Miller [ 29/Aug/13 9:53 AM ]|
Changed to defect for stomping metadata.
|Comment by Stuart Halloway [ 18/Oct/13 8:00 AM ]|
Please add tests. The clojure.test-helper namespace has useful temporary namespace support.
|Comment by Joe Gallo [ 24/Oct/13 12:44 PM ]|
This new patch includes the changes to defonce and also tests.
|Comment by Alex Miller [ 24/Oct/13 2:14 PM ]|
Changing to Vetted so this is screenable again.
|Comment by Rich Hickey [ 22/Nov/13 11:31 AM ]|
I disagree about the stomp metadata - different metadata was provided. The purpose of defonce is to avoid the re-evaluation of the init. Is this the simplest change that accomplishes the doc string? In any case split in two.