0
昨天開始使用Clojure。 我不能讓周圍的模塊系統是如何工作的:澄清在包中使用ns
- 我已經安裝了草書
- 我創建了一個項目之後的leiningen模板
- 我有兩個Clojure的文件
/src/clojure_first_steps
core.clj
(ns clojure-first-steps.core)
(:require [clojure-first-steps.utils :refer :all])
(defn run-other-foo
(foo-2 ["hello"]))
utils.clj
(ns clojure-first-steps.utils)
(defn foo-2 [x] (x))
雖然 'LEIN編譯' 沒有probs運行, 'LEIN測試' 編譯失敗上 (:require [clojure-first-steps.utils :refer :all])
,測試之中:
(ns clojure-first-steps.core-test
(:require [clojure.test :refer :all]
[clojure-first-steps.core :refer :all]))
(deftest a-test
(testing "I can access dependecies from another module"
(is (= "hello" (run-other-foo)))))
該錯誤消息是java.lang.ClassNotFoundException: clojure-first-steps.utils
編輯:項目樹
.
├── CHANGELOG.md
├── clojure_first_steps.iml
├── doc
│ └── intro.md
├── LICENSE
├── project.clj
├── README.md
├── resources
├── src
│ ├── clojure_first_steps
│ │ ├── core.clj
│ │ └── utils.clj
├── target
│ ├── classes
│ │ └── META-INF
│ │ └── maven
│ │ └── clojure_first_steps
│ │ └── clojure_first_steps
│ │ └── pom.properties
│ ├── repl-port
│ └── stale
│ └── leiningen.core.classpath.extract-native-dependencies
└── test
├── clojure_first_steps
│ └── core_test.clj
你可以在項目目錄中顯示'tree .'的輸出嗎? –