So, I’ve decided to try turning AutoGen into a patch for the Castle project. The first problem I’ve encountered is that TypedFactoryFacility is considered part of the MicroKernel. Since AutoGen references Castle.DynamicProxy directly, it’s not really a goer to put it there. This basically means that I need to add it to the extremely large facilities folder. On the other hand, it gives me an opportunity to work directly with nant, which isn’t a bad thing. It certainly makes you tidy up your references (and about time too… I had a reference to System.Data. Needless to say, I didn’t have a depedency.)
The Castle project are pretty aggressive about warnings as errors, so I had to remove an unused field. It was there for a future feature but, of course, YAGNI applies. It was a speed-bump in any event. I’m way too used to working with legacy code which seems to generate more warnings than executable code. It seems that you need to disable signing when you’re nanting a sub-build.
None of this is that bad. The tests, on the other hand, were a right royal pain. Castle uses NUnit 2.2.8 (it’s really finicky about NUnit versions), the tests were written 2.4 style. Cue a significant amount of hacking around. Also awkward was the test requirement for the Common Service Locator. There’s certainly an element of cargo-cult programming in what I’m doing right now: the build files are a maze. I’ve got to admit, I’ve always had problems getting Castle to build (it appears that people on the mailing list appreciate this, but it’s not like it’s fixed) and so changing the build is a bit of a scary operation.
Anyway, the patch is now in donjon, so we’ll see what happens.