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

Re: New dependency system.



Stefano Zacchiroli a écrit :
> Sylvain's argument was that it is better to keep = ${binary:Version}
> dependencies because you don't always have enough stuff in a given
> binary package to understand the ABI exposed by that package. [1] I
> considered the case that in my opinion is the most dangerous in that
> respect, that is a package shipping only a .so. I think it is the most
> dangerous because none of the OCaml-aware *info tool we have can extract
> checksum information from it.

I now tend agree with Sylvain's argument ;-) If an incompatible change
is made in the C part in a way that is not catchable by dh-ocaml (this
is theoretically impossible, after all), it will be possible to install
a wrong .so with a -dev package while satisfying all package-level
dependencies. But il will also be possible to install a wrong .so with
one of its reverse-dependencies, and I don't know how we could prevent this.

Now, I agree that somehow, the .so should be taken into account while
computing the ABI. It's easy for native code (if not already done...) to
put the expected ABI of C stubs in the .cmx file... which is quite
ironic, since .so are useless for the native case ;-)

I think it should be doable to automatically compute the expected ABI of
stubs during compilation of .ml files: it can be implemented by
compiling the result of "ocamlc -i". Actually, it's a bit more than
that, since signatures can be restricted, but basically, that's the
idea: keep externals with their (potentially private) types.

-- 
Stéphane


Reply to: