我有一个小项目~/src/proj/{foo,bar}.clj
,我正在使用 emacs、苹果酒和 nREPL 进行黑客攻击。在bar.clj
我做(def base-13-joke 42)
,我希望代码foo.clj
引用bar.clj
's base-13-joke
。我该怎么做呢?
我当前的类路径(带~/src/proj
= /jonas/src/mine/code/move-the-box
)
/home/jonas/src/mine/code/move-the-box/target/classes
/home/jonas/.m2/repository/cider/cider-nrepl/0.11.0/cider-nrepl-0.11.0.jar
/home/jonas/.m2/repository/org/tcrawley/dynapath/0.2.3/dynapath-0.2.3.jar
/home/jonas/.m2/repository/org/clojure/tools.nrepl/0.2.12/tools.nrepl-0.2.12.jar
/home/jonas/.m2/repository/clojure-complete/clojure-complete/0.2.4/clojure-complete-0.2.4.jar
/home/jonas/.m2/repository/org/clojure/clojure/1.8.0/clojure-1.8.0.jar
/usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar
我试过(add-classpath "file:///jonas/src/mine/code/move-the-box")
which 似乎没有效果,以及(cider.nrepl.middleware.util.java/add-classpath! "file:///home/jonas/src/mine/code/move-the-box")
which throws IllegalArgumentException array element type mismatch java.lang.reflect.Array.set (Array.java:-2)
。那里发生了什么事?