automerge / automerge-swift

Swift language bindings presenting Automerge

Home Page:https://automerge.org/automerge-swift/documentation/automerge/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rust 1.69-nightly binding for catalyst needs review

heckj opened this issue · comments

After a bit of holiday, I came back to the codebase and noted that clean builds of the XCFramework were failing. Multiple pieces appear to have shifted forward to the point that they're incompatible with Rust prior to version 1.70. In #18, @munhitsu pinned Rust to version 1.69 and a specific nightly version to enable Catalyst support, and now it looks like we might need to review how that all goes together.

#75 is a related PR that was updating to the latest Automerge crate, which also experienced a variation of this, but the issue also happens when just working from the main branch of the repo and invoking ./scripts/build-xcframework.sh

rustup update versions currently:

rustup update
info: syncing channel updates for 'stable-aarch64-apple-darwin'
info: syncing channel updates for 'nightly-aarch64-apple-darwin'
info: checking for self-update

   stable-aarch64-apple-darwin unchanged - rustc 1.73.0 (cc66ad468 2023-10-03)
  nightly-aarch64-apple-darwin unchanged - rustc 1.75.0-nightly (59edd6705 2023-10-09)

I don't know what issue @munhitsu in Rust/macabi compilation support that we were working around when we pinned to Rust 1.69 nightly: nightly-2023-02-02, so I took a stab (#77) at the latest Rust nightly build to see if that would compile. It does look like that's doing the trick - at least there's no compilation failure.

Catalyst support is still quite low tier Rust support, so it looks like it does still require a nightly version and -Z build-std to get it operational, although I'll try with a more stock variation to see if that's also more resolved now.

I tried a more aggressive variation in that PR that removed NIGHTLY altogether - waiting for a clean CI environment to make sure it's all kosher to see how it works, but it may be the need to pin down to a specific NIGHTLY has been resolved. Kinda wish I'd figured out what was the fundamental issue earlier, but I'll take it however it works ;-)

ERP - scratch that - more aggressive variation failed because anything using +Z STD_LIB requires a NIGHTLY build of Rust (aka - the Catalyst support), which is an annoyance, but I've updated the PR to at least note that I've shifted the nightly baton further forward, which resolves the fundamental "clean build" issue by using a more recent version of Rust.