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?
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.