caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Fergus Henderson <fjh@cs.mu.OZ.AU>
To: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] The DLL-hell of O'Caml
Date: Thu, 21 Mar 2002 04:16:22 +1100	[thread overview]
Message-ID: <20020321041621.A4516@hg.cs.mu.oz.au> (raw)
In-Reply-To: <20020320204322L.garrigue@kurims.kyoto-u.ac.jp>; from garrigue@kurims.kyoto-u.ac.jp on Wed, Mar 20, 2002 at 08:43:22PM +0900

On 20-Mar-2002, Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp> wrote:
> From: Fergus Henderson <fjh@cs.mu.OZ.AU>
> 
> > Adding new functions to a module ought not break binary backwards
> > compatibility.  If it does, then you lose many of the benefits of
> > separate compilation.
> 
> Could you specify what benefits?

For example, the ability to install a new version of a library
(with some new functions) without having to recompile everything
that references that library.

This includes the ability to use version N+1 of library `foo' with
version M of library `bar', even though the binary that you have for
version M of library `bar' was build using version N of library `foo'
rather than version N+1.

Binary distributions of libraries is very difficult if you have to
upgrade them all in lock-step anytime a base library changes.

> The current situation in OCaml is that you have to recompile all
> dependencies everytime you change anything in the interface.
> If you use a Makefile, even changing a comment will trigger a
> recompilation.

If you're sure nothing important changed, you can always use
`touch 01010101 filename' to mark that file as old.

> But, in my experience most C makefiles are written in the same way
> meaning that you have to recompile everytime a header changes.

Most C makefiles are written so that dependencies on third-party
library header files are not included in the Makefile dependencies.
(And there are good reasons for this; including such
dependencies can cause as many problems as it solves...)
That imples that if you install a new version of a third-party
library, and then rerun make, it won't recompile your sources.

Also, the issue of makefiles is irrelevant in the case of binary
library distributions, as in the example above with `foo' and `bar'.

> The real problem is about how to check that binary (and semantics)
> compatibility is satisfied.

Sure it would be *nice* if the system checked that automatically,
and handled library major/minor revision numbers accordingly.

But the programmer can also check this manually when
releasing a new version of a library, by comparing the
interface with that of the previous version (e.g. using `cvs diff').
That's what C and C++ programmers have to do, after all.

There are really two issues here.  One is that the language and/or
implementation should give guarantees about what kinds of changes
will preserve binary compatibility, including at a minimum the
requirement that adding new functions should not break binary
compatibility.  The second issue is that it's desirable to have
type-safe linking.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2002-03-20 17:16 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-11  4:28 Mark D. Anderson
2002-03-11  7:12 ` Mattias Waldau
2002-03-11 12:15 ` Gerd Stolpmann
2002-03-12  0:19   ` Jeff Henrikson
2002-03-12 22:00     ` Gerd Stolpmann
2002-03-20 11:20       ` Fergus Henderson
2002-03-20 11:43         ` Jacques Garrigue
2002-03-20 17:16           ` Fergus Henderson [this message]
2002-03-20 12:53         ` Gerd Stolpmann
2002-03-20 13:05           ` Johan Georg Granström
2002-03-20 13:40             ` Gerd Stolpmann
2002-03-20 19:46               ` Alain Frisch
2002-03-20 20:39               ` Xavier Leroy
2002-03-20 21:16                 ` Markus Mottl
2002-03-21  9:07                 ` Warp
2002-03-21 10:18                 ` Christopher Quinn
2002-03-21 18:13                   ` Xavier Leroy
2002-03-21 14:13                 ` Jeff Henrikson
2002-03-21 14:13                   ` [Caml-list] Type-safe DLL's with OO (was DLL-hell of O'Caml) Tim Freeman
2002-03-21 18:10                   ` [Caml-list] The DLL-hell of O'Caml Xavier Leroy
2002-03-21 18:39                     ` Sven
2002-03-21 19:22                     ` james woodyatt
2002-03-21 19:43                     ` Jeff Henrikson
2002-03-22  2:02                     ` Brian Rogoff
2002-03-22 10:11                     ` Warp
2002-03-21 18:50                 ` Sven
  -- strict thread matches above, loose matches on Subject: below --
2002-03-22 10:24 Dave Berry
2002-03-22 10:14 Dave Berry
2002-03-02  0:11 [Caml-list] troubleshooting problem related to garbage collection james woodyatt
2002-03-02  7:57 ` [Caml-list] The DLL-hell of O'Caml Mattias Waldau
2002-03-02 11:56   ` Markus Mottl
2002-03-02 21:40     ` Alexander V. Voinov
2002-03-02 14:46   ` Alain Frisch
2002-03-02 19:00     ` Chris Hecker
2002-03-02 19:42       ` Mattias Waldau
2002-03-02 22:41         ` Chris Hecker
2002-03-03 15:56           ` Vitaly Lugovsky
2002-03-04  9:57         ` Sven
2002-03-04 12:20   ` Jacques Garrigue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020321041621.A4516@hg.cs.mu.oz.au \
    --to=fjh@cs.mu.oz.au \
    --cc=caml-list@inria.fr \
    --cc=garrigue@kurims.kyoto-u.ac.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).