Tuesday, October 16, 2007

Bake (?) - A Rake Port in Boo?

I defined a Build Process and wrote the NAnt build scripts [MSBuild wasn't even in its beta then]  for one of the .Net projects I was with quite sometimes ago.  Can you imagine a fortune 500 company's billion dollar Enterprise Web site without a Source Control system or Build system in place?   No way, right?  Wise up guys!

I'll reserve posting about the actual process for later.  Suffice to say that this project found so many issues with VSS 6.0d [which the company was insisting we use it].  And then I had an opportunity work with Perforce and I loved it!

Now, I can actually have track builds with all the changelists they include and mail to individual developers that had checked-in code, in case of a broken build.

Because Rahien is so vocal about DSL and evangelizing Boo, I was thinking of building a DSL that would ease my pain of having to define a Build Process for each of the Source Control / Build System Provider combinations.  

Let me make no bones about it:  While I'm comfortable with the concept of "DSL"s, I'm quite new to the idea of building one.  And I'm new to Boo.  

But the idea of a DSL was so compelling till I found great minds have already been at work ;)  I think it's Paul Graham who said "If you think you have a good idea, chances are that somebody's already working on it" .  Sigh!  Also, My idea of DSL for a Build language has evolved once I've seen how Rake is implemented.

But I guess, it would be a good idea to still implement this [at least just to learn Boo].

One disadvantage of an "internal DSL" as Martin Fowler calls them is ignoring large number of Tasks that Ant/Nant/MSBuild projects have accumulated over time.  If I need a SubVersion checkout task, I may have to reinvent the wheel in my DSL, unless my DSL has a way of integrating this body of work. 

If my DSL is in C# [Well... Rahien says C# is not "suitable" for writing such a DSL.  I choose to believe him as I have a vested interest in learning Boo], I may well be able to leverage all of Nant's tasks.

My vision is [was] to have a single language that would describe the build process   The language would "compile" down to the requirements you have either Ant/Nant/MSBuild scripts with appropriate tasks for Source control provider of your choice.  Since the Build Systems themselves are extendible and have massive community that revolve around them, it seems like a very good idea.  It may be esoterically dumb!  Let me think about it a bit more.


[17th October 2007 14:37PM] Update:   OK.  Why to compile it "down" to Nant/MSBuild scripts?  Since Boo is already in .Net fold, we can just use the existing tasks [from NantContrib/ MSBuildContrib?] as is!  No?

No comments: