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.
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
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.
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.
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.
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.
Tasks in Boot cache their own products, so while the watcher task fires the rest of the pipeline whenever a source file of any kind changes, each task is smart enough to use its own cached compiled files. This is because only the tasks themselves can ever really know the relationship between source files and the compiled artifacts they produce.
So in practice things are only recompiled when they need to be recompiled. Even though the watcher task is firing, no real work is done unless it needs to be done.
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.
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.
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).
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.