Skip to content

Destinations builds on Linux: the bookmark store is Apple-only; CI builds the Linux modules - #15

Merged
Skeyelab merged 1 commit into
mainfrom
destinations-linux-13
Dec 3, 2026
Merged

Skeyelab merged 1 commit into
mainfrom
destinations-linux-13

Conversation

@Skeyelab

@Skeyelab Skeyelab commented Dec 3, 2026

Copy link
Copy Markdown
Member

Fixes #13

What changed

  • Sources/Destinations/Destinations.swift: DriveFolderStore (the security-scoped bookmark code) is inside #if canImport(Darwin). The rest of the module (DestinationKind, BookmarkStorage, StoredDriveFolder, Drive, DriveStatus, DriveAccess, ...) builds everywhere. On Apple platforms the same code is compiled as before.
  • Tests/DestinationsTests/DriveFolderStoreTests.swift: the same guard, since every test there uses DriveFolderStore.
  • .github/workflows/ci.yml: a Linux build job (ubuntu-latest, swift:6.2 container) that builds the modules and test targets that use no Apple framework.

Not done: the whole package still doesn't build on Linux

The issue's acceptance asks for swift build and swift test of ShowKit on Linux. That needs more than a guard, so this PR stops at Destinations:

  • CoreAudioIO: InputSession.swift imports AudioToolbox with no guard.
  • MixerLink: Apple's Network framework.
  • Appearance, Meters: SwiftUI.
  • BroadcastWaveTests: AVFoundation.

swift test builds every test target, so ShowKit's tests still run on macOS only. The Linux job builds the 8 modules and 6 test targets that do compile there; it runs no tests.

Linux output (Swift 6.4.3, x86_64, Arch)

Before, on main, swift build:

Sources/Destinations/Destinations.swift:234:45: error: 'BookmarkCreationOptions' is not a member type of struct 'FoundationEssentials.URL'
Sources/Destinations/Destinations.swift:235:47: error: 'BookmarkResolutionOptions' is not a member type of struct 'FoundationEssentials.URL'
error: Build failed

After, on this branch, swift build --target <name>:

AudioIO: Build complete! (0.68 secs)
BroadcastWave: Build complete! (0.66 secs)
OSC: Build complete! (0.66 secs)
AutoGain: Build complete! (0.68 secs)
Telemetry: Build complete! (0.68 secs)
Destinations: Build complete! (0.66 secs)
TakeFile: Build complete! (0.72 secs)
Shows: Build complete! (0.77 secs)
AudioIOTests: Build complete! (0.71 secs)
OSCTests: Build complete! (0.79 secs)
AutoGainTests: Build complete! (0.70 secs)
TelemetryTests: Build complete! (0.74 secs)
DestinationsTests: Build complete! (0.72 secs)
ShowsTests: Build complete! (0.81 secs)

After, whole-package swift build and swift test (still failing, now past Destinations):

Sources/CoreAudioIO/InputSession.swift:2:8: error: no such module 'AudioToolbox'
error: Build failed

SoundcheckKit (Packages/SoundcheckKit in SoundcheckPlayer, at 73ab780) swift test on Linux. With ShowKit 0.3.0 it fails with the two bookmark errors above. With ShowKit pointed at this branch by local path:

Build complete! (10.67 secs)
✔ Test run with 49 tests in 7 suites passed after 0.003 seconds.
✔ Test run with 0 tests in 0 suites passed after 0.001 seconds.
✔ Test run with 34 tests in 8 suites passed after 0.001 seconds.
✔ Test run with 70 tests in 9 suites passed after 0.364 seconds.
✔ Test run with 5 tests in 1 suite passed after 0.001 seconds.

Apple platforms were not built locally; the macOS jobs in this PR's CI cover them.

🤖 Generated with Claude Code

…ilds the Linux modules (#13)

Security-scoped bookmarks exist only in Apple's Foundation, so `DriveFolderStore` and its tests are
compiled only where Darwin is. Nothing changes on Apple platforms.

A new Linux CI job builds the modules and test targets that use no Apple framework.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@Skeyelab
Skeyelab enabled auto-merge (squash) December 3, 2026 06:30
@codecov

codecov Bot commented Dec 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Skeyelab
Skeyelab merged commit 2d219cb into main Dec 3, 2026
5 checks passed
@Skeyelab
Skeyelab deleted the destinations-linux-13 branch December 3, 2026 06:32
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.

Destinations doesn't compile on Linux in 0.2.0 (BookmarkCreationOptions)

1 participant