Versioning interfaces

Tako Schotanus quintesse at palacio-cristal.com
Tue Nov 15 14:32:44 PST 2005


Robert McQueen wrote:

>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. :)
>
>  
>
Sounds good, at least this is parseable if necessary, maybe say that 
unversioned names should not look like a version? (eg. don't make an 
interface name like "machines.rockets.V2" or something similar :-).

Cheers,
 -Tako



More information about the dbus mailing list