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

Re: About this ocaml versioning stuff



On Wed, Jul 16, 2003 at 10:07:40PM +0200, Denis Barbier wrote:
> On Tue, Jul 15, 2003 at 09:02:22PM +0200, Sven Luther wrote:
> [...]
> >   1) The problem of bytecode programs and backward compatibility
> >      thereof. each bytecode program depends on the exact same version of
> >      ocamlrun it was compiled for. If ocaml gets upgraded to a new
> >      version, the bytecode programs will break, you have to recompile
> >      them which may or may not be possible. Some of these you can and
> >      should update, but some you may not have the source for.
> > 
> >   2) The problem of having multiple ocaml implementation installed side
> >      by side, to compile and use programs with various versions of ocaml
> >      at the same time. Nice for developer wanting to release programs
> >      that can compile on various versions of the compiler suite.
> > 
> >   3) The testing migration stuff. This is a good reason, to have 3.07
> >      enter testing quickly, but may not be really important, as we have
> >      showed that we can handle quick migrations.
> 
> In fact (1) and (3) are very similar.

Well, (1) is one of the reasons for the strict dependency which cause
(3).
> 
> > Again, all these which is discussed can be applied to two things :
> > 
> >   a) the compiler suite : i already did the job, we can use it.
> > 
> >   b) the libraries, which is more complicated.
> 
> As I am pretty inexperienced with ocaml, I dare asking this question:
> when multiple ocaml versions are installed, could ocamlrun be a wrapper
> and call the right version?  E.g. if the program was compiled against
> ocaml 3.07, it calls ocamlrun-3.07.
> This way bytecodes have a #!/usr/bin/ocamlrun shebang line like other
> distros, and they are not broken when ocaml is upgraded.
> Of course I have no idea whether this is doable.

No, this does not work. When you upgrade the ocaml compiler suite, you
have to recompile all the programs so that they will run with the new
ocamlrun. the ocamlc compiler embeds the #!/usr/bin/ocamlrun line
corresponding on where its actual compiler is. Thus in the suffix
version, ocamlc-3.07 will embedd ocqamlrun-3.07, even if it was called
trough a ocamlc symlink.

I consider the fact of chqnging the ocamlrun by ocamlrun-3.07 as the
true big reason for this. Even if Jerome don't agree, not having to
rebuild every bytecode executable when we install a new version is a
great win. Upstreaæ should really do it like that also, but they lack
the globalæ vision and would much prefer to have only the latest version
of ocaml everywhere. Since caml-light is still used a lot, i think their
vision is utopic, and we should handle more than this.


Friendly,

Sven Luther



Reply to: