Rewrite plugin ABI/registry pipeline, fix PluginKit version mismatch (#1322)#1343
Merged
Merged
Conversation
…ciliation, closes #1322
Signed-off-by: Ngô Quốc Đạt <datlechin@gmail.com>
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
Fixes the recurring "Plugin was built with PluginKit version N, but version M is required" error that hits users on every ABI bump (#1322, #1237, #923, #912, #443). Reworks the plugin install/load pipeline, registry schema, and update UX.
Core
PluginInstalleractor: per-plugin coalescing, atomic install viaFileManager.replaceItem, stripscom.apple.quarantine, validates ABI before commitreplaceExistingPluginrace: old bundle stays loaded until the new one registers (loadPluginAsync(replacingBundleId:))installsInFlight) replaces globalisInstallingboolPluginCodeSignatureVerifier(drops a cross-actorBundletransfer);Task.detachedreplacesDispatchQueue.global+ continuationRegistry / schema v2
RegistryBinary.pluginKitVersionfor exact-match binary selection; app picks the binary built for its ABIvalidateRegistryCompatibilityreturns the resolved binary, threaded into the installer (no double resolve)CI / scripts
build-plugin.ymlacceptstag:pluginKitVersionmatrix, readscurrentPluginKitVersionfrom source.github/scripts/update-registry.py(atomic write, per-binary version, prune to 2 latest)scripts/release-all-plugins.shbulk re-release after ABI bump, with bundled-plugin guardscripts/build-plugin.shno longer hardcodes team ID; resolves signing identity from keychainUX (native HIG)
Cleanup (from 4-axis review)
PluginTableInfo.owner/comment; addavgRowLength/collation/createTime/updateTimetoPluginTableMetadataPluginEntrysounregisterCapabilitiesdoes not touch an unloaded bundlePluginUpdateCoordinatordedupes the install/update tracker dance across 3 viewspluginsWithRegistryUpdateto avoid O(N×M) per renderTest plan
xcodebuild buildcleanswiftlint --strict: 0 violationsxattr -l <plugin>.tableplugin.bak/.tmpleftovers after installNotes