Unison 因“格式错误的消息”错误而失败,远程和本地版本相同

Joh*_*nts 10 unison

升级到 Mac OS X Catalina 后,我试图让一致工作。不幸的是,macports 安装了更新版本的 ocaml (4.08.1),这意味着 unison 2.51.2 版本将无法编译。

好吧,那没问题,我只是同步更新到 git master,然后重新编译。不幸的是,这在同步时失败,因为用于在 mac (4.08.1) 上编译的 ocaml 版本与用于在另一台机器 (4.07.1) 上编译的版本不同。叹。好的,使用 opam magic 在我的机器上安装 4.07.1。一切都应该没问题吧?不!

这是错误:

Connected [//zzzmyhost//home/clements/unison-home -> //zzzmyotherhost//Users/clements/clements]
Looking for changes
Uncaught exception Failure("input_value: ill-formed message")
Raised at file "/private/tmp/unison/src/lwt/lwt.ml", line 126, characters 16-23
Called from file "/private/tmp/unison/src/lwt/generic/lwt_unix_impl.ml", line 102, characters 8-23
Called from file "/private/tmp/unison/src/update.ml" (inlined), line 2105, characters 2-69
Called from file "/private/tmp/unison/src/uitext.ml", line 978, characters 16-56
Called from file "/private/tmp/unison/src/uitext.ml", line 1066, characters 6-90
Called from file "/private/tmp/unison/src/uitext.ml", line 1088, characters 19-66
Called from file "/private/tmp/unison/src/uitext.ml", line 1144, characters 21-43
Run Code Online (Sandbox Code Playgroud)

这是怎么回事?

Joh*_*nts 8

叹息......这里的问题(非常不明显)实际上是一个损坏/格式错误的同步文件,在早期测试中执行失败的同步时创建的。

解决方案只是进入~/Library/Application Support/Unison(在 UNIX 机器上,此路径可能存在~/.unison并删除导致问题的存档文件(可能是最新的)。在紧要关头,只需删除所有存档文件并重新开始。

  • @ArieSkliarouk 我对 Ubuntu 20.04 也有同样的问题。 (3认同)
  • 删除存档统计文件对我没有帮助。我怀疑问题出在某些 lib unison 使用中,因为我最近将一侧升级到了 ubuntu 20.04(另一侧仍然是 ubuntu 18.04)。 (2认同)