I have an error in Clojure and leiningen command
Asked Answered
W

4

12

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}

Wilding answered 1/3, 2019 at 16:46 Comment(1)
What versions of Clojure and ragtime are you using?Kidnap
M
20

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.

Moten answered 14/3, 2019 at 23:58 Comment(3)
I can confirm that upgrading to 0.12.5 fixes the problem for me too.Aenea
I had this with Leiningen 2.9.1 and lein-uberwar "0.2.0" (which apparently was extracted from lein-ring). 0.2.1 had this fixed.Selfsupport
Leiningen 2.9.6 on Java 1.8.0_222 OpenJDK 64-Bit Server VM - lein-ring 0.12.5 fixes the issue for me as wellOintment
C
9

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
Ciro answered 4/3, 2019 at 9:30 Comment(2)
You're right, works perfect here event for autoexpect which is the same scenarioTimbered
In my case it was the lein-ring plugin instead. Updated to latest version, and it works.Cherilyncherilynn
T
0

Downgraded to 2.7.1 and it worked for me

Tortola answered 6/3, 2019 at 14:23 Comment(0)
V
-1

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.

Voluptuary answered 6/3, 2019 at 8:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.