Summary
aetherctl/main.swift uses Foundation.Process (line 236), which is unavailable on tvOS and iOS. The Package.swift declares aetherctl as a product without a platform restriction, so SPM consumers building for tvOS/iOS get pulled into compiling it and the build fails with:
SourcePackages/checkouts/AetherEngine/Sources/aetherctl/main.swift:236:19: error: cannot find 'Process' in scope
let process = Process()
^~~~~~~
Reproduction
Add AetherEngine as a Swift Package dependency to a tvOS or iOS application target, pinned to any tagged commit. Build for tvOS Simulator or tvOS Device. Build fails as above.
Fix
Removing the aetherctl product from the products: list (but keeping the target itself for swift build on macOS) fixes consumer builds without losing the CLI for upstream development. A clean fix is here:
https://github.com/hp561/AetherEngine/tree/aetherctl-tvos-fix
The diff is 13 lines, mostly comment:
products: [
.library(
name: "AetherEngine",
targets: ["AetherEngine"]
),
- // Standalone CLI used for offline reproduction of the host-side
- // HLSVideoEngine playback symptoms on macOS, without going
- // through TestFlight + Apple TV. Builds only on macOS in
- // practice (Apple platform reqs match the lib target).
- .executable(name: "aetherctl", targets: ["aetherctl"]),
+ // aetherctl product removed: the target uses Foundation.Process
+ // which is unavailable on tvOS/iOS. The target itself is
+ // preserved below so `swift build` on macOS still produces
+ // the CLI; only the published product surface changes.
],
Happy to open a PR if useful.
Summary
aetherctl/main.swiftusesFoundation.Process(line 236), which is unavailable on tvOS and iOS. ThePackage.swiftdeclaresaetherctlas a product without a platform restriction, so SPM consumers building for tvOS/iOS get pulled into compiling it and the build fails with:Reproduction
Add
AetherEngineas a Swift Package dependency to a tvOS or iOS application target, pinned to any tagged commit. Build fortvOS SimulatorortvOS Device. Build fails as above.Fix
Removing the
aetherctlproduct from theproducts:list (but keeping the target itself forswift buildon macOS) fixes consumer builds without losing the CLI for upstream development. A clean fix is here:https://github.com/hp561/AetherEngine/tree/aetherctl-tvos-fix
The diff is 13 lines, mostly comment:
products: [ .library( name: "AetherEngine", targets: ["AetherEngine"] ), - // Standalone CLI used for offline reproduction of the host-side - // HLSVideoEngine playback symptoms on macOS, without going - // through TestFlight + Apple TV. Builds only on macOS in - // practice (Apple platform reqs match the lib target). - .executable(name: "aetherctl", targets: ["aetherctl"]), + // aetherctl product removed: the target uses Foundation.Process + // which is unavailable on tvOS/iOS. The target itself is + // preserved below so `swift build` on macOS still produces + // the CLI; only the published product surface changes. ],Happy to open a PR if useful.