Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] The DLL-hell of O'Caml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] The DLL-hell of O'Caml
From: Fergus Henderson <>

> 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?
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
But, in my experience most C makefiles are written in the same way
meaning that you have to recompile everytime a header changes.

The real problem is about how to check that binary (and semantics)
compatibility is satisfied. Adding a function might be OK, but
changing a type is not OK (at least not always; Jun Furuse had some
work on it).
The OCaml approach being to chomp all the interface in a single MD5
value, any meaningful change (including addition of a function) will
prevent you from linking without recompiling.
There were good remarks on the list on how a progressive hashing
algorithm (allowing versioning) would be needed to improve that.

> Does adding new functions to a module actually break binary backwards
> compatibility in O'Caml?

At least it breaks for bytecode, where simple indexes are used to get
But this is not the point: the compiler will not let you link anyway.
I suppose this would be easily corrected if the semantics problem were

I have a strong feeling that what we need is a good versioning system,
at the language or (probably simpler) library level. But the problem
doesn't seem trivial, in particular if you want efficient checking for
dynamic linking.


Jacques Garrigue
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: