caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sven <luther@dpt-info.u-strasbg.fr>
To: Xavier Leroy <xavier.leroy@inria.fr>
Cc: "Gerd Stolpmann" <info@gerd-stolpmann.de>,
	"Johan Georg Granström" <georg.g@home.se>,
	caml-list@inria.fr
Subject: Re: [Caml-list] The DLL-hell of O'Caml
Date: Thu, 21 Mar 2002 19:50:07 +0100	[thread overview]
Message-ID: <20020321195007.B26315@dpt-info.u-strasbg.fr> (raw)
In-Reply-To: <20020320213925.A25391@pauillac.inria.fr>; from xavier.leroy@inria.fr on Wed, Mar 20, 2002 at 09:39:25PM +0100

On Wed, Mar 20, 2002 at 09:39:25PM +0100, Xavier Leroy wrote:
> But A.cmo does not contain SIGB -- only a mention of B and a hash of
> SIGB.  The reason is quite simple: A.cmo would be *huge* if it
> included a copy of the signatures of every module it refers, either
> directly or indirectly.  (Think several megabytes.)

Just curious, ...

would it not be enough if A.cmo had the type information of the part of B it
is going to use, and forget about the rest of it ? I remember some papers on
type discipline doing this kind of stuff.

> Having only hashes of signatures, all the linker can check is
> hash(SIGB) = hash(SIGB'), that is SIGB = SIGB'.
> 
> > Anyway, only being able to add functions is not sufficient. There are
> > many possible changes of modules that would not break "source-code 
> > compatibility", but would certainly break binary compatibility, e.g.
> > new optional arguments, new variants, new methods, etc.
> 
> This is another good point: even if we allowed SIGB' <: SIGB at
> link-time instead of requiring SIGB = SIGB', there are many
> "reasonable" changes in a signature that would break subtyping, like
> those you mention above.  And this is inevitable: these changes could
> break type-safety of existing programs.
> 
> To summarize: I believe binary compatibility doesn't really work in a
> strongly, statically-typed language.  It sometimes works for
> dynamically-typed or weakly-typed languages (Perl, C), although
> run-time failures are not unheard of.  Copious link-time
> re-type-checking as in Java makes it work sometimes too, although on
> close examination Java's binary compatibility rules are quite complex
> and restrictive.
> 
> Conclusion for OCaml?  Forget about binary compatibility, binary-only
> distributions, versioning, and all that.  All we need for OCaml
> libraries is source distribution, a standardized re-building procedure,
> and a place to record cross-library dependencies, so that everything
> that needs to be recompiled when something changes can be recompiled
> automatically.  Something like a source RPM or Debian package, or a
> BSD port.

Even for that, it is nice to have propper versioning support, right now, the
policy for debian packagers, is once the ocaml package changes (new upstream
release,, which more often than not breaks binary compatibility, but sometimes
only partially)., then all packagers need to recompile all the ocaml
libraries, and just to be sure, it is best to rebuild the program packages
also. But this needs still human intervention on the part of the developpers
to adapt the package if needed, and a lot of work for all the 8 arches
which will be supported by woody, without even counting all those not yet
fully supported arches which don't have autobuilders.

I would like a lot to have more information on versioning available.

> I believe this is a much more reasonable objective than dreaming about
> binary compatibility and whatnot.  Still, it's not trivial:
> the authors of existing OCaml libraries (myself included) have some
> work to do to implement fully automatic build of their libraries...

:)))

Friendly,

Sven Luther
-------------------
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


  parent reply	other threads:[~2002-03-21 18:49 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
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 [this message]
  -- 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=20020321195007.B26315@dpt-info.u-strasbg.fr \
    --to=luther@dpt-info.u-strasbg.fr \
    --cc=caml-list@inria.fr \
    --cc=georg.g@home.se \
    --cc=info@gerd-stolpmann.de \
    --cc=xavier.leroy@inria.fr \
    /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).