public inbox for
 help / color / mirror / Atom feed
* unison2.48-2.48.4-2 (Warning: possible breakage)
@ 2020-08-31 20:47 Andrew Schulman
  0 siblings, 0 replies; only message in thread
From: Andrew Schulman @ 2020-08-31 20:47 UTC (permalink / raw)
  To: cygwin-announce

The unison2.48 package has been updated in Cygwin. This new release,
version 2.48.4-2, has been rebuilt with OCaml 4.08.1, which makes it
compatible for syncing with Ubuntu Focal and the current Debian testing.

*Warning*: This update may be a breaking change, if you use unison2.48 to
synchronize with hosts that run other Linux distros. This is because two
Unison executables have to be built with the same version of OCaml in order
to be compatible. For discussion of this newly-discovered problem and how
we plan to deal with it in Cygwin, see OCaml Versions, below.

== Unison Versions in Cygwin

Unison is packaged for Cygwin as several independent packages, each
providing a version of Unison that is incompatible with the others. You
have to run compatible versions of Unison on the client and server, or
Unison will issue an error message and quit. Two versions of Unison are
compatible only if the first two numbers in their version strings are the
same. For example, all versions 2.48.* are compatible with each other, and
incompatible with versions 2.51.*. By installing one or more of the
packages listed above, you can run whichever version you need in order to
synchronize with your server.

The unison* packages install a convenience symlink from /usr/bin/unison to
one of the versioned unison executables, e.g. unison-2.48.exe.
alternatives(8) is used to manage the symlink. If the symlink is being
managed in "auto" mode, then it will automatically track the highest
numbered version of unison that you have installed. You can override this
by either changing the symlink manually with ln(1), or, preferably, by
using alternatives(8):

alternatives --display unison   shows you the installed versions of unison,
their priorities, which executable the symlink points to, and whether the
symlink is being managed in "auto" or "manual" mode.

alternatives --config unison   presents a menu from which you can choose
which version you want to use as the default.  This puts the symlink in
manual mode.

alternatives --auto unison   puts the symlink in automatic mode, where it
will always point to the highest numbered version of unison that's
installed on your host.

alternatives --set unison /usr/bin/unison-$V.exe   forces the symlink to
point to unison-$V.exe, and puts it in manual mode.

Please see alternatives(8) for more details.

== OCaml Versions

There is unfortunately another layer of incompatibility in Unison: Two
Unison executables are only compatible if they were built with the same
version of OCaml. If you use, say, Unison 2.48 on two different hosts, but
one was built with OCaml 4.08.1 and the other with OCaml 4.10.0, you'll get
the dreaded error message

  Fatal error: Fatal error during unmarshaling (input_value: ill-formed
  message), possibly because client and server have been compiled with 
  different versions of the OCaml compiler.

This is a bad feature, of OCaml apparently. It means that in order to be
sure of being able to sync with another host, we could potentially need a
separate Unison package for every combination of Unison and OCaml.

For now, Unison packages for Cygwin are being built with the OCaml version
that seems to make them most generally compatible with other Linux distros:

Package     OCaml version  Compatibility
----------  -------------  -------------
unison2.27  ?              ?
unison2.32  ?              ?
unison2.40  ?              ?
unison2.45  ?              ?
unison2.48  4.08.1         Debian bullseye (testing), Ubuntu Focal
unison2.49  ?              ?
unison2.51  ?              ?

Packages with "?" are older builds, where the OCaml version isn't currently

If your distro uses a different combination of Unison and OCaml versions
that you need in order to sync, please let me know here. If it's widely
used, I might update one of the existing builds, or make a new Cygwin
package for it.

Future versions of Unison may get around the OCaml version incompatibility.
For more discussion of the problem, see

Andrew E. Schulman

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-31 20:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-31 20:47 unison2.48-2.48.4-2 (Warning: possible breakage) Andrew Schulman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).