

Migrating a Leiningen Project to Boot - Borkdude
http://blog.michielborkent.nl/blog/2015/06/06/from-leiningen-to-boot/

======
asimjalis
My favorite thing about Boot is that it makes it so easy to write simple
Clojure scripts.

~~~
jjmojojjmojo
I agree 100%. I see this as the real advantage of boot over leiningen, beyond
just generally being less "magical". Scripting has fundamentally changed the
way I approach clojure projects.

------
kossmoboleat
Was one faster than the other? Are there things that can only be done with one
of them?

Recently I tried to get a figwheel configuration with Cursive working and in
the ended up letting figwheel run the server and perform the Clojurescript
compilation in one JVM. There's a great Leiningen template to get this working
with reagent here: [https://github.com/reagent-project/reagent-
template](https://github.com/reagent-project/reagent-template)

~~~
estsauver
The experience I had was that, while it was theoretically possible to make
cljx+figwheel/weasel/piggieback+cljs all run happily together, in practice it
didn't work for me.

With boot, everything is both pretty easy to understand and conceptually very
familiar. It's a middleware based build system, and that maps really well to a
lot of the other things I've learned building clojure web apps.

------
elwell
What's wrong with Leiningen?

~~~
technomancy
The Leiningen tooling around Clojurescript is not very good.

~~~
Borkdude
Actually I've found working with cljsbuild and figwheel pretty good. What do
you think is lacking?

The point of my post was not that Leiningen is bad and Boot is good. I simply
wanted to learn more about Boot and the pros and cons.

~~~
technomancy
Oh, I didn't take the post that way; don't worry.

But reading about the bits where you have to keep two separate lein instances
running at once just made me cringe. It's not that hard to write lein plugins
that work together composably, but it seems to me that in the Clojurescript
realm, not much effort has been made in this direction. In addition, the need
to clean (other than when changing branches) is almost always caused by buggy
plugins; normal lein operation should never require it.

The idea of having a watcher task strikes me as pretty tacky; it's so much
smoother to simply have recompilation triggered by an after-save-hook in your
editor. But I've never used ClojureScript, so there may be other reasons this
isn't done.

------
modarts
Why Boot over Leiningen?

~~~
mej10
Leiningen is fine for libraries -- but when you need a more complex build
(really, anything with more than one step), Boot gives you better tools for
doing it.

Boot has other cool things as well, like being able to write standalone
Clojure scripts that can pull down their dependencies.

------
johnwalker
Did you come up with a solution for recompiling the clojurescript files only
when cljs and cljc files were changed? The watch task fires whenever a file in
the resources or src directories changes.

~~~
Borkdude
No I haven't. Is this a big issue? I guess it would be nice if watch could
take a filter. Since cljs uses incremental compilation it shouldn't do
anything if non-cljs files changed.

~~~
jjmojojjmojo
You can put a sift task before the watch.

------
asimjalis
Is there a way to use drip with boot to get around Clojure’s slow startup
time?

~~~
noisesmith
Drip doesn't typically help because the slow part is the Clojure compiler
itself. Even if you preload your favorite clj version, it will be slow to load
your project and libs.

------
DAddYE
Thank you for sharing this. I always felt that Leinin is too much. I'm not a
clojure dev in my day to day so setting things right on it was cucumbersome
(especially with cljs).

~~~
wink
That's interesting to hear, because back when I tried leiningen for the first
time (2011 maybe?) I was shocked how easy and non-painful a build tool can be
(compared to those of other languages, and maven in particular) and I've been
a fan ever since.

Then again I never tried anything with cljs, which seems to be the main point.

