Skip to content

skip export fails on Xcode 27 beta (Swift 6.4): "product 'SkipUnit-product' is linked as a static library by 'SkipAndroidBridge-product' and 'SkipBridge-product'" #714

Description

@piercifani

Environment

  • Skip CLI 1.9.4 (Homebrew)
  • skip 1.9.3, skip-bridge 0.17.2, skip-android-bridge 0.6.4, skip-lib 1.4.0, skip-unit 1.7.0
  • Xcode 27 Beta 4 as the default Xcode instance
  • Native/fused mode app (SKIP_BRIDGE bridging), multi-module package

Symptom

skip export fails during the Darwin verification build ("Build project foo") with:

error: Swift package product 'SkipLib-product' is linked as a static library by 'SkipAndroidBridge-product' and 'SkipBridge-product'. This will result in duplication of library code.
error: Swift package product 'SkipUnit-product' is linked as a static library by 'SkipAndroidBridge-product' and 'SkipBridge-product'. This will result in duplication of library code.

The failing command from the export log is /usr/bin/xcrun swift build --triple arm64-apple-ios --sdk .../iPhoneOS27.0.sdk, which resolves to the selected Xcode's toolchain.

Analysis

  • SkipBridge and SkipAndroidBridge are unconditionally type: .dynamic; SkipLib/SkipUnit are automatic (static on Apple triples), so both get statically embedded into the two dynamic bridge products. This duplication has always existed — Swift ≤ 6.3 SwiftPM only warned about it, Swift 6.4's SwiftPM makes it a hard error, so every Skip user who selects Xcode 27 will hit this.
  • skip-lib already has the fix behind an env gate (SKIP_BRIDGE != 0 → products become dynamic), but skip export does not set SKIP_BRIDGE when evaluating manifests for the darwin verification build, so the gate never engages. skip-unit has no such gate at all.

Suggested fix

Set SKIP_BRIDGE=1 (in bridging/native mode) for the manifest evaluation of skip export's darwin build, and/or add the same dynamic-product gate to skip-unit's Package.swift.

Workaround

DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer skip export ... (point xcrun back at a stable Xcode).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions