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

wish-list for OCaml ABI compatibility rules



On Tue, Jan 08, 2008 at 08:39:04PM +0100, Christophe TROESTLER wrote:
> On Mon, 7 Jan 2008 22:17:31 +0100, Stefano Zacchiroli wrote:
> > 
> > FWIW it would also save a lot of time and effort for maintainers of
> > OCaml-related software in (binary-based) GNU/Linux distributions, as
> > Debian and Red Hat.
> >
> On Tue, 8 Jan 2008 16:03:51 +0000, Richard Jones wrote:
> > 
> > This is certainly true.  The single, brittle digest is a real problem
> > for Red Hat.  It should be at least possible to add additional values
> > and types without that causing incompatibility.
> 
> Why don't you guys discuss exactly what kind of robustness you need
> and introduce a feature wish in the bug tracker?

Well, why not

Let's see what would be my top wish-list items:
1) ability to add .mli components without breaking the ABI
2) ability to change non semantic relevant .mli parts (e.g. comments)
   without breaking the ABI
3) (optional, i.e. which can be enabled/disabled) safety to change the
   implementation without breaking the ABI (ATM md5sums at the .mli
   level do *not* guarantee that native code linking would work, due to
   inlining)

Richard, and d-o-m folks, any other request which come to your mind?

(1) and (2) above would presumably require to keep not only a single
md5sum per .cmi, but rather an associative list mapping .mli component
identifiers to md5sums of their "types". Then, checking for "consistent
assumption" on such a structure would be far more expensive, but at
least it would be required only at link time.

(3) can be enforced at package maintenance level by disabling inlining
for native code object, and I say it would be a reasonable thing to do
in distributions. Haven't the C lib stuff already experienced such
issues?  (or maybe not, I don't know if code inlining across libraries
is possible in C/C++) if so maybe we can learn from them?

Cheers.

-- 
Stefano Zacchiroli -*- PhD in Computer Science ............... now what?
zack@{upsilon.cc,cs.unibo.it,debian.org}  -<%>-  http://upsilon.cc/zack/
(15:56:48)  Zack: e la demo dema ?    /\    All one has to do is hit the
(15:57:15)  Bac: no, la demo scema    \/    right keys at the right time


Reply to: