fix: restore Apple builds under SwiftFormat 0.62.1#103098
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 9, 2026, 4:41 PM ET / 20:41 UTC. Summary PR surface: Tests +15, Config +12, Other +7. Total +34 across 5 files. Reproducibility: yes. A macOS environment using SwiftFormat 0.62.1 can reproduce this by running the shared SwiftFormat lint path or pnpm ios:build on current main; source shows both Apple lanes consume config/swiftformat, and the PR body provides before-fix diagnostics. Review metrics: 2 noteworthy metrics.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Keep the narrow shared SwiftFormat config and CI-routing fix, then merge after exact-head Apple CI proves the Homebrew-upgraded formatter path or switch to an exact SwiftFormat pin if maintainers want deterministic installs. Do we have a high-confidence way to reproduce the issue? Yes. A macOS environment using SwiftFormat 0.62.1 can reproduce this by running the shared SwiftFormat lint path or pnpm ios:build on current main; source shows both Apple lanes consume config/swiftformat, and the PR body provides before-fix diagnostics. Is this the best way to solve the issue? Yes. Disabling the three new formatter rules in the shared config and routing shared Swift lint config changes through both Apple lanes is narrower than a 172-file source reformat; the remaining choice is whether Homebrew latest is acceptable or should be replaced by an exact pin. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bb16ca50d622. Label changesLabel justifications:
Evidence reviewedPR surface: Tests +15, Config +12, Other +7. Total +34 across 5 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
|
Land-ready proof for exact head
Known proof gaps: none. |
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where developers running Apple builds with SwiftFormat 0.62.1 would hit hundreds of pre-existing lint failures and
pnpm ios:buildwould abort. SwiftFormat 0.62 newly enabled rules that conflict with the repository's established compact conditional and SwiftUIGroupstyle.Why This Change Was Made
The shared config now requires SwiftFormat 0.62.1 and explicitly disables
wrapIfStatementBodies,wrapIfExpressionBodies, andredundantSwiftUIGroup. All three Apple CI consumers refresh and upgrade SwiftFormat before using that config, and shared Swift lint config changes now route through both macOS and iOS CI. This avoids a 172-file, 3,588-line formatting pass that would also make structural SwiftUI rewrites.User Impact
Apple contributors can run the repository's iOS build and macOS Swift lint with Homebrew SwiftFormat 0.62.1 without unrelated formatter drift. There is no runtime behavior change.
Evidence
0/264 files require formatting, 2 files skipped.pnpm ios:build— passed locally, including the always-run SwiftFormat phase; Xcode build succeeded in 226.984 seconds.pnpm test src/scripts/ci-changed-scope.test.ts— 30/30 passed on Blacksmith Testbox leasetbx_01kx46qbdxwxt2x7zqy5ee8acv.--min-version 0.62.1requirement instead of failing on unknown rule names.