0

I'm having a boot-clj project with the below dependencies,

 :dependencies   '[[org.clojure/clojure "RELEASE"]
                            [adzerk/boot-test "RELEASE" :scope "test"]]

Under that project, I'm running boot repl and trying to experiment with clojure.spec.

As a first step, I tried importing the required dependency using

(require '[clojure.spec.alpha :as s])

While doing so, I'm getting the below error,

  java.lang.IllegalStateException: Attempting to call unbound fn: #'clojure.core/ident? 

java.lang.ExceptionInInitializerError:

What does it mean? And how to fix it?

Kannan Ramamoorthy
  • 3,980
  • 9
  • 45
  • 63

2 Answers2

2

I missed noting the below error when running boot repl,

Classpath conflict: org.clojure/clojure version 1.8.0 already loaded, NOT loading version 1.10.1

As suggested here, I had to add boot.properties with the content BOOT_CLOJURE_VERSION=1.10.1 to get it resolved.

Clarifying that, its no wonder that spec didn't work in the above REPL, because spec expects Clojure 1.9.0 or higher.

And the reason of the error might be that clojure.core/ident? is not available in 1.8.0

Kannan Ramamoorthy
  • 3,980
  • 9
  • 45
  • 63
1

Try the following:

[org.clojure/clojure "1.10.1"]
[adzerk/boot-test "1.2.0"]

Using "RELEASE" instead of a concrete version number is problematic since it leads to non-repeatable builds.

I would also recommend occasional use of lein-ancient to notify you when the version of a dependency needs to be updated.

https://github.com/xsc/lein-ancient


You can find more information here:

Alan Thompson
  • 29,276
  • 6
  • 41
  • 48
  • "deprecated" implies this was previously a thing, but "RELEASE" (or "LATEST") has never been a supported feature of deps.edn as it prevents you from creating a fixed set of deps (and thus breaks the cache). – Alex Miller Aug 22 '19 at 18:07
  • 'Deprecated' doesn't explain the reason of that error. – Kannan Ramamoorthy Aug 22 '19 at 18:43