Skip to content

CI: compile every plugin's native sources on Xcode 26 and 27 - #33

Merged
MAUstaoglu merged 1 commit into
mainfrom
ci-native-sources
Oct 24, 2026
Merged

MAUstaoglu merged 1 commit into
mainfrom
ci-native-sources

Conversation

@MAUstaoglu

Copy link
Copy Markdown
Member

Fixes #17.

Problem. CI ran on Ubuntu and never compiled packages/*/watchos. In #12, a symbol declared only in the watchOS 27 SDK would have broken every Xcode 26 build while CI stayed green.

The check. tool/check_native_sources.sh compiles every tracked native source the way the CLI does, with -fsyntax-only, for arm64-apple-watchos26.0 and its Simulator triple:

  • .m, .mm and .c go through clang with the CLI's flags: -fobjc-arc -fmodules -I<each header directory>.
  • SwiftUI view sources go through swiftc -typecheck, with a copy of the CLI's registration shim (tool/native/plugin_views_shim.swift, from CLI 0.1.1).
  • An error or a warning fails. A deprecation is counted instead, since in_app_purchase_watchos uses StoreKit 1 on purpose (59 deprecation warnings) and video_player_watchos uses one deprecated AVFoundation call.
  • The four firebase packages are listed and skipped: their Package.swift names a SwiftPM package, and only a SwiftPM build provides those modules (spec open question; not on every PR).

The native job runs the check on macos-26 with Xcode 26.0.1 (the oldest the CLI supports) and 26.6, and on xcode-27 with Xcode 27.0. It then runs the check's own tests there. Their fixtures cover:

  • the plan, with --list, which also runs on Ubuntu;
  • an undeclared symbol and a warning, which must fail;
  • a clean source with a deprecation and a SwiftUI view that uses the shim, which must pass.

Local results. On main, all 38 compiles (36 clang, 2 swiftc) are clean on Xcode 26.6 and 27.0. 159 tool tests pass, and the word, generated-files and test-name checks pass.

CI ran on Ubuntu and never compiled packages/*/watchos. In #12 a symbol
declared only in the watchOS 27 SDK would have broken every Xcode 26 build
with CI green (#17).

tool/check_native_sources.sh compiles every tracked .m, .mm and .c the way
the CLI does (clang -target arm64-apple-watchos26.0[-simulator] -fobjc-arc
-fmodules -I<each header directory>), with -fsyntax-only, and type-checks
SwiftUI view sources with swiftc and a copy of the CLI's registration shim
(tool/native/plugin_views_shim.swift, CLI 0.1.1). An error or a warning
fails; a deprecation is counted, as in_app_purchase_watchos uses StoreKit 1
on purpose. The four firebase packages, whose Package.swift names a SwiftPM
package, are listed and skipped: only a SwiftPM build provides those modules.

The new `native` job runs it on macos-26 with Xcode 26.0.1 and 26.6, and on
xcode-27 with Xcode 27.0, then runs the check's own tests there. Its
fixtures cover the plan (--list, also on Ubuntu), an undeclared symbol and a
warning (fail), and a clean source with a deprecation and a view that uses
the shim (pass).

Locally, on plugins main, all 38 compiles are clean on Xcode 26.6 and 27.0.
@MAUstaoglu
MAUstaoglu merged commit fca5326 into main Oct 24, 2026
4 checks passed
@MAUstaoglu
MAUstaoglu deleted the ci-native-sources branch October 24, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: syntax-check every plugin's native watchOS sources with Xcode 26 and 27

1 participant