Propagate cancellation tokens through the installer engine and the Config app - #5753
Merged
Conversation
johnsimons
force-pushed
the
john/cancel_phase6
branch
from
August 13, 2026 03:15
cf0879a to
236b8ee
Compare
…nfig app Retires the cancellation analyzer debt blocks in ServiceControlInstaller.Engine, ServiceControl.Management.PowerShell and ServiceControl.Config.Tests, and narrows the ServiceControl.Config block to the one boundary that cannot carry a token. Phase 7 of the propagation work. The engine change is what forces these projects to move together. AbstractCommandChecks' eight abstract members take tokens, the prompt callback becomes Func<PathInfo, CancellationToken, Task<bool>> throughout PathsValidator, the installable bases and the unattended installers, and ValidateNewInstance loses params so the token can be last. PowerShell's PowerShellCommandChecks and the three New-*Instance cmdlets follow, along with the Config app's ScmuCommandChecks, InstallerModule and add attachments. Two token drops are fixed in the Config app's Caliburn layer. RxScreen received a CancellationToken in ActivateAsync and DeactivateAsync and discarded it instead of passing it to OnInitialize, OnActivate and OnDeactivate; RxConductorBase did the same in ActivateItemAsync and DeactivateItemAsync. Both now forward it, so screen activation is cancellable. Command bodies reached through ReactiveCommand.CreateFromTask now take a required token, which binds its Func<CancellationToken, Task> overload and gives them a real one. Config's own Command.Create path bottoms out in System.Windows.Input.ICommand.Execute, which returns void and has no token to offer, so those command types keep a file-scoped block that says so, and their call sites pass CancellationToken.None explicitly. Caliburn's IClose.TryCloseAsync and IEventAggregator declare no token and cannot be changed, so those are inline pragmas rather than fixes.
johnsimons
force-pushed
the
john/cancel_p7_installer_config
branch
from
August 13, 2026 03:56
0b7ec75 to
5945faf
Compare
rbev
approved these changes
Aug 13, 2026
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.
Retires the cancellation analyzer debt blocks in ServiceControlInstaller.Engine,
ServiceControl.Management.PowerShell and ServiceControl.Config.Tests, and
narrows the ServiceControl.Config block to the one boundary that cannot
carry a token. Phase 7 of the propagation work.
The engine change is what forces these projects to move together.
AbstractCommandChecks' eight abstract members take tokens, the prompt
callback becomes Func<PathInfo, CancellationToken, Task> throughout
PathsValidator, the installable bases and the unattended installers, and
ValidateNewInstance loses params so the token can be last. PowerShell's
PowerShellCommandChecks and the three New-*Instance cmdlets follow, along
with the Config app's ScmuCommandChecks, InstallerModule and add
attachments.
Two token drops are fixed in the Config app's Caliburn layer. RxScreen
received a CancellationToken in ActivateAsync and DeactivateAsync and
discarded it instead of passing it to OnInitialize, OnActivate and
OnDeactivate; RxConductorBase did the same in ActivateItemAsync and
DeactivateItemAsync. Both now forward it, so screen activation is
cancellable.
Command bodies reached through ReactiveCommand.CreateFromTask now take a
required token, which binds its Func<CancellationToken, Task> overload
and gives them a real one. Config's own Command.Create path bottoms out
in System.Windows.Input.ICommand.Execute, which returns void and has no
token to offer, so those command types keep a file-scoped block that says
so, and their call sites pass CancellationToken.None explicitly.
Caliburn's IClose.TryCloseAsync and IEventAggregator declare no token and
cannot be changed, so those are inline pragmas rather than fixes.