Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is `lein run` not `lein trampoline`?

It seems to me that the only difference between lein run and lein trampoline is that the latter quits Leiningen's JVM to save memory.

This seems always a good idea, so why is this feature not included in lein run and then get rid of lein trampoline?

like image 344
Tyler Gillies Avatar asked Mar 02 '13 02:03

Tyler Gillies


1 Answers

lein trampoline can be used for any leiningen task, not just lein run. For example, lein trampoline test.

Essentially, lein trampoline kills the original leiningen process so that only the actual JVM that spawns for running your Clojure stuff is alive when the task starts running. This is useful for shell scripting since killing the actual JVM won't kill the leiningen process, and vice versa.

like image 143
August Lilleaas Avatar answered Oct 18 '22 19:10

August Lilleaas