Add missing package dependencies to resolve non-SPM linker failures#441
Add missing package dependencies to resolve non-SPM linker failures#441scogeo wants to merge 2 commits into
Conversation
|
Hi @scogeo, sorry we never responded to this. We've been modernizing our packages to turn on explicit imports (#467) and so hopefully some of that work will fix any problems you are seeing. But I am curious about how exactly to reproduce the problem you are running into here. Because StructuredQueriesSQLite re-exports those two libraries, so it should be sufficient to just depend on the one. We'd be happy to merge this if it fixes something, but we just want to understand what is going on. |
|
@mbrandonw No worries. My project is fairly complex, so I would have to create a much simpler project that can reproduce it. I am hoping it may also just be an Xcode tooling issue that self resolves at some point. If you prefer, we can close this PR for now, and I can open an issue when I have a simpler reproducible project along with a PR that resolves it. If I confirm that #467 fixes the issue I will add a followup comment. |
Summary
Fixes linker issues when non-SPM targets depend on
SqliteDataby explicitly declaring missing package dependencies.Details
When linking non-SPM targets to
SqliteData, builds can fail due to undeclared dependencies in thesqlite-datapackage:StructuredQueriesCoreis directly imported in multiple source files but is not listed in the package manifest.StructuredQueriesSQLiteCoreis 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:
In these cases:
Environment
Resolution
This PR explicitly adds the missing dependencies to the package manifest, ensuring consistent linking behavior across both SPM and non-SPM targets.