Migrating a Leiningen Project to Boot
blog.michielborkent.nl
blog.michielborkent.nl
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
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.
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.
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.
Boot has other cool things as well, like being able to write standalone Clojure scripts that can pull down their dependencies.
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.
Then again I never tried anything with cljs, which seems to be the main point.