Robin Berjon

Dependencies

Just a Small Tweak

There are days on which you whip out your text editor, take a deep and fulfilling breath, set your jaw to its squarest, type line after line of code as clouds drift by in fast motion, run your code, and it just works. Right there. Right now. Smooth. And then there are days like today when it seems the Universe is bending itself not just backwards but into exotic topologies to tell you you shouldn't be writing code. Days, for instance, very much like today.

I have this really simple local Web service that I wrote on top of NodeJS. It's sweet, it's really not very complicated. Today I felt like it could use a little tweak, just the shade of a nothingth different, that little extra feature that would make me happier.

So there I go pulling out TextMate and entering some code. And it starts failing, in weird ways. A little prodding shows me that there's something that isn't doing what it ought to be doing at the Connect (a nice layer atop Node) level. The version I'm using is pretty old, it's an obvious bug, so there I go updating it.

But git can't seem to update it. Why? Well apparently it's been moved from ExtJS to Sencha. Fine. No problem. I'll just get the latest version from Sencha.

Got it. Sweet, there must be some nice new stuff in there that I really should check out. Perhaps it will make my world even simpler. But before that let's see if that bug's fixed. I rerun the code and — BAM! It all falls to pieces. Very little, very early, very broken pieces. What's going on? think I with the sheepish innocence of an oyster being sprinkled with lemon juice.

Ah. The entire API's changed. All of it. And the executable's gone. Well that's annoying, but it was alpha — you've got to keep the zen of living on the bleeding edge. It wasn't that much code anyway, so there I go, rewriting it all to the new API. Lovely. It's a bit shorter, I think it'll be nicer in the long run, once I've had a beer or two to forget about this. Yeah, it'll be nicer.

Rerun. Hmmm. Internal server error, but no decent error message to go with. Time to start digging a little more. Oh, that one's easy. Recent versions of Node have added a new global, which the newer Connect is using, but my version of Node is old.

Well hey, after all, that ought to be up to date too, right? I mean, bleeding edge and all. Bloody edge for sure.

Funny thing: the newer Node's configure fails with a distinct lack of helpful message. By now that's familiar enough that I waste no further moment and head straight to Google. And indeed others before me have had very similar-looking problems. Essentially, it's my MacPorts OpenSSL that's somehow become impossible to find for Node's build system.

Thankfully, the solution is really trivial: sudo port install openssl. HA! Take that stupid computer! What is it you're saying?

Failed to locate 'make' in path
        

Becoming a parent is an experience that, I find, can deeply modify one's personality in ways both subtle and quite remarkable. One such change for me has been a notably decreased tendency to resort to foul-mouthed language. I presently make show of this beautiful faculty commonly known as “brain plasticity” to find that none of those words have gone unforgotten. In fact, I seem to be inspired in the production of new ones. Some spit, too, becomes involved.

It turns out that some OS X system updates enjoy making some core pieces of functionality partly unavailable. They get moved to different locations, some programs can use them from there, others have more trouble. The fix? Reinstall XCode and the Developer Tools.

So here I am, downloading 2.5Go of software I already have just so it can fix itself. The thing is, I know I have to type this blog quickly because reinstalling XCode normally breaks something else, notably pretty much everything that relies on Perl.

Ah well, but that's a problem for another day. Right now, I think I need beer.