I was trying to use Page Speed the other day – an awesome browser plugin (and/or apache module) made by Google to help make the web faster. However, I was tired of having 5 versions of Firefox to chose from (or remember where I’ve installed various plugins), so I removed everything else and just kept “Aurora“. Aurora is Mozilla’s equivalent of the dev channel build of Chrome (between nightly and beta). Unfortunately, Page Speed only works on Firefox 4-6.* (well, it doesn’t say the end range there, but just trust me).
Figuring there really couldn’t have been that big of a difference between the two, like a good hacker I changed the
maxVersion in the plugin’s metadata (in this case install.pdf in page-speed.xpi). I’m not sure all plugins have these kinds of issues or are using the same method of versioning, but it seems relatively standard to Firefox plugins. So, I wrote a script that’ll cURL the .xpi for me, do a tiny little bit of sed to change the
* and re-zips it back into the current working directory (did you know .xpi is just a glorified .zip?).
Here’s the script if you’re lazy like me and don’t like waiting for plugin authors to simply bump versions.
And guess what? It worked like a charm!
NOTE: I make no attempt to suggest this method of changing maxVersion isn’t totally stupid, dangerous, and just outright gross. However, if you feel any of these things about this script/method … just don’t do it.
I think as browsers continue to move toward versionless (or, er, version agnostic) software we’ll probably need to rethink the way we try to version packaged software. Something like this obviously has maintenance costs associated with it for extension developers (and Mozilla doesn’t seem to care much, as they force you to recompile on every release even if youre source code hasn’t changed), so I doubt people will continue manual version bumping for long. My guess is that they’ll either just bump to
* or remove the
maxVersion like I have, or will just simply stop maintaining plugins all together.
That said, using feature switches inside your plugin to check for a dependency or version of something sounds like a pretty good idea, if it’s technically feasible (not sure, never done large scale stuff with extensions). That is what various places I’ve worked (Yahoo!, Google) do to hold back something that needs to be continuous integrated/deployed during development (see “about:flags” in Chrome to understand what I’m talking about, ;)).
What do you think?
Nimrod Bar, my former co-worker and maintainer of FoxyTunes (a Firefox add-on w/~150,000 users) also told me that you can achieve this same effect with the Nightly Tester Tools. I find it weird that installing an add-on would let you … install more add-ons (well, have enough access to do this), but it’s still cool.