microsoft / microsoft/winget-cli

IDL async methods execute synchronously

Open
#3,205 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

IDL async methods execute synchronously, possibly due to missing await?

Example:

Steps to reproduce
// Connect to catalog
await catalog.ConnectAsync(); // Executes synchronously
Expected behavior

Execute ConnectAsync() and other *Async() methods asynchronously.

"When the await keyword is applied, it suspends the calling method and yields control back to its caller until the awaited task is complete."

Source: Asynchronous Programming

Actual behavior

Methods execute synchronously

Environment
Windows Package Manager (Preview) v1.5.1081-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22624.1680
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.20.1081.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ConnectAsync in src/Microsoft.Management.Deployment/PackageCatalogReference.cpp and FindPackagesAsync in src/Microsoft.Management.Deployment/PackageCatalog.cpp. Trace how these IDL methods are invoked from the C# example and identify the existing asynchronous behavior. Done means ConnectAsync and the other affected *Async methods no longer execute synchronously when awaited.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, csharp
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.