Clojure

GC Issue 9: Not all *vars* have doc strings

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Reported by richhickey, Dec 17, 2008
Need to audit and fix

Comment 1 by richhickey, Dec 17, 2008
(No comment was entered for this change.)
Owner: ---
Comment 2 by mmcgrana, Jan 05, 2009
Possible audit method for public clojure.core *vars missing doc strings:

(prn
  (let [publics (ns-publics 'clojure.core)
        stared  (filter #(re-find #"^\*" (str (first %))) publics)
        undoced (remove #(:doc (meta (second %))) stared)]
    (map first undoced)))

=> (*compile-path* *ns* *allow-unresolved-vars* *macro-meta* ...
Comment 3 by chouser, Jan 09, 2009
For Vars interned via Java code, there's no original 'def' statement
where docstrings can be added.  Should a block of statments like
following be added to the end of clojure/core.clj ?

(alter-meta! #'*compile-path* assoc :doc
  "Specifies the directory where 'compile' will write out .class
  files.  This directory must be in the classpath for 'compile' to
  work.")

Comment 4 by richhickey, Jan 10, 2009
That seems right to me
Comment 5 by Chousuke, Jan 18, 2009
Here is a patch that adds at least *some* documentation for some of the variables.
It's missing a few that I did not know the purpose for, though.

--
Jarkko
 var-doc.patch
2.5 KB Download
Comment 6 by richhickey, Jan 22, 2009
Patch applied - svn 1225 - thanks!
Status: Fixed

People

  • Assignee:
    Unassigned
    Reporter:
    Anonymous
Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: