chocolatey / chocolatey/choco

Choco API's: Support for total progress bar and cancellation

Open
#2,142 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

If choco downloads and/or installs multiple packages, there should be mechanism to observe total percentage, not only for local file.

`chocolatey\infrastructure.app\nuget\NugetCommon.cs`
`packageDownloader.ProgressAvailable += (sender, e) =>`

this event mechanism observes download progress of one file.

=> Need to have support for multiple files

Also at the moment choco does not provide mechanism for end-user to be able to cancel the download or install operation gracefully - newer API should support it.

`src\chocolatey\infrastructure\commands\Execute.cs`
`var cancelToken = new CancellationTokenSource();`

=> This should be centralized, and provided to end-user of API.

Contributor guide

Open the contributing guide

Research direction

Start by reading chocolatey\infrastructure.app\nuget\NugetCommon.cs around packageDownloader.ProgressAvailable to understand the current single-file progress event. Then inspect src\chocolatey\infrastructure\commands\Execute.cs around the CancellationTokenSource. Done means the API supports total progress across multiple package operations and exposes graceful cancellation to end users.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.