Clojure / Core.Async Dependency Issues

275 views
Skip to first unread message

Timothy Washington

unread,
Jul 31, 2014, 1:29:18 PM7/31/14
to clo...@googlegroups.com
I'm trying the latest clojure and core.async releases on a fresh project (lein new thing). 

(defproject thing "0.1.0-SNAPSHOT" 
  :description "FIXME: write description" 
  ...
  :dependencies [[org.clojure/clojure "1.6.0"] 
                        [org.clojure/core.async "0.1.303.0-886421-alpha"]])

But I get a RuntimeException: "No such var: clojure.core.cache/through". 

user> (require '[clojure.core.async :as async :refer :all])
CompilerException java.lang.RuntimeException: No such var: clojure.core.cache/through, compiling:(clojure/core/memoize.clj:52:3)
user>
user> (pst *e)
CompilerException java.lang.RuntimeException: No such var: clojure.core.cache/through, compiling:(clojure/core/memoize.clj:52:3)
        clojure.lang.Compiler.analyze (Compiler.java:6464)
        clojure.lang.Compiler.analyze (Compiler.java:6406)
        clojure.lang.Compiler$InvokeExpr.parse (Compiler.java:3665)
        ...
        clojure.lang.Compiler.analyzeSeq (Compiler.java:6632)
Caused by:
RuntimeException No such var: clojure.core.cache/through
        ...
        clojure.lang.Compiler.analyze (Compiler.java:6406)
nil
user>


After looking around (see here), I've tried a few things including different core.async versions, and including core.cache directly (see below). But no dice. Umm, I'm sure there's a simple fix for this? 

(defproject thing "0.1.0-SNAPSHOT" 
  :description "FIXME: write description" 
  ...
  :dependencies [[org.clojure/clojure "1.6.0"] 
                        [org.clojure/core.cache "0.6.3"] 
                        [org.clojure/core.memoize "0.5.6" :exclusions [org.clojure/core.cache]]])


(defproject thing "0.1.0-SNAPSHOT" 
  :description "FIXME: write description" 
  ...
  :dependencies [[org.clojure/clojure "1.6.0"] 
                        [org.clojure/core.cache "0.6.3"] 
                        [org.clojure/core.memoize "0.5.6"] 
                        [org.clojure/core.async "0.1.303.0-886421-alpha"]])


Thanks 

Tim Washington 

Timothy Washington

unread,
Jul 31, 2014, 2:12:25 PM7/31/14
to clo...@googlegroups.com
Ok, I knocked this one off. It was a leiningen import in my ~/.lein/profiles.clj (used by vinyasa). So turning that off fixed the problem. I'll have to get more surgical in my exclusions, But hopefully this helps someone in future. 

  :dependencies [[nrepl-inspect "0.4.1"]
                 [ritz/ritz-nrepl-middleware "0.7.0"]

                 [com.cemerick/pomegranate "0.3.0"]
                 ;;[com.cemerick/piggieback "0.1.3"]
                 ;;[leiningen #= (leiningen.core.main/leiningen-version)]
                 ;;[im.chit/vinyasa "0.2.0"]
                 [org.clojars.gjahad/debug-repl "0.3.3"]]
  #_:injections #_[(require '[vinyasa.inject :as inj])
               (require 'alex-and-georges.debug-repl)
               (inj/inject 'clojure.core '>
                           '[[alex-and-georges.debug-repl debug-repl]

                             [vinyasa.inject inject]
                             [vinyasa.pull pull]
                             [vinyasa.lein lein]
                             [vinyasa.reimport reimport]

                             [cemerick.pomegranate add-classpath get-classpath resources]
                             [clojure.java.io resource]
                             [clojure.tools.namespace.repl refresh]
                             [clojure.repl apropos dir doc find-doc source pst
                              [root-cause >cause]]

                             [clojure.pprint pprint pp]])]

Tim Washington 

Timothy Baldridge

unread,
Jul 31, 2014, 3:15:28 PM7/31/14
to clo...@googlegroups.com
I've seen this error before, but I would like to mention that I think some odd interplay between lein, some plugin and core.async is causing this. Like you I was able to get this error to go away by removing a plugin from my .profile file. Not sure what causes this, but core.async doesn't use core.cache, so I'm not sure what's causing this. 


--
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.
For more options, visit https://groups.google.com/d/optout.



--
“One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.”
(Robert Firth)

Sam Ritchie

unread,
Jul 31, 2014, 3:49:07 PM7/31/14
to clo...@googlegroups.com
I've seen that too. Here's the line from my project.clj:

          ;; This is required to get around this strange bug with
          ;; core.memoize:
          ;; https://github.com/Kodowa/Light-Table-Playground/issues/794
          [org.clojure/core.memoize "0.5.6"]

July 31, 2014 at 11:28 AM
--
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.
For more options, visit https://groups.google.com/d/optout.

--
Sam Ritchie (@sritchie)

Sean Corfield

unread,
Jul 31, 2014, 6:59:15 PM7/31/14
to clo...@googlegroups.com
I've seen several people report this problem when using vinyasa and I've run into this once myself (I don't remember what caused it, but it was some other plugin that pulled in an old core.cache version).

Sean
signature.asc
Reply all
Reply to author
Forward
0 new messages