milessabin/shapeless — pull request #11 by jrudolph (2012-10-10 12:58:08+00:00)
Title: use the sbt-boilerplate plugin to generate boilerplate

While working on spray-json we had our own share of boilerplating and because writing boilerplate is so boring I hacked together a [plugin](https://github.com/jrudolph/sbt-boilerplate) which does the expansion from templates.

We've not yet published the plugin (this will have to wait till after the spray milestone release, so you will have to build it yourself or maybe just wait with merging this until the plugin is published) but for testing purposes I converted the shapeless boilerplate to use the new plugin.

(Incidentally, Mathias speculated that he could expand the spary-json boilerplate so fast manually that writing a generator would be wasted time. I might have beaten Mathias because I could copy code from the shapeless Boilerplate generation and so the initial version was really quickly thrown together. However, afterwards I thought a template language would even be nicer and then I went into regular expression parsing land. Afterwards I noticed that I could simplify the template language much by using nested expansion expressions, but alas, those aren't easily parsed with regular expressions so I had to write a proper parser. Having spent a day writing a template engine I have to try to amortize my development time so I built the plugin for wider consumption. So here we are...)