April 2012 Archives

This morning, I was finishing off my coffee and reading the morning email -- as you do -- when I came across a bug report for Git::Wrapper, a module I maintain. It turned out that a recent change I'd made to my workflow (archiving older releases in my working tree) had resulted in the archived releases being included in the version of the software I'd packaged and put on CPAN for distribution.

Whoops! I needed to fix the problem and get a new release uploaded to CPAN as soon as possible, and since it was a quiet Saturday morning and I had about an hour free before I needed to run some errands for @MrsGenehack, I didn't expect it would be a big deal. I use Dist::Zilla to help me package up Git::Wrapper for distribution, so I figured it would just be a simple matter of tweaking the configuration in the dist.ini file in my working copy and then releasing a new version to CPAN. How long could it take, really?

(Enter First Yak, stage right, with bouffant rampant...)

I tried a couple of different approaches to changing the configuration so that it would do what I wanted, and couldn't quite get the syntax right. Instead of continuing to pound my head into a wall, I hopped onto the #distzilla channel on irc.perl.org and asked for help. RJBS (author of Dist::Zilla, current Perl pumpking, and generally nice guy) quickly pointed out where I was going wrong and got me on the right path.

I was working on the problem in a MultiTerm buffer in my editor, Emacs. I'm giving a talk on editor tweaks for more effective programming at YAPC::NA this year, and as part of prepping for that, I'm trying to do as much work as possible inside my editor. This was working great for this particular problem -- I could make changes to my dist.ini file and quickly jump over to the terminal window to run dzil commands and verify the distribution was getting built correctly.

This was working really well, except that I kept getting distracted by some highlighting irregularities -- and since the talk was on my mind, I realized I wasn't going to be able to present at YAPC with those ugly background glitches present. Obviously, taking a couple of minutes to clean that up would be time well spent...

(Enter Second Yak, stage left, somewhat hirsute than previous yak...)

Since most of the highlighting problems seemed to be around the color highlighting in the output of the ls command, I spent a while poking at the dircolors config file I use. I copied this from someplace on the Internets and I've never really taken the time to understand it -- it just worked -- so this was mostly poking of the "change something, see what happens" variety. After a few minutes of failing with this approach, I started to wonder if I was barking up the wrong tree. A bit of DuckDuckGo-ing later, I made a quick tweak to my Emacs config, which fixed the highlighting problem.

(Exit Second Yak, now smooth and free of hair)

That taken care of, I returned to the issue of the Git::Wrapper distribution problem. Before I got diverted by the Emacs shell issue, I'd noticed a few other things in the dist.ini file that I could improve. I took care of that, built a new release, and uploaded it to CPAN. I let the bug reporter know, and closed out the ticket.

(Exit First Yak, now also denuded.)

One of the changes I'd made to the dist.ini was updating the metadata to point to the new Git::Wrapper homepage and to the issue tracker for Git::Wrapper on Github. The MetaCPAN site uses this information to set up the links in the sidebar on the Git::Wrapper release page, so I hopped over there to verify that I'd done everything correctly.

All the links were working correctly, but a Github specific popup was appearing over my homepage link -- which seemed wrong. I jumped on the #metacpan channel to see if this had already been reported, and ended up having a short conversation with MST that resulted in me opening an issue ... which I ended up assigning to myself. (MST: manipulating people into open source contributions for fun and profit.)

(Enter Bonus Yak, descending from the rafters and bearing a strong similarity to MST, at least on the hairdo level... )

I looked at the issue briefly, but as I'd now used up about 1.5 hours of my free hour, I had to let it sit briefly while I took care of those errands. Once I got back, I spent another 30 minutes figuring out the issue. After I was sure I'd got it taken care of, I sent in a pull request, which has since been merged -- the bug is no longer visible on the MetaCPAN site).

(Exit Bonus Yak, freed of hair and looking not unlike MST would have if he hadn't backed out of the "transparent" option when losing the Iron Man Perl challenge...)

Anyway, that's my Saturday morning - three yaks shaved, 2 patches to open source projects, 1 editor config tweak, and some good raw material to fold into my talk. Hope you enjoyed the tale...

(For those of you wondering about the yak thing, "yak shaving" is a geeky way to describe what happens when you're trying to accomplish one thing, but get diverted off on solving a chain of seemingly unrelated problems instead.)

(Hat tip to Josh paperbits DiMauro for the title...)