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

Re: About this ocaml versioning stuff



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.

> 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.

Denis



Reply to: