clojureleiningenliberator

Clojure, fresh install: Unable to resolve symbol: some->


I just installed the latest version of Clojure, and while following the tutorial for Liberator (http://clojure-liberator.github.io/liberator/tutorial/getting-started.html), I get the following exception:

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.

I'm on Ubuntu 15.04. Leiningen verison 2.5.3. Java version 1.7.0_91.

Lein Repl works just fine, and while it understands (some ...), it can't resolve (some-> ...)

I've been searching for hours, and it looks like some-> should be a standard function for Clojure v1.5+

Why don't I have it?


Solution

  • From the tutorial link, the project.clj is:

    (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"]])
    

    So you are running with Clojure 1.4.0. Try changing it to 1.7.0 or so.