Closed winks closed 10 years ago
OK, so the main issue here is that you need two separate servers; one for project code and one for lein tasks. What you're doing is trying to re-use the project server as a Leiningen server, which doesn't work because your project doesn't know about Leiningen's namespaces.
The second example should work without setting GRENCH_PORT
if you run grench
from within the project dir.
But yeah, the error messages could probably be clearer here. Open to suggestions as to wording.
Ok, thanks - that clears it up somewhat. But the headless repl I started was inside a project dir - so what you explained sounded exactly the other way round.
When I run
lein repl :headless
and in the same dir
~/bin/grench-0.2.0-debian-7 eval '(println 23)'
then I still need GRENCH_PORT=1234
So basically running clojure code is fine, but I can't get lein to work over grench - at all, with any task
Ok, I see that you're running Leiningen 2.3.0. You need 2.3.3 for Grenchman.
OK, so I changed nothing and I got it to work somehow.
~ $ lein repl :headless
outside a project dir and I can use grench eval
and grench lein
anywhere, outside and inside a project dir
~/project/ $ lein trampoline repl :headless
inside a project dir, nothing works, not even ~/project/ $ grench lein version
Right; launching a repl inside your project should not allow grench lein
to work, because how would your project know what to do with Leiningen tasks?
Yeah, now I got it. I have no clue how, but I totally misunderstood http://leiningen.org/grench.html versus what I had learnt from IRC earlier - maybe my expectations were completely off.
So maybe the only thing is missing is a "why should I use it" paragraph on that page. Basically like the repo README.
Case closed, all is fine.
Thanks for your patience :)
(But it really did misbehave at the start, still confused a little)
so far so good
ok
o_O
So, to sum it up
Upgrading to leiningen 2.3.3 did not help, btw.