mach uuid

Note: for technical reasons, this is currently a (temporary) static copy of my blog. Comments are disabled, and existing comments are not
visible. Normal service will be resumed as soon as possible.

Published 17 July 2013

Those of you who hack on Gecko code will know that when changing an XPCOM interface, you need to update the IID. Now, in the dim fog of morning, when I haven't drunk enough coffee, how on earth am I supposed to remember that the command-line utility for UUID GENeration is named uuidgen? I wish these things had useful mnemonics!

Yes, I could pop in to irc.mozilla.org, and ask firebot. However, I would inevitably forget to /msg firebot, and it is well known that #developers is a hotbed of nefarious sorts, lying in wait to snatch your newly-minted IID and ride off into the sunset, cackling with glee. I could navigate to one of the many online tools, but, sheesh, that sure sounds like a lot of work, you know?

mach to the rescue. I've landed a mach uuid command, which will furnish you with a UUID in canonical form. Alternatively, use mach uuid -f cpp for the C++ form.