通过nailgun 服务器运行 REPL 时,某些功能不会显示
我正在尝试将 appengine-magic (0.3.1) 设置与 VimClojure (2.2.0) 结合使用和 Clojure 1.2.0。
通过普通 REPL (lein repl
) 使用时,事情看起来很正常。
user=> (require '[clojure.contrib.ns-utils :as nsu])
nil
user=> (require '[appengine-magic.core :as ae])
nil
user=> (nsu/ns-vars 'appengine-magic.core)
(appengine-environment-type def-appengine-app
default-war-root in-appengine-interactive-mode? open-resource-stream
start start* stop stop* wrap-war-static)
但是,当相同的代码从 VimClojure 发送到nailgun 服务器时:
java -cp "`lein classpath`" vimclojure.nailgun.NGServer 127.0.0.1
一些函数和宏消失了。
user=> (require '[clojure.contrib.ns-utils :as nsu])
nil
user=> (require '[appengine-magic.core :as ae])
nil
user=> (nsu/ns-vars 'appengine-magic.core)
(appengine-environment-type def-appengine-app
in-appengine-interactive-mode? open-resource-stream)
相同版本的 appengine-magic
jar 肯定位于类路径中。
那么,这是一个错误还是配置错误?
I am trying to use appengine-magic (0.3.1) setup with VimClojure (2.2.0) and Clojure 1.2.0.
Things look right when used via vanilla REPL (lein repl
).
user=> (require '[clojure.contrib.ns-utils :as nsu])
nil
user=> (require '[appengine-magic.core :as ae])
nil
user=> (nsu/ns-vars 'appengine-magic.core)
(appengine-environment-type def-appengine-app
default-war-root in-appengine-interactive-mode? open-resource-stream
start start* stop stop* wrap-war-static)
But when the same code is sent from VimClojure to nailgun server:
java -cp "`lein classpath`" vimclojure.nailgun.NGServer 127.0.0.1
Some functions and macros disappear.
user=> (require '[clojure.contrib.ns-utils :as nsu])
nil
user=> (require '[appengine-magic.core :as ae])
nil
user=> (nsu/ns-vars 'appengine-magic.core)
(appengine-environment-type def-appengine-app
in-appengine-interactive-mode? open-resource-stream)
The same version of appengine-magic
jar is definitely in the classpath.
So, is it a bug or misconfiguration?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对我来说,它看起来更像是一个功能。
查看 https://github.com 中的最后一个表单/gcv/appengine-magic/blob/master/src/appengine_magic/core.clj。该命名空间中加载的 fns 完全取决于您运行的是 Swank 还是普通 REPL。
我无法解释为什么会这样,但这显然是 appengine-magic 的预期行为。
It looks more like a feature to me.
Check out the last form in https://github.com/gcv/appengine-magic/blob/master/src/appengine_magic/core.clj. The fns loaded up in that namespace are precisely dependent on whether you're running Swank or the normal REPL.
I can't speak to why that is, but it's clearly the intended behavior of appengine-magic.