Nandu Nandan
Nandu Nandan

Reputation: 121

I have an error in Clojure and leiningen command

I am working on a project in Clojure. I tried to migrate my latest DB commit to my local using the command

PROFILE=dev lein ragtime migrate

Getting this error:

clojure.lang.Compiler$CompilerException: Syntax error macroexpanding clojure.core/fn at (clojure/core/unify.clj:83:18).

:clojure.error{:phase :macro-syntax-check, :line 83, :column 18, :source "clojure/core/unify.clj", :symbol clojure.core/fn}

Upvotes: 12

Views: 3299

Answers (4)

David Ongaro
David Ongaro

Reputation: 3946

I also encountered this issue with Leiningen 2.9.1. In my case it turned out to occur due to the lein-ring plugin which depends on an outdated unify version. The issue is already fixed in the newest lein-ring version though: https://github.com/weavejester/lein-ring/issues/203. So upgrading lein-ring to 0.12.5 fixed it for me.

Upvotes: 20

Neethu Mohandas
Neethu Mohandas

Reputation: 63

Downgraded to 2.7.1 and it worked for me

Upvotes: 0

Ivan Grishaev
Ivan Grishaev

Reputation: 1679

Maybe your project.clj is malformed. I wonder where the ragtime command comes from? It seems that the previous developer implemented their own plugin for ragtime integration because it differs from the way suggested in the official wiki. It would be nice if you share some bits of your project.clj as well as the code that provides the connection b/w ragtime and lein.

Upvotes: -1

August Lilleaas
August Lilleaas

Reputation: 54603

I'm not 100% sure what this issue is, but it seems to be related to leiningen 2.9.x.

At first, I ran leiningen v 2.8.x (don't remember which version exactly). Then everything worked fine.

Then I updated leiningen to 2.9.1, and I got this error the next time I tried to build with leiningen.

We then updated ring from version 1.4.0 to 1.7.1, and the error disappeared.

Alternatively, if you have to use an old version of a library, the only fix seems to be to downgrade to leiningen 2.8:

lein upgrade 2.8.3

Upvotes: 9

Related Questions