Skip to content

fix(ios): runtime clang builds must not use -Werror; cache the fold helper build #2796

Description

@thymikee

Purpose

Two runtime clang builds compile with -Werror: packages/platform-apple/src/snapshot-source/cache.ts:101 (the AX bridge) and packages/platform-apple/src/foldable/simulator-hid.ts:28 (fold). A new warning in a future Xcode SDK would break these features on users' machines. The code itself hasn't changed, and users can't fix it.

Fold also recompiles apple/fold-helper/Fold.m into a temp directory on every fold call (simulator-hid.ts:19-38; the temp directory is deleted at :66-68). The bridge already has a content-hashed, locked build cache (cache.ts:53-78).

Line references are at 01328de411.

Required behavior

  • Runtime builds do not use -Werror. Warnings still fail the repo's own CI checks, if such a check exists or is added. Record which one in the PR.
  • The fold helper is built through the same cache mechanism as the bridge. The cache key includes the source hash and the toolchain identity (cache.ts:54,138), so switching DEVELOPER_DIR never serves a stale binary.

Completion conditions

  • Unit tests assert that neither argv contains -Werror, and that a second fold call does not invoke clang.
  • pnpm check:affected --run is green.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions