Skip to content

Wave 3 (0.6.0): zero-OpenCombine builds on Apple platforms#22

Merged
ikorich merged 3 commits into
mainfrom
feature/wave3-opencombine-conditional
Jun 11, 2026
Merged

Wave 3 (0.6.0): zero-OpenCombine builds on Apple platforms#22
ikorich merged 3 commits into
mainfrom
feature/wave3-opencombine-conditional

Conversation

@ikorich

@ikorich ikorich commented Jun 11, 2026

Copy link
Copy Markdown
Member

Motivation

Final roadmap ticket (#15, re-scoped to 0.6.0): OpenCombine has been dormant since 2023 and is this library's biggest supply-chain risk. Since #11, Apple builds use native Combine — but OpenCombine was still compiled and linked everywhere. This PR removes it from the Apple build graph entirely.

Changes

  • Platform-conditional OpenCombine dependency: .when(platforms: [.wasi, .linux, .android, .windows, .openbsd]) on all three consuming targets — every platform where canImport(Combine) is false. Dropping any of these (e.g. .linux) would silently break those consumers, hence the exhaustive list (documented in the manifest; .freebsd is still _PackageDescription 999.0-gated at tools 6.3).
  • Linkage evidence (clean host builds, full detail in the implementation log): before — 119 verbose-build references, 21 OpenCombine artifacts; after — 0 references, 0 artifacts, 0 OpenCombine entries in OpenCombineJS.abi.json, and otool -L on the example binary shows native Combine.framework only.
  • Honest caveat: OpenCombine (and its transitive swift-syntax) are still fetched at resolution time; only compile/link drops. The fetch disappears only when the .package declaration is removed in a future major.
  • Canary fix: the opencombine-latest job would have become vacuous (host builds now compile zero OpenCombine) — it now mirrors the jskit job's wasm-SDK build steps; host steps remain as a resolution smoke check. actionlint: zero new findings.
  • README / DocC / CONTRIBUTING / CHANGELOG (Unreleased (0.6.0)) updated.

Test plan

  • Host (Combine, zero OpenCombine): swift build + swift test — 35/6 green.
  • Wasm (OpenCombine correctly present under wasm32-unknown-wasip1): build + js test — 81/22 green.
  • API gate: No breaking changes detected — nothing removed or deprecated at 0.6.0.
  • DocC and swiftformat --lint clean.

Closes #15

ikorich added 3 commits June 11, 2026 22:52
Since #11 every source file selects its backend with #if canImport(Combine):
Apple platforms compile against native Combine, so linking OpenCombine there
was pure dead weight (5 extra modules built into every Apple consumer). The
product dependency now carries .when(platforms: [.wasi, .linux, .android,
.windows, .openbsd]) on all three consuming targets - every non-Apple
platform PackageDescription 6.3 exposes, because canImport(Combine) is false
on all of them, not just WASI; listing only .wasi would silently break Linux
consumers. .freebsd is gated @available(_PackageDescription 999.0) and
cannot be listed yet.

The package-level .package(url:) declaration stays (full removal deferred),
so OpenCombine and its transitive swift-syntax are still fetched at
resolution time on every platform - only the build/link footprint drops:
a clean macOS build now compiles zero OpenCombine sources and the example
binary links only the native Combine framework (verified via otool -L).
The opencombine-latest job only ran swift build/test on macOS. After the
platform-conditional dependency (#15) a host build links native Combine and
compiles zero OpenCombine code, which would have made the canary vacuous:
it could never again detect upstream OpenCombine breakage. Add the same
version-matched wasm SDK install + wasm build steps the jskit-latest job
already uses, so the canary actually compiles the library against the
patched OpenCombine. Host steps are kept as a resolution smoke check.

actionlint: the only findings are two pre-existing SC2010 warnings in the
untouched Select Xcode steps, identical on main; this change adds none.
Consumers need to know what the conditional dependency changes and - just
as important - what it does not: no public API is removed or deprecated,
WASI/Linux behavior is identical, and OpenCombine (plus its transitive
swift-syntax) is still fetched at resolution time on Apple platforms; only
compilation and linkage drop. README and the DocC landing page state the
per-platform linkage story; CHANGELOG opens the Unreleased (0.6.0) section
with the declared packaging change; CONTRIBUTING's dependency policy now
explains the platform-list invariant (keep it equal to the set of platforms
where canImport(Combine) is false) so future edits do not silently unlink
a platform.
@ikorich ikorich added enhancement New feature or request API design Public API shape and stability dependencies Dependency updates and policy labels Jun 11, 2026
@ikorich ikorich merged commit a158d8b into main Jun 11, 2026
10 checks passed
@ikorich ikorich deleted the feature/wave3-opencombine-conditional branch June 11, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API design Public API shape and stability dependencies Dependency updates and policy enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0.6.0: OpenCombine exit — platform-conditional dependency, async-first stable API

1 participant