Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .claude/rules/plugin-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ TableProPluginKit is built with Library Evolution, so an already-built plugin ke
- Add a requirement only with a default implementation, then bridge it in `PluginDriverAdapter`.
- Additive: a new requirement with a default, a new field on a non-`@frozen` struct, a new case on a non-`@frozen` enum, a reordering.
- Breaking: a changed, removed or renamed requirement or signature, a requirement without a default, a new case on a `@frozen` enum, a change to a frozen type's layout.
- Every ABI change bumps `currentPluginKitVersion` (in `PluginManager.swift`) and `TableProPluginKitVersion` in every plugin `Info.plist`, at most once per release cycle: later changes in the cycle reuse the pending number. `scripts/ci/check-pluginkit-bump-cadence.py` checks it in Repo Hygiene.
- Every ABI change bumps `TABLEPRO_PLUGINKIT_VERSION` in `Configs/PluginKit.xcconfig`, at most once per release cycle: later changes in the cycle reuse the pending number. `scripts/ci/check-pluginkit-bump-cadence.py` checks it in Repo Hygiene.
- The build stamps that value into `TableProPluginKitVersion` of the app and of every plugin. A plugin's `Info.plist` holds `<integer>TABLEPRO_PLUGINKIT_VERSION</integer>` and is preprocessed, because every shipped app reads the key with `as? Int`; the source file therefore fails `plutil -lint`.
- An additive change re-publishes nothing. Built plugins keep loading, and the bump makes an older app refuse a plugin rebuilt against the new API instead of failing its load.
- A breaking change also raises `minimumCompatiblePluginKitVersion`, and every registry plugin is re-released with `scripts/release-all-plugins.sh <version>` before the app tag, because the release's `Registry Readiness` job fails while a registry driver has no binary in the app's kit range (`RELEASING.md`, The release pipeline).
- A breaking change also raises `TABLEPRO_PLUGINKIT_MINIMUM_VERSION`, and every registry plugin is re-released with `scripts/release-all-plugins.sh <version>` before the app tag, because the release's `Registry Readiness` job fails while a registry driver has no binary in the app's kit range (`RELEASING.md`, The release pipeline).
- Check with `verify.sh abi <merge-base>` (`scripts/check-pluginkit-abi.sh`). It builds PluginKit at HEAD and at the base with the same toolchain and diffs the public `.swiftinterface`. A base with no interface passes; a diff prints the additive and breaking rules and exits 1.
- It refuses uncommitted changes, so run it after the commit and before the push. No workflow runs it.
- The diff is textual, so a `-` line can be a declaration that moved. Only a removed line with no matching added line, or a requirement added without a default, is breaking. This lists the removed lines that do not come back:
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/build-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
tags:
description: >
Comma-separated plugin tag:pluginKitVersion pairs.
pluginKitVersion defaults to currentPluginKitVersion from PluginManager.swift.
pluginKitVersion defaults to TABLEPRO_PLUGINKIT_VERSION from Configs/PluginKit.xcconfig.
Examples: plugin-mongodb-v1.0.25, plugin-mongodb-v1.0.25:13
required: true
type: string
Expand All @@ -21,7 +21,7 @@ on:
required: false
type: string

# Declared per job rather than here. resolve-tags reads two integers out of a Swift file and needs
# Declared per job rather than here. resolve-tags reads an integer out of an xcconfig and needs
# nothing, and a workflow-level grant hands it a write token it has no use for.
permissions:
contents: read
Expand Down Expand Up @@ -66,18 +66,17 @@ jobs:
- name: Check the plugin manifest against the plugin classes
run: python3 scripts/ci/check-plugin-manifest.py

- name: Read currentPluginKitVersion
- name: Read the PluginKit version
id: pkv
run: |
VERSION=$(grep -E 'static let currentPluginKitVersion\s*=\s*[0-9]+' \
TablePro/Core/Plugins/PluginManager.swift \
| grep -oE '[0-9]+$' | head -1)
VERSION=$(sed -nE 's/^TABLEPRO_PLUGINKIT_VERSION[[:space:]]*=[[:space:]]*([0-9]+)[[:space:]]*$/\1/p' \
Configs/PluginKit.xcconfig)
if [ -z "$VERSION" ]; then
echo "::error::Could not parse currentPluginKitVersion from PluginManager.swift"
echo "::error::Could not parse TABLEPRO_PLUGINKIT_VERSION from Configs/PluginKit.xcconfig"
exit 1
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "currentPluginKitVersion=$VERSION"
echo "TABLEPRO_PLUGINKIT_VERSION=$VERSION"

- name: Build matrix
id: tags
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ jobs:
build/Release/TablePro-*.dmg
build/Release/TablePro-*.tar.xz

# Reads two integers out of a Swift file and fetches a JSON manifest, so it wants nothing
# Reads two integers out of an xcconfig and fetches a JSON manifest, so it wants nothing
# from macOS and does not need to spend a macOS runner minute (billed at ten times Linux).
registry-readiness:
name: Registry Readiness
Expand All @@ -199,9 +199,9 @@ jobs:

- name: Verify registry has compatible plugin binaries
run: |
MANAGER="TablePro/Core/Plugins/PluginManager.swift"
CURRENT=$(grep -E 'static let currentPluginKitVersion = ' "$MANAGER" | grep -oE '[0-9]+' | head -1)
FLOOR=$(grep -E 'static let minimumCompatiblePluginKitVersion = ' "$MANAGER" | grep -oE '[0-9]+' | head -1)
CONFIG="Configs/PluginKit.xcconfig"
CURRENT=$(sed -nE 's/^TABLEPRO_PLUGINKIT_VERSION[[:space:]]*=[[:space:]]*([0-9]+)[[:space:]]*$/\1/p' "$CONFIG")
FLOOR=$(sed -nE 's/^TABLEPRO_PLUGINKIT_MINIMUM_VERSION[[:space:]]*=[[:space:]]*([0-9]+)[[:space:]]*$/\1/p' "$CONFIG")
echo "PluginKit floor=$FLOOR current=$CURRENT"
python3 scripts/check-registry-readiness.py --floor "$FLOOR" --current "$CURRENT"

Expand Down
9 changes: 5 additions & 4 deletions Configs/Base.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Structure rule: project-wide and per-configuration settings live in Configs/*.xcconfig.
// Per-target settings live in project.yml, where the target templates are.

#include "PluginKit.xcconfig"

ALWAYS_SEARCH_USER_PATHS = NO
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES
CLANG_ANALYZER_NONNULL = YES
Expand Down Expand Up @@ -60,10 +62,9 @@ STRINGS_FILE_OUTPUT_ENCODING = binary
SWIFT_VERSION = 6.0
CODE_SIGN_STYLE = Automatic

// Signing knobs. Only the two app targets read them, so plugin bundles and the helper
// tool sign ad-hoc and a contributor without the official team can still build everything.
// A contributor overrides these in Configs/Secrets.xcconfig without touching a tracked file,
// and the release scripts pass their own values on the xcodebuild command line.
// Signing knobs. The app targets and the plugin bundles sign with this team; the helper tool
// signs ad hoc. A contributor overrides these in Configs/Secrets.xcconfig without touching a
// tracked file, and the release scripts pass their own values on the xcodebuild command line.
TABLEPRO_DEVELOPMENT_TEAM = D7HJ5TFYCU
TABLEPRO_APP_BUNDLE_IDENTIFIER = com.TablePro

Expand Down
3 changes: 3 additions & 0 deletions Configs/PluginKit.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// When to raise each, and how the build stamps them: .claude/rules/plugin-system.md, ABI.
TABLEPRO_PLUGINKIT_VERSION = 39
TABLEPRO_PLUGINKIT_MINIMUM_VERSION = 19
2 changes: 1 addition & 1 deletion Plugins/BeancountDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesDatabaseTypeIds</key>
<array>
<string>Beancount</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/BigQueryDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Plugins/BigtableDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesDatabaseTypeIds</key>
<array>
<string>Bigtable</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/CSVExportPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesExportFormatIds</key>
<array>
<string>csv</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/CSVImportPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesImportFormatIds</key>
<array>
<string>csv</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/CassandraDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Plugins/ClickHouseDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesDatabaseTypeIds</key>
<array>
<string>ClickHouse</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/CloudflareD1DriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Plugins/CloudflareR2SQLDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesDatabaseTypeIds</key>
<array>
<string>Cloudflare R2 SQL</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/DamengDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesDatabaseTypeIds</key>
<array>
<string>Dameng</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/DuckDBDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Plugins/DynamoDBDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Plugins/ElasticsearchDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Plugins/EtcdDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Plugins/FirebaseDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesDatabaseTypeIds</key>
<array>
<string>Firestore</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/HanaDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesDatabaseTypeIds</key>
<array>
<string>SAP HANA</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/JSONExportPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesExportFormatIds</key>
<array>
<string>json</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/JSONImportPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesImportFormatIds</key>
<array>
<string>json</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/KafkaDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesDatabaseTypeIds</key>
<array>
<string>Kafka</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/LibSQLDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Plugins/MQLExportPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesExportFormatIds</key>
<array>
<string>mql</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/MSSQLDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Plugins/MarkdownExportPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesExportFormatIds</key>
<array>
<string>md</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/MongoDBDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Plugins/MySQLDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesDatabaseTypeIds</key>
<array>
<string>MySQL</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/OracleDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Plugins/ParquetExportPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesExportFormatIds</key>
<array>
<string>parquet</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/PostgreSQLDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesDatabaseTypeIds</key>
<array>
<string>PostgreSQL</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/RedisDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesDatabaseTypeIds</key>
<array>
<string>Redis</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/SQLExportPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesExportFormatIds</key>
<array>
<string>sql</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/SQLImportPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesImportFormatIds</key>
<array>
<string>sql</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/SQLiteDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesDatabaseTypeIds</key>
<array>
<string>SQLite</string>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/SnowflakeDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Plugins/SpannerDriverPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>TableProPluginKitVersion</key>
<integer>39</integer>
<integer>TABLEPRO_PLUGINKIT_VERSION</integer>
<key>TableProProvidesDatabaseTypeIds</key>
<array>
<string>Spanner</string>
Expand Down
Loading
Loading