/ / Fehlendes Dokument in Nicht-Benutzer-Namespaces in Clojure 1.5 - clojure, clojure-repl

Fehlendes Dokument in Nicht-Benutzer-Namespaces in Clojure 1.5 - clojure, clojure-repl

Was soll ich tun? doc wieder verfügbar

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)

Diese Änderung kommt von CLJ-1085 und das zugehörige Quelle.

Beachten Sie, dass doc und die übliche REPL-Funktionalität ist weiterhin in verfügbar user Namespace, aber es wäre schön, wenn Sie es zumindest in der REPL im Namensraum meiner App haben.

Antworten:

11 für die Antwort № 1

Bekommen doc in den aktuellen Namespace:

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

Und danach versuchen doc nochmal.


8 für die Antwort № 2

Dank der Hilfe von clojure IRC sind hier einige Optionen:

  • benutzen clojure.repl/doc Anstatt von doc
  • benutzen (apply require clojure.main/repl-requires) bringen doc und andere REPL-Funktionen in einen neuen Namensraum.