Skip to content

fix(plugins): stage plugin builds for the app update so it takes one relaunch - #4837

Merged
datlechin merged 3 commits into
mainfrom
fix/plugins-stage-with-app-update
Dec 2, 2026
Merged

datlechin merged 3 commits into
mainfrom
fix/plugins-stage-with-app-update

Conversation

@datlechin

@datlechin datlechin commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Summary

  • When Sparkle has extracted the app update (didExtractUpdate, before it installs on quit or on Install), the running app stages each installed registry plugin's build for the new app (the appcast's sparkle:version) into the staged-updates folder, with the same download, checksum and signature checks as the plugin updater.
  • The build must carry the kit its manifest entry names, not the running app's; the new app's applyStagedUpdates checks it against its own kits at launch and drops one that fails.
  • Plugins staged this way are listed under "Also updating" and the new app's update pass finds nothing left, so an app update takes one relaunch.
  • Staging is not on the install tracker: a failure (offline, no release at that build) posts nothing and never holds up the app update; the new app's pass updates that plugin as before.
  • When Sparkle gives the update up, or the user skips it after it was prepared, staged builds this app cannot load are dropped and the update pass runs again. Skipping a prepared update also clears Relaunch to Update, which before stayed on with nothing to install.
  • A plugin a file install staged while the manifest loaded keeps that build.
  • Staging does not hold the relaunch: a relaunch before it finishes leaves the rest to the new app's pass.
  • UpdateChannel.plugins(ofAppVersion:) replaces Bundle.isPrerelease; its two tests in BundleAppInfoTests move to UpdateChannelTests.

Test plan

  • AppUpdatePluginStagingTests: the staging decision (release at the new build only, channel of the new version, this Mac's OS), targets, staging with a fake download, a failed download, no manifest, updating off, the launch applying the staged build with no pass target left, and following Sparkle's prepared update and its abort, and a file staged while another plugin downloads.
  • verify.sh --jobs 4 build, lint on the changed files, and the tests in the plugin install, update pass, installer, update channel and update status suites, all passing locally.
  • Not checked on a real update: it needs two signed releases. The first release with this change stages plugins for the update after it.

@datlechin
datlechin merged commit 817f161 into main Dec 2, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant