Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Many users are still using Unison 2.48 and are unable to upgrade. This patch provides a best effort compatibility with 2.48. Even though there is no indication that interop with 2.48 clients and servers would not work, there are no guarantees of success. If it doesn't work, however, it is very unlikely to result in data loss or corruption.
With this patch, a single Unison version will be able to interoperate with 2.48, 2.51 and the future releases. It is also able to upgrade from 2.48 without needing to rescan the replicas.
Support for 2.48 is provided according the the table below. OCaml versions must still match.
Server for 2.48 clients
Server support for 2.48 clients is not fully automatic. For the server to support 2.48 clients, the executable must be named with
unison-2.48
prefix. Only the prefix matters. The full executable name could beunison-2.48.exe
orunison-2.48-but-actually-2.52
or whatever you like. By using the nameunison-2.48
there is the benefit of being able to use the-addversionno
preference on the client (relevant only for SSH connections). With other names, use the-servercmd
preference on client (relevant only for SSH connections).A socket server started this way is able to serve 2.48 clients and any clients with this PR or with #626 but not 2.51 clients.
Notes on OCaml compiler version
It is possible to see the OCaml version used to compile Unison by executing
unison -version
. 2.48 did not display the OCaml version this way and it can be a bit difficult to find out the version. The easiest way is to see what is theocaml
package version in the same package repository where you gotunison
package from (hint, for Linux distributions, the typical version is 4.05). If that's not possible then the other way is trying your way through various versions (take this patch compiled with 4.05 and try, then compiled with another version and try and so on).Testing
Volunteer testing is expected of users who would like to use this patch.