Re: Howto Load Project Namespaces in Leiningen Plugins

2014-09-01 Thread Timothy Washington
Ok, I figured it out... :) Something in my "*~/.lein/profiles.clj*" was screwing things up. It was one of the repl-options, because when I turned those off, things just started to work. Hope this helps someone in future. #_:repl-options #_{:nrepl-middleware [ritz.nrepl.middleware.

Re: Howto Load Project Namespaces in Leiningen Plugins

2014-09-01 Thread Timothy Washington
Or (ignoring the previous) getting even more basic... *$ tree* . |-- LICENSE |-- pom.xml |-- project.clj |-- README.md `-- src `-- leiningen `-- zzz.clj *$ cat src/leiningen/zzz.clj * (ns leiningen.zzz (:require [leiningen.core.eval :refer [eval-in-project]])) (defn zz [] (prin

Re: Howto Load Project Namespaces in Leiningen Plugins

2014-09-01 Thread Timothy Washington
Awesome, thanks for the feedback. That all makes sense. And yes, the work will be done in the project's VM. I guess what I'm missing is something more basic. If you look at lein-midje or lein-spec

Re: Howto Load Project Namespaces in Leiningen Plugins

2014-09-01 Thread Nelson Morris
When writing lein plugins you have to think about if they should do work in lein's vm or the project's vm. In this case, since you want to load namespaces from the project, the work will need to be done in the project's vm. This is where `leiningen.core.eval/eval-in-project` is used, to spin up th

Howto Load Project Namespaces in Leiningen Plugins

2014-08-31 Thread Timothy Washington
Ok, So I'm trying to write a leiningen plugin that takes some namespace arguments. Let's call it **. This is a brand new plugin, so everything else is empty, and this value is present: *{:eval-in-leiningen true}*. My problem happens when, in the context of the project ** is acting on, the plugin c