在Clojure 1.5中缺少非用户命名空间中的doc

Dav*_* J. 9 clojure clojure-repl

我该怎么办才能doc再次获得?

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) 
Run Code Online (Sandbox Code Playgroud)

此更改来自CLJ-1085和此相关源.

请注意,命名空间中doc仍然可以使用常用的REPL功能user,但是在我的应用程序命名空间中将它放在我的指尖是很好的,至少在REPL中是这样.

mob*_*yte 11

获取doc到当前名字空间:

(clojure.core/use '[clojure.repl :only (doc)])
Run Code Online (Sandbox Code Playgroud)

然后再试doc一次.


Dav*_* J. 8

感谢clojure IRC的帮助,这里有一些选择:

  • clojure.repl/doc而不是doc
  • 用于(apply require clojure.main/repl-requires)docREPL功能和其他REPL功能引入新的命名空间.