Fix: use .build/release/ for arm64 binary path on Codemagic M2#5149
Fix: use .build/release/ for arm64 binary path on Codemagic M2#5149
Conversation
Co-Authored-By: Gemini <noreply@google.com>
Diagnostic build confirmed: xcrun swift build --arch arm64 on native M2 host (Xcode 16.4) outputs to .build/release/ not .build/arm64-apple-macosx/release/. Only x86_64 cross-compilation outputs to the arch-specific subdirectory. Fix all three references in Create universal app bundle: - ARM64_BINARY: .build/release/$BINARY_NAME - SPARKLE_FW: .build/release/Sparkle.framework - SWIFT_BUILD_DIR: .build/release Also remove the failed normalization attempt from Build Swift app step.
There was a problem hiding this comment.
Code Review
This pull request primarily fixes build paths in codemagic.yaml for arm64 builds on Codemagic's M2 runners by updating hardcoded paths to the correct build output directories. The changes appear correct and align with the pull request's description. However, the PR also includes an unrelated change in app/lib/env/env.dart that hardcodes the agentProxyWsUrl. I have raised a critical concern about this change, as it appears to remove support for the omiapi.com domain, which could cause a regression for users in that environment.
| .replaceFirst('http://api.', 'ws://agent.') | ||
| .replaceAll(RegExp(r'/$'), '') + | ||
| '/v1/agent/ws'; | ||
| return 'wss://agent.omi.me/v1/agent/ws'; |
There was a problem hiding this comment.
This change hardcodes the agentProxyWsUrl to use the omi.me domain, removing support for omiapi.com which was mentioned in the previous implementation's comments. If omiapi.com is a valid production domain, this change introduces a regression by breaking agent proxy connections for that environment. If omiapi.com is still in use, the previous logic for deriving the URL from apiBaseUrl should be restored or adapted to handle multiple production domains.
Greptile SummaryThis PR fixes the Codemagic M2 build by updating binary paths to match Swift's native arm64 build output location and hardcodes the agent proxy to production. Key changes:
Notes:
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 41354d2 |
…Hardware#5149) ## Root Cause Diagnostic build confirmed: on Codemagic mac_mini_m2 with Xcode 16.4, `xcrun swift build --arch arm64` outputs to `.build/release/` (native arch path), NOT `.build/arm64-apple-macosx/release/`. Only the x86_64 cross-compilation uses the arch-specific subdirectory. ## Fix Update three path references in "Create universal app bundle": - `ARM64_BINARY`: `.build/release/$BINARY_NAME` - `SPARKLE_FW`: `.build/release/Sparkle.framework` - `SWIFT_BUILD_DIR`: `.build/release` Also removes the failed normalization attempt from PR BasedHardware#5147 (copying didn't persist across the x86_64 build step).
Root Cause
Diagnostic build confirmed: on Codemagic mac_mini_m2 with Xcode 16.4,
xcrun swift build --arch arm64outputs to.build/release/(native arch path), NOT.build/arm64-apple-macosx/release/. Only the x86_64 cross-compilation uses the arch-specific subdirectory.Fix
Update three path references in "Create universal app bundle":
ARM64_BINARY:.build/release/$BINARY_NAMESPARKLE_FW:.build/release/Sparkle.frameworkSWIFT_BUILD_DIR:.build/releaseAlso removes the failed normalization attempt from PR #5147 (copying didn't persist across the x86_64 build step).