The other day, I needed to test a bugfix.
It was, I thought, a fairly simple fix, and I was pretty confident I knew what to change. I just needed to modify two classes in the same package in the same subsystem.
However, to test the fix, I needed to build the code.
And, in this particular project, performing a complete build of the code from scratch takes more than two hours on the fastest machine that I have available.
So, I tried to cheat. I tried to hack things, and do a partial build, and tried to wedge my changed code into an already built tree.
Of course, I messed it up, and didn't quite get the changed code into all the right places (I built the jar, but not the war; or maybe I built the war, but didn't clear the previous copy out of the cache; or something like that, it doesn't really matter). At any rate, it was a build error. So I double-checked my steps, and found that error, and then tried to hack the build again, and made another mistake.
Eventually I got it right, and tested my fix. After about 2 hours of trying to hack the build in order to avoid running the 2 hour build. Sigh. Another afternoon wasted.
On Derby, this never happens to me.
On the machine I generally use for working on Derby, I can build the complete Derby tree, "soup to nuts" (ant clobber; ant all; ant buildjars), in barely two minutes.
So I never, ever have an annoying build problem. I never carefully set up a test and then discover that I'm not running the code that I thought I was running. I never find that I've changed a method signature and not caught one of the places that uses that method because I failed to compile it.
Of course, things are never fast enough. I know that a number of Derby developers find that two minutes is too long, and so they routinely skip the jar-building step, which shaves 30 seconds off the build time. And I can understand their frustration; there are times when 30 seconds is a long time to wait.
But, this morning, I waited 142 minutes after making a change, before I tested it.
And then I noticed I'd made a simple mistake :(
Sunday, May 10, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment