refactor(connections): extract DatabaseType into a dependency-free TableProCoreTypes module#1519
Merged
Merged
Conversation
…bleProCoreTypes module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 (R-002) unblock — the lower-risk alternative to the full PluginKit dynamic-module unification.
The desktop app can't
import TableProModelsto shareDatabaseType, becauseTableProModelsdepends on the SPMTableProPluginKit, which collides with the frameworkTableProPluginKitthe app already links. ButDatabaseTypeisimport Foundationonly. So instead of restructuring the plugin-loading architecture, this extractsDatabaseTypeinto a new dependency-free SPM targetTableProCoreTypes. The app can import that without pullingTableProPluginKit→ no collision, and no change to the plugin-loading model.TableProCoreTypes(no dependencies).DatabaseType.swiftmovedTableProModels→TableProCoreTypes.TableProModels(+ Query/Database/Sync) depend onTableProCoreTypes;TableProModelsdoes@_exported import TableProCoreTypes, so every existingimport TableProModelsconsumer — including mobile's 42 files and the package modules — seesDatabaseTypeunchanged. No per-file import churn.DatabaseTypepath updated to the new location.Risk Addressed
DatabaseType(desktop adoption / 8.2b is a separate follow-up). Avoids the high-risk dynamic-framework module unification entirely.Verification
swift build/swift test(host) — 62 tests pass.swift build --triple arm64-apple-ios17.0— iOS-safe.scripts/audit-refactor-health.sh --check— drift gate green.swiftlint --strictclean on changed files.Notes
@_exported importis the package-umbrella re-export pattern, used here to avoid churning allimport TableProModelsconsumers.TableProCoreTypes.DatabaseTypeand drop its own struct (8.2b, ~120 files) — a separate PR.