Gary Johnson
unread,Jan 22, 2015, 12:06:33 PM1/22/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to clojur...@googlegroups.com
Similarities between Leiningen and Boot:
1. Same installation steps (download shell script, chmod a+x, put on your PATH, run once to automatically download all dependent JARs).
2. Automatically download project dependencies from Clojars and Maven Central repositories to ~/.m2/repository/.
3. Same length command to type (= (count "lein") (count "boot")).
4. Both launch a shell script that starts a JVM with a Clojure instance and a set of build tooling libraries.
5. Both provide command line help for toplevel tasks and subtasks and allow running one or more tasks with a single one-line command.
6. Both construct the build environment from settings in a toplevel profile file (~/.lein/profiles.clj or ~/.profile.boot) and a per-project build config file (project.clj or build.boot).
7. Both provide a means of adding new tasks to the system (Leiningen's plugins and Boot's custom tasks).
Differences between Leiningen and Boot:
1a. Leiningen's ~/.lein/profiles.clj and project.clj files contain an EDN map with key-value pairs that specify various build and runtime settings for leiningen's tasks and subtasks (including plugins).
1b. Boot's ~/.profile.boot and build.boot files contain Clojure programs evaluated in the context of the boot.user namespace, which provides a series of functions and macros for setting environment variables, establishing default task parameters, and defining custom tasks by either composing existing tasks or writing your own custom functions. Task composition is performed by nesting fileset handlers in much the same way as Ring request/response handlers are nested (i.e., a middleware-based approach).
2a. For Leiningen tasks, all settings must generally be specified in the EDN map prior to running the command at the prompt.
2b. For Boot tasks, any settings may be specified directly on the command line and those omitted will be drawn from the values established in ~/.profile.boot and build.boot. This enables rapidly changing or overriding settings from the prompt without intermediate file editing.
3a. Leiningen tasks are run through a command line interface only.
3b. Boot tasks may be run through a command line interface, a REPL, or a build script. For those interested in developing their own build tasks, this enables a workflow in which you first write and test your build functions at the REPL, then save them to a build file, and finally run them from the command line.
4a. Leiningen - being the older, more mature platform - has a great many plugins and templates available for users to automate a wide variety of development-related tasks.
4b. Boot - being the newcomer on the scene - has a small but useful selection of community-provided plugins (see the Boot wiki) and no templates as of yet. Instead, it provides an accessible task development language and a number of patterns (on the wiki) to use when trying to replicate missing Leiningen features (aliases, injections, profiles, etc).
I hope this was a fairly clear and unbiased description of the two systems as they stand at the moment. As a disclaimer, I personally use both right now but am trying to incorporate boot more into my development workflow.
Happy hacking,
~Gary