Versioning interfaces

Robert McQueen robert.mcqueen at collabora.co.uk
Tue Nov 15 06:21:21 PST 2005


OK, so moving forward, here's my proposal:

1) Patch the spec to RECOMMEND that the minor version of an interface is
defined as:
 number of methods, properties and signals + version delta
Where version delta is an interface annotation:
 <annotation name="org.freedesktop.DBus.InterfaceVersionDelta" value="x" />
Wherein x is a positive integer, and assumed to be 0 if not present, and
should be incremented if a change is made that does not entail adding a
signal or a method. Services SHOULD NOT remove methods or signals, or
cause a previously valid method invocation to become invalid.

2) Patch the spec to RECOMMEND that when a method is removed or its
behaviour changed, a new version of an interface is created by:
 a) a ".VX" string is appended to its name if not present, where X is a
positive integer
 b) incrementing X if .VX is present

3) Provide a function in the bindings to return the value of this
version number on an interface you're intending to use. I'll do the
Python one. :)

Comments?

Regards,
Rob


More information about the dbus mailing list