Skip to content

Add missing package dependencies to resolve non-SPM linker failures#441

Open
scogeo wants to merge 2 commits intopointfreeco:mainfrom
scogeo:package-fix
Open

Add missing package dependencies to resolve non-SPM linker failures#441
scogeo wants to merge 2 commits intopointfreeco:mainfrom
scogeo:package-fix

Conversation

@scogeo
Copy link
Copy Markdown

@scogeo scogeo commented Apr 6, 2026

Summary

Fixes linker issues when non-SPM targets depend on SqliteData by explicitly declaring missing package dependencies.

Details

When linking non-SPM targets to SqliteData, builds can fail due to undeclared dependencies in the sqlite-data package:

  • StructuredQueriesCore is directly imported in multiple source files but is not listed in the package manifest.
  • StructuredQueriesSQLiteCore is not explicitly imported, but is resolved transitively by Swift Package Manager. However, this transitive resolution does not carry over to non-SPM targets, resulting in missing symbol linker errors (especially in test builds).

A typical failing dependency chain:

(.xctest, .xcframework, .appex)
    → (internal SPM library)
        → (sqlite-data)

In these cases:

  • Compilation succeeds and dependencies appear resolved.
  • Linking fails in test builds or produces warnings in non-test builds.

Environment

  • Xcode 26.4 (17E192)
  • swift-driver 1.148.6
  • Apple Swift 6.3 (swiftlang-6.3.0.123.5 clang-2100.0.123.102)
  • Target: arm64-apple-macosx26.0

Resolution

This PR explicitly adds the missing dependencies to the package manifest, ensuring consistent linking behavior across both SPM and non-SPM targets.

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.

1 participant