User:Clouserw/Add-on Versioning

From MozillaWiki
Jump to: navigation, search

Firefox Add-ons use a complicated but defined versioning system. They also specify application compatibility by using the same toolkit version format.

Firefox OS has Add-ons, but they are much closer to Apps than the traditional Firefox Add-ons. This means that if we do nothing, we'll generally default to how apps work (a mini-manifest for updates, etc.) but we have the opportunity now to improve any places that could use it.

Below are some first thoughts on the big questions here -- please add and modify.

How are add-ons versioned?

Our toolkit versioning is well known at Mozilla, but could be needlessly complex for new add-on authors. Chrome's versioning introduces a simpler version field along with an optional version_name field for any user-facing details (like, beta or rc3).

Recommendation: Let's use the two field approach.

How do add-ons determine compatibility?

Firefox allows applications (eg. Firefox or Thunderbird) to be specified as well as minVersion and maxVersion ranges for each application. Chrome supports only a minimum version.

Recommendation: Our cross-application add-ons are more powerful than Chrome and need the additional granularity. Specifying compatible applications and minimum and maximum versions makes sense. Let’s keep the same functionality (converted from the current XML to the JSON manifest format).

When will add-ons be updated?

Similar to apps, add-ons will ping a mini-manifest URL on the Marketplace asking for updates. Scenarios resulting in an update:

  • A higher version exists and the application is running a compatible version

Scenarios resulting in ‘’’no update’’’:

  • A higher version exists but not on a compatible application

Invalid scenarios which would be rejected during upload/publication:

  • A missing compatible apps section
  • A new version with a lower version number


Open Questions

  • What are my options if I need to offer different versions to different applications? (or different application versions)
  • [Andrew] Will there be an 'id' field? Existing desktop add-ons are based around a unique ID for updates and for determining if an add-on is a new one or an update (both on AMO and in the application). I'm assuming not, as the mini-manifest field will be the de facto ID.
  • [Andrew] What about compatibility with Desktop? Could an add-on for FxOS be installed on Desktop, and visa versa (ignoring API differences, just focusing on install manifests)?
  • [Andrew] Not a question, but a comment - apps don't use the version field in their manifest for anything other than administration and display, so no format is enforced and no greater than existing check is carried out (an app could have versions of, in order, [2, 45,3,3,3,cheese,y%m%mm@,-1]). I.e. any new version uploaded is an update, regardless of the version.