This incompatibility is one of the reasons why I reduced my dependency on it, though I still use it for minor things.
The last straw came when it turns out that unison was incompatible with the same version, if that version had been built on a different system. I can't remember the details but there was some library version difference that results in a unison that has the same version number but wouldn't talk to one from another system without crashing.
That can happen because unison uses OCaml's built in serialization, which isn't guaranteed to be stable across OCaml versions. It doesn't often change, but the representation of arrays was changed in OCaml 4.02, which meant unison compiled with 4.01 couldn't sync with unison compiled with 4.02. Debian bug discussing the issue: https://bugs.debian.org/802919
> which isn't guaranteed to be stable across OCaml versions
Oh, so OCaml is a toy language from academics. I've read so many good things about it over the years, but no one mentioned that aspect of it. There should be a law about putting a warning in Big Red Letters on the box so someone doesn't make the mistake of using it in a large, long lived project.
> There should be a law about putting a warning in Big Red Letters on the box so someone doesn't make the mistake of using it in a large, long lived project.
It's documented, and it's not intended to be used for serialization, you use it in very particular cases, for example for faster object sharing with IPC for multicore. We use Json or S-expressions or other stuff for that purposes.
I really don't know why unison people don't switch to a proper serialization.
This was very upsetting when it happened. The same version of unison was incompatible with itself if they had been built with different but consecutively released versions of the ocaml compiler. I feel like using compiler versions like 4.01 and 4.02 is irresponsible when it's documented that they produce binary incompatible products, but that is how it was. https://marc.info/?l=unison-users&m=142286809310149
An ugly way around it is to compile your own version of unison. The good news, if I remember correctly, is that the binary can be built in one place and copied around to the other hosts (and say put in $HOME/bin.)
The last straw came when it turns out that unison was incompatible with the same version, if that version had been built on a different system. I can't remember the details but there was some library version difference that results in a unison that has the same version number but wouldn't talk to one from another system without crashing.
Drove me crazy.