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
3 changes: 3 additions & 0 deletions TablePro/Core/Plugins/PluginError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ enum PluginError: LocalizedError {
case signatureInvalid(detail: String)
case checksumMismatch
case incompatibleVersion(required: Int, current: Int)
case pluginOutdated(pluginVersion: Int, requiredVersion: Int)
case cannotUninstallBuiltIn
case notFound
case noCompatibleBinary
Expand All @@ -31,6 +32,8 @@ enum PluginError: LocalizedError {
return String(localized: "Plugin checksum does not match expected value")
case .incompatibleVersion(let required, let current):
return String(localized: "Plugin requires PluginKit version \(required), but app provides version \(current)")
case .pluginOutdated(let pluginVersion, let requiredVersion):
return String(localized: "Plugin was built with PluginKit version \(pluginVersion), but version \(requiredVersion) is required. Please update the plugin.")
case .cannotUninstallBuiltIn:
return String(localized: "Built-in plugins cannot be uninstalled")
case .notFound:
Expand Down
14 changes: 7 additions & 7 deletions TablePro/Core/Plugins/PluginManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ final class PluginManager {

if entry.source == .userInstalled {
if pluginKitVersion < currentPluginKitVersion {
logger.error("User plugin \(entry.url.lastPathComponent) has outdated PluginKit v\(pluginKitVersion)")
logger.error("User plugin \(entry.url.lastPathComponent) was built with PluginKit v\(pluginKitVersion), but v\(currentPluginKitVersion) is required")
continue
}
}
Expand Down Expand Up @@ -383,9 +383,9 @@ final class PluginManager {
// have stale witness tables — accessing protocol properties crashes with
// EXC_BAD_ACCESS. Reject them before loading the bundle.
if pluginKitVersion < Self.currentPluginKitVersion {
throw PluginError.incompatibleVersion(
required: Self.currentPluginKitVersion,
current: pluginKitVersion
throw PluginError.pluginOutdated(
pluginVersion: pluginKitVersion,
requiredVersion: Self.currentPluginKitVersion
)
}
try verifyCodeSignature(bundle: bundle)
Expand Down Expand Up @@ -419,9 +419,9 @@ final class PluginManager {

if source == .userInstalled {
if pluginKitVersion < Self.currentPluginKitVersion {
throw PluginError.incompatibleVersion(
required: Self.currentPluginKitVersion,
current: pluginKitVersion
throw PluginError.pluginOutdated(
pluginVersion: pluginKitVersion,
requiredVersion: Self.currentPluginKitVersion
)
}
try verifyCodeSignature(bundle: bundle)
Expand Down
15 changes: 6 additions & 9 deletions TablePro/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -9393,9 +9393,6 @@
}
}
}
},
"DataGridView placeholder for: %@" : {

},
"Date format:" : {
"localizations" : {
Expand Down Expand Up @@ -14166,9 +14163,6 @@
}
}
}
},
"Fix with AI" : {

},
"Focus Border" : {
"localizations" : {
Expand Down Expand Up @@ -25645,6 +25639,9 @@
}
}
}
},
"Results" : {

},
"Retention" : {
"localizations" : {
Expand Down Expand Up @@ -26102,9 +26099,6 @@
}
}
}
},
"Run a query to see results" : {

},
"Run in New Tab" : {
"localizations" : {
Expand Down Expand Up @@ -32302,6 +32296,9 @@
},
"Toggle Results" : {

},
"Toggle Results (⌘⌥R)" : {

},
"Toggle Table Browser" : {
"localizations" : {
Expand Down
2 changes: 1 addition & 1 deletion TablePro/Views/Filter/FilterRowView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct FilterRowView: View {
@ViewBuilder
private var valueFields: some View {
if filter.isRawSQL {
TextField("WHERE clause...", text: Binding(
TextField("e.g. id = 1", text: Binding(
get: { filter.rawSQL ?? "" },
set: { filter.rawSQL = $0 }
))
Expand Down
Loading