[coyotos-dev] IDL compatibility: the versioning nightmare

Jonathan S. Shapiro shap at eros-os.com
Mon Jul 9 23:12:46 EDT 2007


On Mon, 2007-07-09 at 23:02 -0400, Jonathan S. Shapiro wrote:
> The problem is this:
> 
>   Because interfaces are types, interfaces must also be *downwards*
>   compatible.
> 

Okay. With all of my preceding as preamble, I should now re-address one
of Charlie's "wish list" items: new name for existing method. This is
one of the very few cases where introducing a new name does not
introduce a downwards compatibility concern.

The reason is that the downwards compatibility obligation is on the
*binary* interface, not the *source* interface. At source compile time,
I can use any names that appear in my header file. What matters when a
capability is passed at run time is the set of code points that are
assigned.

Because of this, it *is* possible to add a new name that is an *alias*
for an old method name, so long as they share the same code point.

My personal opinion is that we should try very hard to avoid doing this,
but if it becomes any sort of common case then we should add syntactic
support for it by adding an "alias" keyword so that it is painfully
clear what is happening. We can (and should) also add a source-level
"deprecated" mechanism for names that are planned to go away.

Offhand, I believe that both "deprecated" and "obsolete" were reserved
words in CapIDL for just this reason.

shap
-- 
Jonathan S. Shapiro, Ph.D.
Managing Director
The EROS Group, LLC



More information about the coyotos-dev mailing list