GInterfaces and API Stability



I have been working on the 2.12 bindings for Gtk# and have noticed a
stability issue for us related to GInterfaces.  In Atk and Gtk, it seems
there is no restriction against adding methods to stable GInterfaces.
There have been numerous additions to the Atk interfaces while in
"stable" mode.  A GetCells method was added to the GtkCellLayout
interface in 2.12.  There may be more, I'm still working through the new
API generated by our tools.

We have recently added a GInterface registration capability to Gtk#, so
this is going to be a real stability issue for us, going forward.  We
can wave our hands and pretend these previous additions weren't
stability breaks since our GInterfaces were consume-only until now, but
with implementation support starting in Gtk# 2.12, subsequent additions
to existing interfaces will be problematic for us.

While it may not break C ABI/API to add a method to an existing
GInterface, adding a method to an interface is a clear break in C#.  You
must implement all members of a C# interface, so code which previously
compiled will break when a method is added to an interface.

I'm hoping this is just one of those "oops, never thought of that" kinds
of issues and the gtk+ and atk maintainers will avoid extending these
stable interfaces going forward.  It's a significant binding support
issue.

-- 
Mike Kestner <mkestner novell com>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]