[plt-scheme] On PLaneT packages and compatible upgrades

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed May 10 08:27:14 EDT 2006

At Wed, 10 May 2006 07:58:01 -0400, Matthias Felleisen wrote:
> I would very much prefer a tool -- "Compatible Extension" -- that 
> consumes two modules and either says "yes" or lists the things that one 
> module exports and the other doesn't. In addition, it should come with 
> an option "Generate Adapter," which produces a module m- with the same 
> interface as m.v0 but with values from m.v1. (This should be N+2 lines: 
> module, import plus one export per m.v0 interface.)

This took me a while to understand. I'll repeat it back just to see if
I do understand:

 1. Adding exports is not a compatible upgrade.

 2. Suppose the only change between version N.M and (N+1).0 is bug
    fixes plus new exports. In that case, it's trivial to implement
    version N.(M+1) in a way that captures future bug fixes in the
    (N+1).* series: import (N+1).*, then re-export everything that was
    exported from version N.M.

 3. Since the implementation of N.(M+1) is trivial given N.M and
    (N+1).0, it would be nice to have a tool that does it for you.

 4. Also, library implementors should also use a tool to double-check
    that any implementation K.(J+1) is a compatible extension of K.J
    (i.e., it has the same exports).

Is that right? If so, I like it.


Posted on the users mailing list.