perry-ui-ios fails to compile for an iOS target. foundation_models.rs:108 calls perry_runtime::thread::pin_promise, which no longer exists — it is the only reference to that symbol left in the tree, and it was orphaned when the pinning API moved (last touched by #8700 in August).
error[E0425]: cannot find function `pin_promise` in module `perry_runtime::thread`
--> crates/perry-ui-ios/src/foundation_models.rs:108:37
error: could not compile `perry-ui-ios` (lib) due to 1 previous error
Why it went unnoticed: the crate is #![cfg(target_os = "ios")], so on a macOS host cargo build -p perry-ui-ios compiles it to nothing and the reference is never checked. It only surfaces on an actual iOS target build (--target aarch64-apple-ios-sim).
Fix: pin the cross-thread promise through the current API. The primitive is perry_runtime::gc::pin_object on the promise's GC header; perry_stdlib::common::async_bridge::pin_promise_for_native_resolution(promise_ptr: usize) already wraps exactly this. Route foundation_models.rs to the same mechanism.
CI gap to reconcile: iOS workflows exist (test.yml, simctl-tests.yml). If none of them compiles perry-ui-ios for an iOS target, that is the gate gap that let this land — a compile of this crate for aarch64-apple-ios[-sim] would have caught it. Worth a required build step.
Found while implementing #9954 (TextField padding), which needed an iOS-sim compile to verify.
🤖 Generated with Claude Code
perry-ui-iosfails to compile for an iOS target.foundation_models.rs:108callsperry_runtime::thread::pin_promise, which no longer exists — it is the only reference to that symbol left in the tree, and it was orphaned when the pinning API moved (last touched by #8700 in August).Why it went unnoticed: the crate is
#![cfg(target_os = "ios")], so on a macOS hostcargo build -p perry-ui-ioscompiles it to nothing and the reference is never checked. It only surfaces on an actual iOS target build (--target aarch64-apple-ios-sim).Fix: pin the cross-thread promise through the current API. The primitive is
perry_runtime::gc::pin_objecton the promise's GC header;perry_stdlib::common::async_bridge::pin_promise_for_native_resolution(promise_ptr: usize)already wraps exactly this. Routefoundation_models.rsto the same mechanism.CI gap to reconcile: iOS workflows exist (
test.yml,simctl-tests.yml). If none of them compilesperry-ui-iosfor an iOS target, that is the gate gap that let this land — a compile of this crate foraarch64-apple-ios[-sim]would have caught it. Worth a required build step.Found while implementing #9954 (TextField padding), which needed an iOS-sim compile to verify.
🤖 Generated with Claude Code