The Inside Track on Firefox Development.

« Using InstallTrigger to Install Extensions | Main | Firefox 1.0 Preview Release »

July 25, 2004

Extension System Changes - Update

I've just made some more changes to the Extension system that I hope will make the 0.9->PR transition simpler for those of you whose Extensions are still compatible with all the changes that have happened in the interim.

If your extension is compatible with Firefox Preview Release (which will be internally called "0.10" - has been called "1.0 beta" and "RC1" in other places like the bug system and the roadmap) then what you can do is:

- increase maxVersion remotely, either by updating your entry in update.mozilla.org so that the VersionCheck web service will discover the compatibility update and apply it into users' browsers, or
- if your extension specified a custom update RDF file you can do it there.

How to do this is described in: Extension Versioning, Update and Compatibility which I published last week. Please read it.

You can offer more than one update, when mismatch checking occurs the first time a user runs 0.10, Firefox will try and look for maxVersion bumps for the same extension version remotely first, and only if that fails try and look for newer versions as XPIs.

If your extension required changes to be compatible with branch changes since 0.9, you are probably preparing a new version of your extension in a new XPI, and this version patching logic does not apply to you.

Some examples:

Extension A, was compatible with Firefox 0.9, minVersion: 0.9, maxVersion 0.9, is compatible with branch changes and will be compatible with Firefox 0.10.
Remotely specify maxVersion per the URL above as 0.10, when the user upgrades to 0.10 maxVersion will be patched in their profile datasource and they will be able to use Extension A without doing anything.

Extension B 1.0, was compatible with Firefox 0.9, minVersion: 0.9, maxVersion 0.9, is compatible with branch changes and will be compatible with Firefox 0.10. Version 1.1 also available, compatible with Firefox: minVersion 0.10 maxVersion 0.10. Remotely specify maxVersion for B1.0 per the URL above as 0.10, when the user upgrades to 0.10 maxVersion will be patched in their profile datasource and they will be able to use Extension B1.0 without doing anything. Background/Manual update will show 1.1 as an available update but it is not strictly necessary to use Firefox 0.10 so it is not forced on the user.

Extension C 4.0, was compatible with Firefox 0.9, minVersion 0.9, maxVersion 0.9. Is not compatible with branch changes, only C4.1 is. No version patching is possible. Specify this as an available update remotely and the user will be able to download and install the new version's XPI when they upgrade.

Extension Manager/Update Test Suite!

This update system is new and badly needs test cases. I've uploaded a few (source included), here: Test Directory on my website
and a document describing how to use them: Test Case documentation but this really needs expansion to cover more cases. It would be great if someone could take over maintenance of this document and expand the set of tests (make source available). We need a set of simple XPIs and tests that can be input into testrunner. I don't have time to do this - we may not be making many more changes to EM before 1.0 so there may not be many more opportunities for regression on the 1.0 branch but a good test suite is going to be essential going forward. If you'd like to help out or take the lead here, please send mail to ben at mozilla dot org.

Note

Pretty much all of this applies to Thunderbird and Themes as well!

Posted by ben at July 25, 2004 6:31 PM