Leiningen and Cake

573 views
Skip to first unread message

Phil Hagelberg

unread,
Nov 14, 2011, 7:35:25 PM11/14/11
to lein...@googlegroups.com, clo...@googlegroups.com
Hello folks.

You may have heard some rumours and/or tweetage about Cake and
Leiningen. During the Conj I met with Justin Balthrop and some of the
other Cake developers. They were interested in joining forces to
develop a single unified build tool for Clojure. We talked it through
and I think Leiningen could definitely benefit on the one hand from
having a few of Cake's features ported over and on the other hand from
gaining a bunch of new developers. This will mean Cake may see another
few releases but will have its development efforts directed to
Leiningen.[1]

In particular I'm thinking of two or three things that make sense to
take from Cake for Leiningen 2.0. Firstly there's the use of
in-process classloaders for project execution. I've wanted this for a
while, and they've got a nice well-tested implementation they're
offering to have ported right over. This should speed things up and
offer fairly significant memory savings. The other definite win would
be taking the SCP implementation for Clojars uploads. There is a
lein-clojars plugin, but it has some issues with keys that have
prevented it from being considered for inclusion.

Another thing we may take is the notion of "profiles" or environments
in which tasks execute. Right now Leiningen has a notion of dev time
vs production, which is just a single bit that determines whether
dev-dependencies, tests, and test resources are on the classpath. Cake
(and Maven IIUC) expand on this and allow various config options to be
grouped and activated on a per-profile basis. I'll start a separate
thread discussing this since there's still a fair bit more I'd like to
understand about how people are using this in Cake and how simply it
could be implemented.

We're still thinking through whether it makes sense for Leiningen to
offer persistent/daemonized JVMs to reduce execution time; it may be
simpler to delegate this to Jark[2] instead since it could be
considered fairly orthogonal. If you use Cake and Leiningen and have
some other features you would miss, please mention them.

So I'm excited to welcome them to the team.

Happy Hacking.

-Phil

[1] - https://groups.google.com/group/clojure-cake/browse_thread/thread/186ec36c2426996e
[2] - http://icylisper.in/jark

Timothy Washington

unread,
Dec 14, 2011, 11:37:34 AM12/14/11
to clo...@googlegroups.com
Hey there, 


I see there's been progress made on Leiningen, and wanted to chime in wrt overall features. I've been recording a few small things that would make life easier. 


1) The first is being able to pass many tasks to lein. So I would prefer A. instead of B.  
  • A) lein clean deps 
  • B) lein clean && lein deps 

2) Also, It'd be nice to have a way of listing installed leiningen plugins, instead of ls on ~/.lein/plugins 

3) I'd love to fire up a "lein repl src/my-code.clj", and have passed in code execute before I get to the repl. A) I know there's a location in ~/.lein to place custom scripts. But that's global , and runs each time "lein repl" is invoked. And B) I know there's "lein run" and "lein exec" , but they execute code, then exit the repl. 


HTH 
Tim 



--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Timo Mihaljov

unread,
Dec 14, 2011, 12:26:43 PM12/14/11
to clo...@googlegroups.com
On 12/14/2011 06:37 PM, Timothy Washington wrote:
> 1) The first is being able to pass many tasks to lein. So I would prefer
> A. instead of B.
>
> * A) lein clean deps
> * B) lein clean && lein deps


You can chain commands by separating them with a comma:

lein clean, deps

--
Timo

Phil Hagelberg

unread,
Dec 14, 2011, 1:00:39 PM12/14/11
to clo...@googlegroups.com
On Wed, Dec 14, 2011 at 8:37 AM, Timothy Washington <twas...@gmail.com> wrote:
> 2) Also, It'd be nice to have a way of listing installed leiningen plugins,
> instead of ls on ~/.lein/plugins
>
> 3) I'd love to fire up a "lein repl src/my-code.clj", and have passed in
> code execute before I get to the repl. A) I know there's a location in
> ~/.lein to place custom scripts. But that's global , and runs each time
> "lein repl" is invoked. And B) I know there's "lein run" and "lein exec" ,
> but they execute code, then exit the repl.

As Timo mentioned, 1 already exists. 2 and 3 sound pretty reasonable.
Feel free to open issues for them. They should be very easy to
implement as well, so I'd encourage you to try your hand at
implementing them. Features always have a better chance of making it
into a release if they're implemented by someone who would use them.
=) Feel free to ask in the #leiningen channel on freenode if you have
any questions.

-Phil

Timothy Washington

unread,
Dec 14, 2011, 2:09:10 PM12/14/11
to clo...@googlegroups.com
Oh nice, I hadn't realised 1) was already in there. 

And I've created the issues. I'll certainly begin to dig into leiningen code, and see in what ways I can push these forward. 

Thanks 
Tim 


Reply all
Reply to author
Forward
0 new messages