bcpierce00 / unison

Unison file synchronizer
GNU General Public License v3.0
4.08k stars 229 forks source link

GHA: Build with OCaml 5.1.0 + compatibility fixes #972

Closed tleedjarv closed 12 months ago

tleedjarv commented 1 year ago

OCaml 5.1.0 had two breaking changes that were not marked as such in the changelog.

One breaking change/bug makes all executables built by OCaml to be dynamically linked with libzstd. This is not an issue within CI, as long as we don't publish the resulting binaries. On the other hand, this does break the uimac Mac native GUI build. This is easily worked around within the GHA script. I deem the temporary workaround within the GHA script acceptable as this issue is hopefully fixed in 5.1.1 or 5.2.0.

The other breaking change is also something which only breaks the uimac Mac native GUI. Working around this requires supplying OCaml version-dependent configuration to xcode to link against correct libraries. Since I don't have access to a Mac or xcode, I made the fix so that it works for CI builds; don't know if it's actually the "correct way".