Le 25/10/2015 07:10, Mark J. Nelson a écrit :
> Due to a change in ocaml's serialization format, unison built with an
> ocaml pre-4.02 can't synchronize with one built with 4.02 and
> later. This causes a compatibility mess, since the usual requirement
> that both endpoints must have the same unison version is no longer
> sufficient: they now have to have both the same unison version *and*
> be built by compatible versions of ocaml, either both pre-4.02 or both
> post-4.02.
> 
> There is some discussion on the unison-users list here:
> http://marc.info/?l=unison-users&m=142286809310149&w=2

More precisely, what changed (at least) is the representation of (char)
big arrays:

  http://caml.inria.fr/mantis/view.php?id=6064

The serialization format itself did not change AFAICT.

This is bad news. It means that we can no longer guarantee
stable<->testing compatibility. The trick used so far was to provide
several unison packages, but all compiled with the same OCaml version.
And providing several ocaml packages (that would probably mean the whole
matrix ocaml version x unison version) is out of question.

> I am not sure what the best solution is. For the near-term future,
> there will probably be a significant number of installations needing
> both to be available. For example any Debian stable server will be
> using the pre-4.02 unison for some time to come. But anyone using
> unison on OSX via Homebrew, Macports, or pkgsrc already needs a
> post-4.02 version to sync with.

For Debian stable<->testing synchronizations, one possibility is to have
a testing chroot on the stable system (or the other way around) so that
both unisons are the same.

I don't see a proper solution for this. It is a design decision of
Unison to depend on OCaml serialization, which is unsafe and not
guaranteed to be stable across OCaml versions. A similar issue can
happen with OCaml 4.03. The compatibility we've observed so far was just
chance. The proper fix would be to use a dedicated serialization library
with stability guarantees.


Cheers,

-- 
Stéphane

Reply via email to