Skip to content

PLAN: lein cljsbuild v2

Chas Emerick edited this page Nov 18, 2013 · 1 revision

This is my plan for lein-cljsbuild v2. Everything here is provisional and subject to change at any time.

lein-cljsbuild has reached 1.0.0, meaning that there is now a stable baseline for people that are happy with the set of functionality it provides. The 1.x.y series of lein-cljsbuild will carry on with that set and focus on stability; pull requests targeting that series will take this into account.

lein-cljsbuild v2 will be free to make breaking changes. Only time will tell what all those changes will be, but my primary focus will be in removing features from lein-cljsbuild and fundamentally simplifying its usage.

lein-cljsbuild came about in a time when there were few to no existing ClojureScript tools. Thus, it was easy and sensible to add a number of different tools into lein-cljsbuild in order to make it easy for people to get started with ClojureScript, i.e. "just add lein-cljsbuild as a plugin and here's your set of lein commands". However, time has moved on:

  • there are better alternatives in the ecosystem for the auxiliary tools that lein-cljsbuild bundles together
  • the presence of these other tools leaves users with many decision points that complicate using ClojureScript, both in beginning and ongoing phases

So, lein-cljsbuild v2 will return to its roots of:

  1. Making compiling/optimizing ClojureScript codebases easy and fast
  2. Coordinating execution of external commands used to run ClojureScript tests on the output of #1

Additionally, lein-cljsbuild's configuration related to these tasks will be significantly simplified and changed so as to maximize DRY-ness with regard to configuration associated with various new(er) ClojureScript-related tools.

This implies that these lein-cljsbuild features are effectively deprecated, and will be removed prior to a final 2.0.0 release lands; their functionality is now provided in more comprehensive and/or general ways by other projects:

  • REPL support (both Austin and cljs-noderepl provide more flexible/reliable/easier-to-use ClojureScript REPLs, and are dedicated to those objectives)
  • Crossovers (cljx is an implementation of feature expressions that can be used to easily make Clojure/ClojureScript portable codebases)

It is yet to be determined whether lein-cljsbuild will incorporate these projects' as dependencies so as to continue to present a comprehensive set of functionality, or if its documentation will simply recommend users to find their own way with them.

Finally, lein-cljsbuild v2 will be modernized with regard to the latest understanding re: building Leiningen plugins, which will significantly simplify its internal implementation.

News on lein-cljsbuild's further development will continue to be made via the usual channels (the ClojureScript ML and @cemerick). Feedback on this plan may be sent to the same.

Best,

- Chas