Error loading core.typed clojure/tools/analyzer

133 views
Skip to first unread message

Brendan Tobolaski

unread,
Jun 22, 2015, 9:08:23 PM6/22/15
to clojure-c...@googlegroups.com
I just added core.typed to a new project and I'm having trouble getting it to load. If I try to do something simple in the repl like 

(t/cf 1)
Initializing core.typed ...

CompilerException java.io.FileNotFoundException: Could not locate clojure/tools/analyzer/env__init.class or clojure/tools/analyzer/env.clj on classpath., compiling:(clojure/core/typed/analyze_clj.clj:1:1)

This particular project is using clojure 1.7.0-RC2 and I'm trying to add core.typed 0.3.0-alpha5 but I've tried various combinations clojure 1.6.0 and 1.7.0-RC2 and core.typed 0.3.0-alpha5 and 0.2.92 and I get the same error. As I'm relatively new to both clojure and core.typed, I'm not sure what I should do to fix this. I've tried adding org.clojure/tools.analyzer 0.6.6 to my project's dependencies but then I get a 

#<CompilerException java.lang.IllegalAccessError: resolve-var does not exist, compiling:(clojure/tools/analyzer/jvm.clj:1:1)>

Any help would be greatly appreciated.

Ambrose Bonnaire-Sergeant

unread,
Jun 22, 2015, 11:16:14 PM6/22/15
to core.typed
Hi,

Can you send the results of `lein deps :tree` please?

Aside: I definitely need to upgrade tools.analyzer, but starting to think I need to embed the entire thing
in the core.typed source to avoid conflicts.

Thanks,
Ambrose

Brendan Tobolaski

unread,
Jun 23, 2015, 5:54:36 AM6/23/15
to clojure-c...@googlegroups.com
Well that clears up why I'm running into an issue.

Possibly confusing dependencies found:
[org.clojure/core.async "0.1.346.0-17112a-alpha"] -> [org.clojure/tools.analyzer.jvm "0.1.0-beta12"]
 overrides
[org.clojure/core.typed "0.3.0-alpha5"] -> [org.clojure/tools.analyzer.jvm "0.3.0"]

Consider using these exclusions:
[org.clojure/core.typed "0.3.0-alpha5" :exclusions [org.clojure/tools.analyzer.jvm]]

[org.clojure/core.async "0.1.346.0-17112a-alpha"] -> [org.clojure/tools.analyzer.jvm "0.1.0-beta12"] -> [org.clojure/tools.analyzer "0.1.0-beta12"]
 overrides
[org.clojure/core.typed "0.3.0-alpha5"] -> [org.clojure/tools.analyzer.jvm "0.3.0"] -> [org.clojure/tools.analyzer "0.3.0"]

Consider using these exclusions:
[org.clojure/core.typed "0.3.0-alpha5" :exclusions [org.clojure/tools.analyzer]]

 [clojure-complete "0.2.3" :scope "test" :exclusions [[org.clojure/clojure]]]
 [com.taoensso/timbre "4.0.1"]
   [com.taoensso/encore "1.37.0"]
   [io.aviso/pretty "0.1.18"]
 [org.clojure/clojure "1.7.0-RC2"]
 [org.clojure/core.async "0.1.346.0-17112a-alpha"]
   [org.clojure/tools.analyzer.jvm "0.1.0-beta12"]
     [org.clojure/core.memoize "0.5.6"]
     [org.clojure/tools.analyzer "0.1.0-beta12"]
     [org.ow2.asm/asm-all "4.1"]
 [org.clojure/core.typed "0.3.0-alpha5"]
   [org.clojure/core.cache "0.6.4"]
     [org.clojure/data.priority-map "0.0.4"]
   [org.clojure/core.contracts "0.0.4" :exclusions [[org.clojure/clojure]]]
     [org.clojure/core.unify "0.5.3"]
   [org.clojure/core.typed.rt "0.3.0-alpha5"]
   [org.clojure/jvm.tools.analyzer "0.6.1" :exclusions [[org.clojure/clojurescript]]]
   [org.clojure/math.combinatorics "0.1.1" :exclusions [[org.clojure/clojure]]]
   [org.clojure/tools.namespace "0.2.5"]
   [org.clojure/tools.reader "0.9.2"]
 [org.clojure/tools.nrepl "0.2.6" :scope "test" :exclusions [[org.clojure/clojure]]]
 [org.julienxx/clj-slack "0.4.3"]
   [http-kit "2.1.16"]
 [slack-rtm "0.1.0"]
   [org.clojure/data.json "0.2.5"]
   [stylefruits/gniazdo "0.3.1"]
     [org.eclipse.jetty.websocket/websocket-client "9.3.0.M1"]
       [org.eclipse.jetty.websocket/websocket-common "9.3.0.M1"]
         [org.eclipse.jetty.websocket/websocket-api "9.3.0.M1"]
       [org.eclipse.jetty/jetty-io "9.3.0.M1"]
       [org.eclipse.jetty/jetty-util "9.3.0.M1"]

 
I've reversed the suggestion and added:

[org.clojure/core.async "0.1.346.0-17112a-alpha" :exclusions [org.clojure/tools.analyzer.jvm]]

Which allows core.typed to work and I've done some testing and core.async appears to keep working for my use case. It appears that this has been resolved in the master branch of core.async but there hasn't been a release.

Ambrose Bonnaire-Sergeant

unread,
Jun 23, 2015, 8:17:48 AM6/23/15
to core.typed
Yes, waiting patiently for a core.async release.

Thanks,
Ambrose

Ambrose Bonnaire-Sergeant

unread,
Nov 30, 2015, 5:12:44 PM11/30/15
to core.typed
To close this thread, core.async now has updated its tools.analyzer dependency, so upgrading core.async will fix this error.

Thanks,
Ambrose
Reply all
Reply to author
Forward
0 new messages