Skip to content

Add async UnpackStreamAsync to ISyncManagementService, obsolete sync UnpackStream - #1005

Merged
KevinJump merged 1 commit into
v18/mainfrom
fix/unpack-stream-async
Jul 23, 2026
Merged

Add async UnpackStreamAsync to ISyncManagementService, obsolete sync UnpackStream#1005
KevinJump merged 1 commit into
v18/mainfrom
fix/unpack-stream-async

Conversation

@KevinJump

Copy link
Copy Markdown
Owner

What

ISyncManagementService gets a new UnpackStreamAsync(Stream stream) method. The existing UnpackStream(Stream stream) is now [Obsolete] with a default implementation that forwards to the async version.

Why

uSyncManagementService.UnpackStream called the obsolete ISyncActionService.UnpackImportFromStream(Stream) (CS0618, scheduled for removal in v19), producing the last remaining build warning. ISyncActionService already exposes the async replacement (UnpackImportFromStreamAsync), so the fix is to plumb that all the way up through ISyncManagementService and its controller caller, rather than keep calling the obsolete sync member.

How

Mirrors the pattern ISyncActionService already uses for this exact same rename (UnpackImportFromStreamUnpackImportFromStreamAsync, see uSync.BackOffice/Services/ISyncActionService.cs:71-78) and the existing [Obsolete("... will be removed in vXX")] convention already used elsewhere in ISyncManagementService (GetActions()):

  • ISyncManagementService.cs — added Task<UploadImportResult> UnpackStreamAsync(Stream stream); UnpackStream is now [Obsolete] with a default body calling UnpackStreamAsync(stream).Result.
  • uSyncManagementService.csUnpackStream implementation replaced with UnpackStreamAsync, which now awaits _syncActionService.UnpackImportFromStreamAsync(stream) directly instead of the obsolete sync wrapper.
  • uSyncPerformActionController.csProcessUpload now calls await _managementService.UnpackStreamAsync(stream).

No other call sites reference UnpackStream.

Notes for reviewers

  • Full solution builds with 0 errors and 0 CS0618 warnings (down from the last remaining one). Only a pre-existing, unrelated CS8632 nullable-annotation warning remains in the test project.
  • All 148 existing tests pass.
  • Minor style note: ISyncActionService's equivalent default body uses .GetAwaiter().GetResult() rather than .Result (avoids wrapping exceptions in AggregateException) — worth aligning if this ever gets called from a sync context, but since UnpackStream has no callers left in-repo it's not a functional concern here.

🤖 Generated with Claude Code

ISyncManagementService.UnpackStream called the obsolete
ISyncActionService.UnpackImportFromStream (CS0618, removed in v19).
Adds UnpackStreamAsync calling the async replacement directly, and
obsoletes UnpackStream with a default forwarding implementation -
matching the pattern ISyncActionService already uses for its own
Async/sync pair. The controller call site now awaits the async method.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@KevinJump
KevinJump merged commit 9f0667c into v18/main Jul 23, 2026
5 checks passed
@KevinJump
KevinJump deleted the fix/unpack-stream-async branch July 23, 2026 11:51
KevinJump added a commit that referenced this pull request Jul 23, 2026
…1006)

Records the four PRs merged this session under [Unreleased]: the new
ISyncManagementService.UnpackStreamAsync extender API (#1005), and the
MasterTemplateAlias / legacy local-link warning cleanup (#1002-#1004),
noted as non-behavioural.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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