Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress indicator #190

Open
leodido opened this issue Mar 28, 2023 · 0 comments
Open

Progress indicator #190

leodido opened this issue Mar 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@leodido
Copy link
Member

leodido commented Mar 28, 2023

Describe the feature or problem you’d like to solve

Currently, the CLI doesn't show a progress status.

This leads to misunderstandings in its usage. We need to indicate the progress of the dependencies being processed (either in parallel - like now happens - or not).

Proposed solution

I would keep the way we process dependencies right now, in parallel (for performance reasons).

At the same time, I and @fntlnz propose to update a progress counter while processing the dependencies and show it in the terminal.

The progress counter can be stored in the context.Context we pass along by using the mechanism already in place. In fact, the listen.BulkPackages already takes in an option to inject such a context.

If we want we can also store the total number of dependencies (per type), by using the same context.Context mechanism (even tho this is not necessary because we have the total in the place where we'll be actually doing the progress visualization).

Roughly, what I propose is:

  1. we create an (integer?) variable to track the progress when the root command boots up
  2. we store it in the context
  3. we update the (integer?) variable value in the internal listen.BulkPackages callback
  4. we visualize the progress (in the command implementation) by concurrently reading this variable value

Additional context

NONE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant