Search code examples
clojureclojure-repl

Missing doc in non-user namespaces in Clojure 1.5


What should I do to get doc available again?

brew install --devel leiningen
lein new app yeehaw
cd yeehaw
; edit project.clj and replace "1.4.0" with 1.5.0-RC1"
lein repl
yeehaw.core=> (doc map)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc
in this context, compiling:(NO_SOURCE_PATH:1:1) 

This change comes from CLJ-1085 and this associated source.

Note that doc and the usual REPL functionality is still available in the user namespace, but it would be nice to have it at my fingertips in my app's namespace, at least while in the REPL.


Solution

  • Get doc into current namespace:

    (clojure.core/use '[clojure.repl :only (doc)])
    

    And after that try doc again.