Clojure,全新安装:无法解析符号:some->
Clojure, fresh install: Unable to resolve symbol: some->
我刚刚安装了最新版本的 Clojure,在按照 Liberator (http://clojure-liberator.github.io/liberator/tutorial/getting-started.html) 的教程进行操作时,出现以下异常:
Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: some-> in this context, compiling:(clout/core.clj:88)
at clojure.lang.Compiler.analyze(Compiler.java:6281)
at clojure.lang.Compiler.analyze(Compiler.java:6223)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3497)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6457)
at clojure.lang.Compiler.analyze(Compiler.java:6262)
... ...
Caused by: java.lang.RuntimeException: Unable to resolve symbol: some-> in this context
at clojure.lang.Util.runtimeException(Util.java:170)
at clojure.lang.Compiler.resolveIn(Compiler.java:6766)
at clojure.lang.Compiler.resolve(Compiler.java:6710)
at clojure.lang.Compiler.analyzeSymbol(Compiler.java:6671)
at clojure.lang.Compiler.analyze(Compiler.java:6244)
... 114 more
Tests failed.
我在 Ubuntu 15.04。莱宁根版本 2.5.3。 Java 版本 1.7.0_91.
Lein Repl 工作正常,虽然它理解 (some ...)
,但无法解析 (some-> ...)
找了好几个小时,看来some->
应该是Clojure v1.5+的标准函数
为什么我没有?
根据教程 link,project.clj 是:
(defproject liberator-tutorial "0.1.0-SNAPSHOT"
:plugins [[lein-ring "0.8.11"]]
:ring {:handler liberator-tutorial.core/handler}
:dependencies [[org.clojure/clojure "1.4.0"] ;; <-!!!!!!!!!!!!!!!!
[liberator "0.13"]
[compojure "1.3.4"]
[ring/ring-core "1.2.1"]])
所以你是 运行 Clojure 1.4.0。尝试将其更改为 1.7.0 左右。
我刚刚安装了最新版本的 Clojure,在按照 Liberator (http://clojure-liberator.github.io/liberator/tutorial/getting-started.html) 的教程进行操作时,出现以下异常:
Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: some-> in this context, compiling:(clout/core.clj:88)
at clojure.lang.Compiler.analyze(Compiler.java:6281)
at clojure.lang.Compiler.analyze(Compiler.java:6223)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3497)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6457)
at clojure.lang.Compiler.analyze(Compiler.java:6262)
... ...
Caused by: java.lang.RuntimeException: Unable to resolve symbol: some-> in this context
at clojure.lang.Util.runtimeException(Util.java:170)
at clojure.lang.Compiler.resolveIn(Compiler.java:6766)
at clojure.lang.Compiler.resolve(Compiler.java:6710)
at clojure.lang.Compiler.analyzeSymbol(Compiler.java:6671)
at clojure.lang.Compiler.analyze(Compiler.java:6244)
... 114 more
Tests failed.
我在 Ubuntu 15.04。莱宁根版本 2.5.3。 Java 版本 1.7.0_91.
Lein Repl 工作正常,虽然它理解 (some ...)
,但无法解析 (some-> ...)
找了好几个小时,看来some->
应该是Clojure v1.5+的标准函数
为什么我没有?
根据教程 link,project.clj 是:
(defproject liberator-tutorial "0.1.0-SNAPSHOT"
:plugins [[lein-ring "0.8.11"]]
:ring {:handler liberator-tutorial.core/handler}
:dependencies [[org.clojure/clojure "1.4.0"] ;; <-!!!!!!!!!!!!!!!!
[liberator "0.13"]
[compojure "1.3.4"]
[ring/ring-core "1.2.1"]])
所以你是 运行 Clojure 1.4.0。尝试将其更改为 1.7.0 左右。