Clojure (use';korma.db)指令有什么问题?

Clojure (use';korma.db)指令有什么问题?,clojure,leiningen,korma,Clojure,Leiningen,Korma,当我尝试使用lein和以下非常简单的Clojure测试文件创建一个uberjar时,我得到了一个错误 Compiling korma-test.core Exception in thread "main" java.lang.Exception: lib names inside prefix lists must not contain periods, compiling:(core.clj:1:1) 也不知道为什么。我从的docs部分获得了(使用'korma.db),并尝试了requ

当我尝试使用lein和以下非常简单的Clojure测试文件创建一个uberjar时,我得到了一个错误

Compiling korma-test.core
Exception in thread "main" java.lang.Exception: 
lib names inside prefix lists must not contain periods, compiling:(core.clj:1:1)
也不知道为什么。我从的docs部分获得了
(使用'korma.db)
,并尝试了require语句(这里的示例中没有列出)

project.clj

(defproject korma-test "0.1.0-SNAPSHOT"
  :description "korma db test"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [korma "0.3.0-RC5"]]
   :main korma-test.core)
core.clj(简化)


ns
宏使用关键字代替函数,并使用带引号的参数

(ns korma-test.core
  ...
  (:use korma.db)
  (:require [clojure.string :as str])
  ...)

这里有一个很好的描述:

宏使用关键字代替函数,并使用引用的参数

(ns korma-test.core
  ...
  (:use korma.db)
  (:require [clojure.string :as str])
  ...)

这里有一个很好的说明:

我还建议不要使用
use
,因为您永远无法确定它在名称空间中导入了什么。改为使用
require
:require[korma.db:as db]
)。同意,或者使用
:only
指令和
Use
来指定。宾果!非常感谢。我还建议不要使用
use
,因为您永远无法确定它在名称空间中导入了什么。改为使用
require
:require[korma.db:as db]
)。同意,或者使用
:only
指令和
Use
来指定。宾果!非常感谢。的部分副本,但这里有两处语法错误,而不仅仅是报价问题。如果您愿意,我将投票关闭。请让我知道。我不想把事情搞得一团糟。的部分重复,但这里有两处语法错误,而不仅仅是报价问题。如果你愿意,我将投票结束。请让我知道。我不想把事情搞得一团糟。