Bit rot and leiningen?

266 views
Skip to first unread message

Simon Brooke

unread,
Feb 4, 2020, 8:17:49 AM2/4/20
to Clojure
Hi all

I recently wanted to do some work on a project of mine I've not worked on for more than a year, and found to my great surprise that it will no longer build. Full details of the bug are here, but the core seems to be:

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}
 at clojure.lang.Compiler.checkSpecs (Compiler.java:6971)

...

Caused by: clojure.lang.ExceptionInfo: Call to clojure.core/fn did not conform to spec.
#:clojure.spec.alpha{:problems ({:path [:fn-tail :arity-1 :params], :pred clojure.core/vector?, :val clojure.core.unify/var-unify, :via [:clojure.core.specs.alpha/params+body :clojure.core.specs.alpha/param-list :clojure.core.specs.alpha/param-list], :in [0]} {:path [:fn-tail :arity-n], :pred (clojure.core/fn [%] (clojure.core/or (clojure.core/nil? %) (clojure.core/sequential? %))), :val clojure.core.unify/var-unify, :via [:clojure.core.specs.alpha/params+body :clojure.core.specs.alpha/params+body], :in [0]}), :spec #object[clojure.spec.alpha$regex_spec_impl$reify__2509 0x7c214cc0 "clojure.spec.alpha$regex_spec_impl$reify__2509@7c214cc0"], :value (clojure.core.unify/var-unify [G__813 G__814 G__815 G__816] (clojure.core/if-let [vb__806__auto__ (G__816 G__814)] (clojure.core.unify/garner-unifiers G__813 vb__806__auto__ G__815 G__816) (clojure.core/if-let [vexpr__807__auto__ (clojure.core/and (G__813 G__815) (G__816 G__815))] (clojure.core.unify/garner-unifiers G__813 G__814 vexpr__807__auto__ G__816) (if (clojure.core.unify/occurs? G__813 G__814 G__815 G__816) (throw (java.lang.IllegalStateException. (clojure.core/str "Cycle found in the path " G__815))) (clojure.core.unify/bind-phase G__816 G__814 G__815))))), :args (clojure.core.unify/var-unify [G__813 G__814 G__815 G__816] (clojure.core/if-let [vb__806__auto__ (G__816 G__814)] (clojure.core.unify/garner-unifiers G__813 vb__806__auto__ G__815 G__816) (clojure.core/if-let [vexpr__807__auto__ (clojure.core/and (G__813 G__815) (G__816 G__815))] (clojure.core.unify/garner-unifiers G__813 G__814 vexpr__807__auto__ G__816) (if (clojure.core.unify/occurs? G__813 G__814 G__815 G__816) (throw (java.lang.IllegalStateException. (clojure.core/str "Cycle found in the path " G__815))) (clojure.core.unify/bind-phase G__816 G__814 G__815)))))}
 at clojure.spec.alpha$macroexpand_check.invokeStatic (alpha.clj:705)

...

No functions of mine occur anywhere in the stacktrace, but below all the clojure compiler functions I get to:

    clojure.lang.RestFn.invoke (RestFn.java:408)
    leiningen.core.utils$require_resolve.invokeStatic (utils.clj:102)
    leiningen.core.utils$require_resolve.invoke (utils.clj:95)
    leiningen.core.utils$require_resolve.invokeStatic (utils.clj:105)
    leiningen.core.utils$require_resolve.invoke (utils.clj:95)
    leiningen.core.main$lookup_task_var.invokeStatic (main.clj:69)
    leiningen.core.main$lookup_task_var.invoke (main.clj:65)
    leiningen.core.main$pass_through_help_QMARK_.invokeStatic (main.clj:79)
    leiningen.core.main$pass_through_help_QMARK_.invoke (main.clj:73)
    leiningen.core.main$task_args.invokeStatic (main.clj:82)
    leiningen.core.main$task_args.invoke (main.clj:81)
    leiningen.core.main$resolve_and_apply.invokeStatic (main.clj:339)
    leiningen.core.main$resolve_and_apply.invoke (main.clj:336)
    leiningen.core.main$_main$fn__6681.invoke (main.clj:452)
    leiningen.core.main$_main.invokeStatic (main.clj:442)
    leiningen.core.main$_main.doInvoke (main.clj:439)

The versions of Leiningen I am currently using are `Leiningen 2.9.1 on Java 1.8.0_242 OpenJDK 64-Bit Server VM` and `Leiningen 2.9.1 on Java 11.0.6 OpenJDK 64-Bit Server VM`; I don't recall the version I was using a year ago. None of the project dependencies have changed, I'm running with this project.clj, which certainly did build thirteen months ago.

My guess is that because my code has not changed, the version of Clojure used has not changed, and the dependencies have not changed, the only thing which is not controlled for is Leiningen. Has anyone else seen a problem like this, and if so how did you cure it?

James Reeves

unread,
Feb 4, 2020, 10:56:47 AM2/4/20
to clo...@googlegroups.com
This may be due to the plugins overriding a dependency that Leiningen itself needs. There was an issue like this logged with Lein-Ring, which I notice you're using. Try updating the Lein-Ring version to 0.12.5 and see if that fixes the issue.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/4ce229bf-99c0-4922-aca2-8f0565e7feb0%40googlegroups.com.


--
James Reeves

Alex Miller

unread,
Feb 4, 2020, 11:15:10 AM2/4/20
to Clojure
What you're seeing here is a spec failure on macro specs that have been added in Clojure 1.9+ (tighter checks on code, so basically identifying existing silently wrong code).  Note that lein is itself a Clojure program with plugins and running on it's own version of Clojure, which can change independently of your app.

I think James' suggestion is a good one (the underlying core.unify issue was fixed and released years ago).

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.


--
James Reeves

Simon Brooke

unread,
Feb 5, 2020, 4:59:25 AM2/5/20
to Clojure


On Tuesday, 4 February 2020 15:56:47 UTC, James Reeves wrote:
This may be due to the plugins overriding a dependency that Leiningen itself needs. There was an issue like this logged with Lein-Ring, which I notice you're using. Try updating the Lein-Ring version to 0.12.5 and see if that fixes the issue.

Thanks for this suggestion. Sadly, it doesn't help.

Simon Brooke

unread,
Feb 5, 2020, 5:16:40 AM2/5/20
to Clojure
OK, I beg your pardon. It seems you were right. Upgrading lein-ring to 0.12.5 and immediately doing a build did not work, but after a bit of tinkering a build did work, and the differences were:

-                 [com.stuartsierra/component "0.3.2"]
+                 [com.stuartsierra/component "0.4.0"]
-            [lein-ring "0.8.13" :exclusions [org.clojure/clojure]]]
+            [lein-ring "0.12.5" :exclusions [org.clojure/clojure]]]

As Alex Miller suggests, the problem is that something isn't conformant to spec, and it isn't something in my code since that runs under Clojure 1.8 (because I still haven't found a development environment I like better than LightTable). So it must be something in a leiningen plugin, so the change that worked must have been your change.

Many thanks!

Sean Corfield

unread,
Feb 5, 2020, 5:34:42 PM2/5/20
to clo...@googlegroups.com

> because I still haven't found a development environment I like better than LightTable

 

Have you looked at Atom/Chlorine recently? It has the same inline result display that LightTable had, it has a built-in ClojureScript REPL, support for Socket REPLs (in local and remote processes), and support for shadow-cljs if you’re in the ClojureScript world.

 

I used to use LightTable all the time but after it stopped being maintained I gave up on it and went back to Emacs for a while, then switched to Atom/ProtoREPL – until ProtoREPL stopped being maintained – and then to Atom/Chlorine where I’ve been extremely happy for over a year.

 

I’ve posted a few YouTube videos showing how I work with Atom/Chlorine and Cognitect’s REBL for data browsing/visualization: https://www.youtube.com/channel/UC8GD-smsEvNyRd3EZ8oeSrA

 

I have also have a repo of Atom/Chlorine customization/setup (mostly to enable the REBL integration I show in those videos): https://github.com/seancorfield/atom-chlorine-setup

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

--

You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.

Aditya Athalye

unread,
Feb 6, 2020, 3:16:01 AM2/6/20
to Clojure
On Thursday, February 6, 2020 at 4:04:42 AM UTC+5:30, Sean Corfield wrote:

> because I still haven't found a development environment I like better than LightTable

 

Have you looked at Atom/Chlorine recently? It has the same inline result display that LightTable had, it has a built-in ClojureScript REPL, support for Socket REPLs (in local and remote processes), and support for shadow-cljs if you’re in the ClojureScript world.

 

I used to use LightTable all the time but after it stopped being maintained I gave up on it and went back to Emacs for a while, then switched to Atom/ProtoREPL – until ProtoREPL stopped being maintained – and then to Atom/Chlorine where I’ve been extremely happy for over a year.


Going a bit OT for this thread because LightTable came up here a couple of times in context of bitrot.

Pratik Karki, who took on LightTable's maintainership, is scheduled to speak about the IDE at IN/Clojure (https://inclojure.org) next week.

Incidentally, Bozhidar is also going to speak and his subject is the Future of Clojure tooling.

As an Emacs/Prelude/CIDER user who also _really_ like LightTable, I dearly hope their futures are promising.

May the Source be with us,
- Aditya

Simon Brooke

unread,
Feb 6, 2020, 9:11:18 AM2/6/20
to Clojure


On Wednesday, 5 February 2020 22:34:42 UTC, Sean Corfield wrote:

> because I still haven't found a development environment I like better than LightTable

 

Have you looked at Atom/Chlorine recently? It has the same inline result display that LightTable had, it has a built-in ClojureScript REPL, support for Socket REPLs (in local and remote processes), and support for shadow-cljs if you’re in the ClojureScript world.


Thanks for this; the answer is, no I haven't, but I shall.
 

 

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to


For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email to clo...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages