Clojure

doc macro broken for namespaces

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: Release 1.3
  • Fix Version/s: Release 1.5
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test
  • Approval:
    Ok

Description

Example:

Clojure 1.3.0
user=> (doc clojure.pprint)
ClassNotFoundException clojure.pprint java.net.URLClassLoader$1.run (URLClassLoader.java:366)

It appears it is not safe to call resolve on a symbol representing a namespace; you get the error above. FWIW, I seem to have resolved the problem (see attached diff) by moving the find-ns clause above the resolve clause (in the cond); also the reference to namespace-doc needs to be var-quoted since namespace-doc is private.

  1. clj-902-doc-on-namespaces-patch.txt
    17/Feb/12 12:43 AM
    2 kB
    Andy Fingerhut
  2. repl.diff
    28/Dec/11 5:35 PM
    0.6 kB
    Greg Chapman

Activity

Hide
Andy Fingerhut added a comment -

Verified there is a bug, and that this change fixes it. New patch is in proper format, and includes a new unit test that would have caught the bug.

Show
Andy Fingerhut added a comment - Verified there is a bug, and that this change fixes it. New patch is in proper format, and includes a new unit test that would have caught the bug.
Hide
Stuart Sierra added a comment -

Screened. Ready for approval.

Show
Stuart Sierra added a comment - Screened. Ready for approval.
Hide
Stuart Sierra added a comment -

Patch applied.

Show
Stuart Sierra added a comment - Patch applied.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: