Skip to content

Port Android/Skip build support (OpenCombine swap) - #1

Merged
poly-georgevisconti merged 3 commits into
mainfrom
android-build-support
Jul 9, 2026
Merged

Port Android/Skip build support (OpenCombine swap)#1
poly-georgevisconti merged 3 commits into
mainfrom
android-build-support

Conversation

@poly-georgevisconti

@poly-georgevisconti poly-georgevisconti commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Ports the single-commit Android build fix from theleftbit/connect-swift@codex/fix-android-build onto our fork, preserving the original commit and authorship. Our main is at upstream v1.2.3 (ed56816), which is exactly the commit the fix was written against, so this is a clean fast-forward.

The fix makes connect-swift build and pass tests under Skip/Android, primarily by swapping Combine for OpenCombine plus small portability adjustments (locking, logging, URLSession streaming) across 20 files.

Why

Polymarket/swift-proto-gateway-us (the generated Connect bindings package consumed by the mobile app) currently depends on theleftbit's fork as a POC. To take that dependency in-house it needs this commit on our fork; after merge, main will be tagged 1.2.3-polymarket.1 and the bindings package pinned to that tag.

Test plan

  • Upstream v1.2.3 plus this exact commit is what swift-proto-gateway-us has been building against throughout the POC (iOS + Skip/Android).
  • After merge + tag, swift-proto-gateway-us will be re-pinned and resolved/built against it.

🤖 Generated with Claude Code


Note

Medium Risk
Threading changes (NSRecursiveLock vs os_unfair_lock) and Darwin-only URLSession affect core HTTP paths on Apple; non-Darwin builds rely on NIO and OpenCombine, which is a new dependency surface for mocks.

Overview
Adds Skip/Android build support by making Apple-only APIs optional and supplying OpenCombine where Combine is unavailable.

ConnectMocks and generated mock code now import OpenCombine when Combine is missing; Package.swift pins OpenCombine 0.15.1. ConnectMockGenerator emits the same conditional imports.

URLSession-based HTTP (URLSessionHTTPClient, URLSessionStream) is wrapped in #if canImport(Darwin). ProtocolClient’s default URLSessionHTTPClient() convenience initializer is Darwin-only; non-Darwin callers must pass an explicit HTTPClientInterface (e.g. NIO). Conformance CLI and tests gate the urlsession client and URLSession-specific integration tests behind Darwin.

Lock switches from os_unfair_lock to NSRecursiveLock. os_log calls are guarded with #if canImport(OSLog); HTTPMetrics optionally imports FoundationNetworking.

CI bumps Xcode to 26.4.1 and actions/checkout to v7. The add-to-project workflow is removed.

Reviewed by Cursor Bugbot for commit 37d6eac. Bugbot is set up for automated code reviews on this repo. Configure here.

@poly-georgevisconti
poly-georgevisconti requested review from amritkallu, piercifani, pj-poly and poly-jeff and removed request for amritkallu July 9, 2026 17:43
poly-georgevisconti and others added 2 commits July 9, 2026 14:02
The macos-26 runner image no longer ships the iOS/tvOS/watchOS 26.1
platform SDKs, so every job pinned to Xcode 26.1.1 fails at destination
lookup ("iOS 26.1 is not installed"), and the conformance client times
out against the same stale toolchain. Upstream is green on 26.4.1;
this syncs ci.yml with upstream main (Xcode 26.4.1, actions/checkout v7).

add-to-project.yml calls connectrpc's internal reusable workflow with
org credentials that don't exist here, so it can never pass on this fork.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Drop the blank line and stale os_unfair_lock doc reference in Lock.swift
- Align the os_log string literal parameters in UnaryAsyncWrapper.swift
- Restore the blank line after the license header in URLSessionStream.swift
  and NIOHTTPClient.swift (via make licenseheaders)
- Delete Logging.swift, an empty file accidentally added by the ported commit

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@poly-georgevisconti

Copy link
Copy Markdown
Collaborator Author

CI triage

All 8 failures investigated; only 2 were actually caused by the ported commit, and both were cosmetic. Fixed in the two follow-up commits:

Check Cause Fix
build-library-ios / tvos / watchos, eliza-swiftpm Environment: the macos-26 runner image no longer ships the iOS/tvOS/watchOS 26.1 platform SDKs, so the pinned Xcode 26.1.1 finds no build destinations Synced ci.yml with upstream main (Xcode 26.4.1, checkout@v7) — upstream is green on this exact config
run-conformance-tests Same stale-toolchain issue, not the code: the ported commit passes the full URLSession conformance suite locally on a current Xcode — 966/966 cases Covered by the Xcode bump
run-swiftlint Real: whitespace in Lock.swift, string-literal alignment in UnaryAsyncWrapper.swift (both files touched by the port) Fixed
validate-license-headers Real: missing blank line after the header in 2 files, plus Logging.swift — an empty file accidentally added by the port Ran make licenseheaders; deleted the empty file
Add issue to project Calls connectrpc's internal reusable workflow (connectrpc/base-workflows) with an org App credential we don't have — can never pass on this fork Deleted the workflow. Note: it runs from the base branch (pull_request_target), so its red ❌ will linger on this PR until merge; harmless

🤖 Generated with Claude Code

@poly-georgevisconti
poly-georgevisconti merged commit 2bd868c into main Jul 9, 2026
14 checks passed
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.

2 participants