【问题标题】:lein jack-in and lein swank don't work after upgrading leiningen to version 1.7.0将 leiningen 升级到 1.7.0 版后,lein jack-in 和 lein swank 不起作用
【发布时间】:2012-02-23 19:45:51
【问题描述】:

我已经升级了我的 leiningen 版本(之前我使用的是 1.4)。我的粘液版本也是最新的。现在,当我输入 lein jack-in <port>lein swank 时,我得到了:

lein jack-in 9090
;;; Bootstrapping bundled version of SLIME; please wait...


(when (not (featurep 'slime-cdf283b4))
               (if (file-readable-p "C:\Documents and Settings\Carlos/.emacs.d/swank/slime-cdf283b4.elc")
                 (load-file "C:\Documents and Settings\Carlos/.emacs.d/swank/slime-cdf283b4.elc")
               (byte-compile-file "C:\Documents and Settings\Carlos/.emacs.d/swank/slime-cdf283b4.el" t)))
(when (not (featurep 'slime-frame-colors-a24dd450))
               (if (file-readable-p "C:\Documents and Settings\Carlos/.emacs.d/swank/slime-frame-colors-a24dd450.elc")
                 (load-file "C:\Documents and Settings\Carlos/.emacs.d/swank/slime-frame-colors-a24dd450.elc")
               (byte-compile-file "C:\Documents and Settings\Carlos/.emacs.d/swank/slime-frame-colors-a24dd450.el" t)))
(when (not (featurep 'slime-repl-79b38c83))
               (if (file-readable-p "C:\Documents and Settings\Carlos/.emacs.d/swank/slime-repl-79b38c83.elc")
                 (load-file "C:\Documents and Settings\Carlos/.emacs.d/swank/slime-repl-79b38c83.elc")
               (byte-compile-file "C:\Documents and Settings\Carlos/.emacs.d/swank/slime-repl-79b38c83.el" t)))
(when (not (featurep 'slime-eldoc-d8b3cf74))
               (if (file-readable-p "C:\Documents and Settings\Carlos/.emacs.d/swank/slime-eldoc-d8b3cf74.elc")
                 (load-file "C:\Documents and Settings\Carlos/.emacs.d/swank/slime-eldoc-d8b3cf74.elc")
               (byte-compile-file "C:\Documents and Settings\Carlos/.emacs.d/swank/slime-eldoc-d8b3cf74.el" t)))
(sleep-for 0.1)
(run-hooks 'slime-load-hook) ; on port 9090
Warning: *log-events* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *log-events* or change the name.
Warning: *log-output* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *log-output* or change the name.
Warning: *namespace-re* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *namespace-re* or change the name.
    Warning: *current-connection* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *current-connection* or change the name.
    Warning: *default-encoding* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *default-encoding* or change the name.
    Warning: *pre-reply-hook* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *pre-reply-hook* or change the name.
Warning: *pre-reply-hook* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *pre-reply-hook* or change the name.
Warning: *thread-map-next-id* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *thread-map-next-id* or change the name.
Warning: *thread-map-next-id* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *thread-map-next-id* or change the name.
Warning: *thread-map* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *thread-map* or change the name.
Warning: *thread-map* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *thread-map* or change the name.
Warning: *mailboxes* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *mailboxes*
or change the name.
Warning: *mailboxes* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *mailboxes*
or change the name.
Warning: *protocol-version* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *protocol-version* or change the name.
Warning: *protocol-version* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *protocol-version* or change the name.
Warning: *current-package* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *current-package* or change the name.
Warning: *pending-continuations* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic
*pending-continuations* or change the name.
Warning: *sldb-stepping-p* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *sldb-stepping-p* or change the name.
Warning: *sldb-initial-frames* not declared dynamic and thus is not dynamically
rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *sldb-initial-frames* or change the name.
Warning: *sldb-level* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *sldb-level* or change the name.
Warning: *sldb-restarts* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *sldb-restarts* or change the name.
Warning: *debug-swank-clojure* not declared dynamic and thus is not dynamically
rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *debug-swank-clojure* or change the name.
Warning: *active-threads* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *active-threads* or change the name.
Warning: *active-threads* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *active-threads* or change the name.
Warning: *debug-quit-exception* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *debug-quit-exception* or change the name.
Warning: *debug-quit-exception* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *debug-quit-exception* or change the name.
Warning: *debug-continue-exception* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *debug-continue-exception* or change the name.
Warning: *debug-continue-exception* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *debug-continue-exception* or change the name.
Warning: *debug-abort-exception* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic
*debug-abort-exception* or change the name.
Warning: *debug-abort-exception* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic
*debug-abort-exception* or change the name.
Warning: *current-exception* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *current-exception* or change the name.
Warning: *current-env* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *current-env* or change the name.
Warning: *connections* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *connections* or change the name.
Warning: *connections* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *connections* or change the name.
Warning: *compiler-exception-location-re* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *compiler-exception-location-re* or change the name.
Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: print-doc in this context, compiling:(swank/commands/basic.clj:180)
        at clojure.lang.Compiler.analyze(Compiler.java:6235)
        at clojure.lang.Compiler.analyze(Compiler.java:6177)
        at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3452)
        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$BodyExpr$Parser.parse(Compiler.java:5572)
        at clojure.lang.Compiler$TryExpr$Parser.parse(Compiler.java:2091)
        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$LetExpr$Parser.parse(Compiler.java:5873)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6409)
        at clojure.lang.Compiler.analyze(Compiler.java:6216)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6397)
        at clojure.lang.Compiler.analyze(Compiler.java:6216)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6397)
        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$LetExpr$Parser.parse(Compiler.java:5873)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6409)
        at clojure.lang.Compiler.analyze(Compiler.java:6216)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6397)
        at clojure.lang.Compiler.analyze(Compiler.java:6216)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6397)
        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.analyzeSeq(Compiler.java:6397)
        at clojure.lang.Compiler.analyze(Compiler.java:6216)
        at clojure.lang.Compiler.access$100(Compiler.java:37)
        at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:492)
        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.eval(Compiler.java:6469)
        at clojure.lang.Compiler.load(Compiler.java:6902)
        at clojure.lang.RT.loadResourceScript(RT.java:357)
        at clojure.lang.RT.loadResourceScript(RT.java:348)
        at clojure.lang.RT.load(RT.java:427)
        at clojure.lang.RT.load(RT.java:398)
        at clojure.core$load$fn__4610.invoke(core.clj:5386)
        at clojure.core$load.doInvoke(core.clj:5385)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invoke(core.clj:5200)
        at clojure.core$load_lib.doInvoke(core.clj:5237)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invoke(core.clj:602)
        at clojure.core$load_libs.doInvoke(core.clj:5275)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:602)
        at clojure.core$require.doInvoke(core.clj:5352)
        at clojure.lang.RestFn.invoke(RestFn.java:421)
        at swank.swank$eval35$loading__4505__auto____36.invoke(swank.clj:11)
        at swank.swank$eval35.invoke(swank.clj:11)
        at clojure.lang.Compiler.eval(Compiler.java:6465)
        at clojure.lang.Compiler.eval(Compiler.java:6455)
        at clojure.lang.Compiler.load(Compiler.java:6902)
        at clojure.lang.RT.loadResourceScript(RT.java:357)
        at clojure.lang.RT.loadResourceScript(RT.java:348)
        at clojure.lang.RT.load(RT.java:427)
        at clojure.lang.RT.load(RT.java:398)
        at clojure.core$load$fn__4610.invoke(core.clj:5386)
        at clojure.core$load.doInvoke(core.clj:5385)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invoke(core.clj:5200)
        at clojure.core$load_lib.doInvoke(core.clj:5237)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invoke(core.clj:602)
        at clojure.core$load_libs.doInvoke(core.clj:5271)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:602)
        at clojure.core$require.doInvoke(core.clj:5352)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at user$eval27.invoke(NO_SOURCE_FILE:1)
        at clojure.lang.Compiler.eval(Compiler.java:6465)
        at clojure.lang.Compiler.eval(Compiler.java:6455)
        at clojure.lang.Compiler.eval(Compiler.java:6431)
        at clojure.core$eval.invoke(core.clj:2795)
        at clojure.main$eval_opt.invoke(main.clj:296)
        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 symbol: print-doc in this context
        at clojure.lang.Util.runtimeException(Util.java:156)
        at clojure.lang.Compiler.resolveIn(Compiler.java:6720)
        at clojure.lang.Compiler.resolve(Compiler.java:6664)
        at clojure.lang.Compiler.analyzeSymbol(Compiler.java:6625)
        at clojure.lang.Compiler.analyze(Compiler.java:6198)
        ... 93 more

好的,这个错误真的很丑但是看看:

Bootstrapping bundled version of SLIME; please wait...

Warning: *current-env* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *current-env* or change the name.

这是什么意思?

【问题讨论】:

  • 您能告诉我们您安装了哪个版本的swank-clojure 插件吗?另外,您能否在您的端口中包含您的project.clj 文件。
  • 嗨..我正在使用最新的 swank-cloj (swank-clojure 1.4.0)...我的 project.clj 是默认的...我在想可能是一个错误一个下载的包,所以我决定尝试使用默认项目(lein new testproject.. cd testproject.. lein swank)都不起作用:(...

标签: clojure leiningen swank-clojure


【解决方案1】:

我认为您运行 Clojure 1.3.0 时使用的旧版本 swank-clojure 与 1.3.0 不兼容。

您帖子中的错误是这一行:

Unable to resolve symbol: print-doc in this context, 
  compiling:(swank/commands/basic.clj:180)

print-doc 在 Clojure 1.3.0 版中移至 clojure.repl

你安装了哪个版本的swank-clojure插件?

尝试安装 1.4.0 版的 swank-clojure 插件

lein plugin install swank-clojure 1.4.0

【讨论】:

  • 您好,感谢您的回答...好吧,我已经尝试再次下载 swank-clojure 1.4.0 ..它已下载并安装但仍然显示错误..现在..你是对的..当我使用 clojure 1.2.1 时,这项工作......我想我可能会在我的 Windows 操作系统上使用 clojure 1.2 版本一段时间......在 linux 中一切正常......非常感谢。 ..无论如何我会尝试解决它并找到答案...
  • 尝试使用lein new test 创建一个新项目并在那里运行lein swank。那样有用吗?也许你在某个地方有一个旧版本的swank-clojure
  • 我遇到了 lein install 插件没有删除插件文件夹中以前的 jar 的问题,当 lein 运行时,它包括所有存在的 jar 文件,并且首先列出了旧版本。所以检查 $HOME/.lein//plugins 是否有旧的 jars
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-10-07
  • 2012-03-28
  • 1970-01-01
  • 1970-01-01
  • 2012-10-07
相关资源
最近更新 更多