Need different build artifacts:
- production: lean and mean
- no source code
- (eventually?) reduced metadata
- development
- batteries included
- includes latest core-approved version of all contribs
- easy way to distinguish level of maturity
- Clojure and a few others: 1.x or later
- many things < 1.0
- does batteries included need both production and development versions?
- guessing development only would be ok
Thoughts on build profiles (SS 2011-03-17)
There are two aspects, each with two possible approaches:
- Packaging aspect: what goes in the JAR?
- "before" approach: modules
- Split "Clojure" into smaller modules
- E.g., "data structures", "runtime support", "compiler"
- All can live in the same Git repository
- Build and release each module on its own
- Release "Clojure" as the combination of all of them
- Users can combine them in different ways
- E.g., an Android app can omit the compiler
- Requires significant source-code reorganization
- "after" approach: multiple build artifacts
- Build "Clojure" as one thing
- Filter different subsets of .class files into different JARs
- Leaves current source-code structure in place
- Trickier to get right
- E.g., ensuring no missing dependencies among compiled artifacts
- Compiling aspect: what goes in each .class file?
- "before" approach: compiler flags
- Compile-time flags to include/omit certain things
- Set once for an entire build? Or per-namespace?
- Raises question: what is the interface to the Clojure compiler?
- clojure.lang.Compile is a command-line interface
- clojure.core/compile is the Clojure interface
- For better tooling we need an official Java interface
- "after" approach: filtering
- Process compiler's output to remove things like metadata
- How would we do this?