reply script depends on lein1 (?) #101

Closed
franks42 opened this Issue Feb 2, 2013 · 4 comments

Comments

Projects
None yet
2 participants

franks42 commented Feb 2, 2013

When I tried to "lein2 compile" the reply project and ran the reply script, it doesn't seem to resolve the classpath properly.

The "target/classes" is not added to the CP, just the "classes".

Also, the "libs" directory is not populated with the required jars by lein2, and the reply script depends on those to add them to the CP.

Owner

trptcolin commented Feb 2, 2013

Yeah, this is something I haven't made the time to figure out how to handle yet. I've been running 'lein trampoline run' to try things out locally, but I'd love a patch to dump dependencies into lib, or solve this in a different way if you have ideas. The shell/batch scripts had actually gone out of my mind completely - I didn't realize anyone used them!

franks42 commented Feb 2, 2013

Sorry - no solutions... only issues ;-)

The only temporary solution that works is to explicitly direct users to deploy lein1 instead of lein2 for the reply-compile on the website/README… until further notice…

On Feb 1, 2013, at 8:28 PM, Colin Jones notifications@github.com wrote:

Yeah, this is something I haven't made the time to figure out how to handle yet. I've been running 'lein trampoline run' to try things out locally, but I'd love a patch to dump dependencies into lib, or solve this in a different way if you have ideas. The shell/batch scripts had actually gone out of my mind completely - I didn't realize anyone used them!


Reply to this email directly or view it on GitHub.

Owner

trptcolin commented Feb 2, 2013

Oh, actually, I just realized that's already in the "Usage" section of the README:

The easiest way: use lein repl (for 2.x). Skip the rest if that's all you need.

Running lein trampoline run at the command line, in this project, will get you the latest stuff on master.

There are also example bin scripts that are currently just set up to work with Leiningen 1.x (2.x already contains
REPLy, just not necessarily always the latest from master here). If you want additional stuff on the classpath, you
can set $USER_CP. For instance:

USER_CP=`lein classpath` reply

I can make that language more explicit, to emphasize that lein trampoline run is the way to go if you're on lein2 and want to run from master. Another option would be to build dependencies via mvn dependency:copy-dependencies and change the lib path to target/dependency, but I would prefer not to introduce a dependency on the mvn executable.

But another option I'm considering is actually just to delete these shell scripts - is there a compelling reason to use them anymore instead of lein repl or lein trampoline run in this project?

trptcolin closed this in 12859ad Feb 3, 2013

Owner

trptcolin commented Feb 3, 2013

OK, I decided to leave the scripts there for anyone who might be stuck on lein1 or has other reasons not to want to use Leiningen. Thanks for calling this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment