On 01/02/14 19:59, Isaac Dupree wrote:
On 02/01/2014 06:27 AM, Matthieu Monrocq wrote:
In short, isn't there a risk of crashes if one accidentally links two
versions of a given library and start exchanging objects ? It seems
impractical to prove that objects created by one version cannot
accidentally end up being passed to the other version:

- unless the types differ at compilation time (seems awkward)

Haskell does this. Types are equal if their {package, package-version, module-name, type-name} is the same. (Or maybe it is even more rigorous about type equality.) Using multiple versions of some packages turns out not to be awkward at all, such as libraries for writing tests and libraries that don't export important data types.


This sounds useful, but still seems like it's prone to error, unless you can define versions in some reliable way, which works despite distributed repositories, branches on those repositories, etc.

Does anyone have a proposal for methods of doing that? I think it would require tracking version + hash of all code --- a bit like the way git tracks the head of a branch. Is that what the hash in rust libraries currently includes?


--
Lee

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to