【问题标题】:Geting error using seesaw on the lein repl在 lein repl 上使用跷跷板时出错
【发布时间】:2015-07-26 01:16:30
【问题描述】:

尝试通过 this tutorial 获取跷跷板 gui 库时,我在运行 lein repl 时收到以下错误。 任何想法是什么问题以及如何解决它?

Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar 
WARNING!!! version ranges found for:
[seesaw "1.4.2" :exclusions [org.clojure/tools.trace]] -> [j18n "1.0.1"] -> [org.clojure/clojure "[1.2,1.5)"]
Consider using [seesaw "1.4.2" :exclusions [org.clojure/clojure org.clojure/tools.trace]].
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar 
Error loading cider.nrepl.middleware.apropos: java.lang.RuntimeException: Unable to resolve symbol: some-> in this context, compiling:(cider/nrepl/middleware/util/cljs.clj:57)
Error loading cider.nrepl.middleware.classpath: java.lang.RuntimeException: Unable to resolve symbol: response-for in this context, compiling:(cider/nrepl/middleware/classpath.clj:15)
Error loading cider.nrepl.middleware.complete: java.lang.RuntimeException: Unable to resolve symbol: some-> in this context, compiling:(cider/nrepl/middleware/util/cljs.clj:57)
Error loading cider.nrepl.middleware.debug: java.lang.RuntimeException: Unable to resolve symbol: some-> in this context, compiling:(cider/nrepl/middleware/util/cljs.clj:57)
Error loading cider.nrepl.middleware.format: java.lang.RuntimeException: Unable to resolve symbol: defprotocol+ in this context, compiling:(deps/cljfmt/v0v1v10/deps/rewrite_clj/v0v4v12/rewrite_clj/node/protocols.clj:9)
Error loading cider.nrepl.middleware.info: java.lang.RuntimeException: Unable to resolve symbol: some-> in this context, compiling:(cider/nrepl/middleware/util/cljs.clj:57)
Error loading cider.nrepl.middleware.inspect: java.lang.RuntimeException: Unable to resolve symbol: some-> in this context, compiling:(cider/nrepl/middleware/util/cljs.clj:57)
Error loading cider.nrepl.middleware.macroexpand: java.lang.RuntimeException: Unable to resolve symbol: response-for in this context, compiling:(cider/nrepl/middleware/macroexpand.clj:73)
Error loading cider.nrepl.middleware.ns: java.lang.RuntimeException: Unable to resolve symbol: some-> in this context, compiling:(cider/nrepl/middleware/util/cljs.clj:57)
Error loading cider.nrepl.middleware.pprint: java.lang.RuntimeException: Unable to resolve symbol: some-> in this context, compiling:(cider/nrepl/middleware/util/cljs.clj:57)
Error loading cider.nrepl.middleware.refresh: java.lang.RuntimeException: Unable to resolve symbol: some-> in this context, compiling:(cider/nrepl/middleware/util/cljs.clj:57)
Error loading cider.nrepl.middleware.resource: java.lang.RuntimeException: Unable to resolve symbol: defsource in this context, compiling:(deps/compliment/v0v2v4/compliment/sources/resources.clj:42)
Error loading cider.nrepl.middleware.stacktrace: java.lang.RuntimeException: Unable to resolve symbol: some-> in this context, compiling:(cider/nrepl/middleware/util/cljs.clj:57)
Error loading cider.nrepl.middleware.test: java.lang.RuntimeException: Unable to resolve symbol: some-> in this context, compiling:(cider/nrepl/middleware/util/cljs.clj:57)
Error loading cider.nrepl.middleware.trace: java.lang.RuntimeException: Unable to resolve symbol: response-for in this context, compiling:(cider/nrepl/middleware/trace.clj:16)
Error loading cider.nrepl.middleware.undef: java.lang.RuntimeException: Unable to resolve symbol: response-for in this context, compiling:(cider/nrepl/middleware/undef.clj:19)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: cider.nrepl.middleware.apropos/wrap-apropos in this context, compiling:(/tmp/form-init2232335588436189028.clj:1)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6416)
    at clojure.lang.Compiler.analyze(Compiler.java:6216)
    at clojure.lang.Compiler.analyze(Compiler.java:6177)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3503)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6411)
    at clojure.lang.Compiler.analyze(Compiler.java:6216)
    at clojure.lang.Compiler.analyze(Compiler.java:6177)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3503)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6411)
    at clojure.lang.Compiler.analyze(Compiler.java:6216)
    at clojure.lang.Compiler.access$100(Compiler.java:37)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5837)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6409)
    at clojure.lang.Compiler.analyze(Compiler.java:6216)
    at clojure.lang.Compiler.analyze(Compiler.java:6177)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5572)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5008)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3629)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6407)
    at clojure.lang.Compiler.analyze(Compiler.java:6216)
    at clojure.lang.Compiler.eval(Compiler.java:6462)
    at clojure.lang.Compiler.eval(Compiler.java:6455)
    at clojure.lang.Compiler.eval(Compiler.java:6455)
    at clojure.lang.Compiler.load(Compiler.java:6902)
    at clojure.lang.Compiler.loadFile(Compiler.java:6863)
    at clojure.main$load_script.invoke(main.clj:282)
    at clojure.main$init_opt.invoke(main.clj:287)
    at clojure.main$initialize.invoke(main.clj:315)
    at clojure.main$null_opt.invoke(main.clj:348)
    at clojure.main$main.doInvoke(main.clj:426)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:405)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:518)
    at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: cider.nrepl.middleware.apropos/wrap-apropos in this context
    at clojure.lang.Util.runtimeException(Util.java:156)
    at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:613)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6409)
    ... 34 more**

【问题讨论】:

  • 寻求调试帮助的问题(“为什么这段代码不起作用?”)必须包含 (...) 重现 问题本身所需的最短代码.
  • 这看起来可能是苹果酒的问题。尝试删除 cider 和 Java 代理,然后重试。
  • @DanielCompton:我怎样才能删除苹果酒和 java 代理?再试一次?
  • 删除对 Cider 的依赖,可能从您的 profile.clj 中删除,并且在运行程序时不要使用 Java 代理。
  • @DanielCompton 哪一行是苹果酒部门?这是我的 project.clj:(defproject sisaw "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.6.0"] [seesaw "1.4.2-SNAPSHOT"]]),不使用 java 代理是什么意思?在我上面提到的教程中,所有测试都在 repl 中进行

标签: clojure leiningen


【解决方案1】:

你有这个错误:

Unable to resolve symbol: some->

some-> 一直是added in clojure 1.5

您在评论中写的project.clj(您应该通过编辑它来添加问题...将其留在 cmets 中几乎无法阅读并且对可能愿意帮助您的人怀有敌意)是:

(defproject sisaw "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url  "http://www.eclipse.org/legal/epl-v10.html"}  
  :dependencies [[org.clojure/clojure "1.6.0"         ]
                 [seesaw              "1.4.2-SNAPSHOT"]])

seesaw 显然是基于 clojure 1.4 [1] [2]

莱宁根告诉你:

警告!!!找到的版本范围: [seesaw "1.4.2"] -> [j18n "1.0.1"] -> [org.clojure/clojure "[1.2,1.5)"] 考虑使用 [seesaw "1.4.2" :exclusions [org.clojure/clojure]]

我理解[1.2,1.5) 的意思是从 1.2 到 1.5 的范围,其中包括 1.2,不包括 1.5

这意味着 seesaw 的传递依赖会阻止您将 clojure 1.5 作为依赖项

Leiningen 建议在您的依赖项中使用[seesaw "1.4.2" :exclusions [org.clojure/clojure]],以便版本解析将选择其他地方指定的版本(在本例中是在您的 project.clj 中)并忽略/排除源自跷跷板(传递)依赖项的版本

我不知道这是否是你唯一的问题,但它至少应该部分解释它

【讨论】:

    猜你喜欢
    • 2012-08-20
    • 1970-01-01
    • 2016-05-31
    • 1970-01-01
    • 2014-03-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多