librelist archives

« back to archive

nested JVMs?

nested JVMs?

From:
John Gabriele
Date:
2013-10-12 @ 04:41
Hi,

In `lein help trampoline` it says, "Run a task without nesting the
project's JVM inside Leiningen's.". What does that mean, to run the
project's JVM "nested in lein's"?

-- 
  John Gabriele
  jgabriele@fastmail.fm

Re: [leiningen] nested JVMs?

From:
Jean Niklas L'orange
Date:
2013-10-12 @ 11:01
On 12 October 2013 06:41, John Gabriele <jgabriele@fastmail.fm> wrote:

> In `lein help trampoline` it says, "Run a task without nesting the
> project's JVM inside Leiningen's.". What does that mean, to run the
> project's JVM "nested in lein's"?
>

To not pollute the namespace and dependency list, Leiningen must call
project-related commands (repl and run) by starting up a new JVM instance.
Effectively, this means that you in general have two JVMs running (the
project-related task nested in the other)  whenever performing repl and
run. If you want to avoid that (for memory reasons, mostly), you can
perform a trampoline on the task to avoid having two JVMs running when the
task is performed.

-- 
Regards,
Jean Niklas L'orange

Re: [leiningen] nested JVMs?

From:
John Gabriele
Date:
2013-10-12 @ 21:56
On Sat, Oct 12, 2013, at 04:01 AM, Jean Niklas L'orange wrote:
> On 12 October 2013 06:41, John Gabriele <jgabriele@fastmail.fm> wrote:
> 
> > In `lein help trampoline` it says, "Run a task without nesting the
> > project's JVM inside Leiningen's.". What does that mean, to run the
> > project's JVM "nested in lein's"?
> >
> 
> To not pollute the namespace and dependency list, Leiningen must call
> project-related commands (repl and run) by starting up a new JVM
> instance.
> Effectively, this means that you in general have two JVMs running (the
> project-related task nested in the other)  whenever performing repl and
> run. If you want to avoid that (for memory reasons, mostly), you can
> perform a trampoline on the task to avoid having two JVMs running when
> the
> task is performed.

Ah. Ok, I see. Lein itself is a Clojure program, and it needs to be
running in order to perform the given task --- which, in the case of
repl and run, results in a 2nd jvm instance.

Thanks. :)

-- John