Skip to content

Good usage of progress bars and println #700

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

Open
Lawouach opened this issue Mar 25, 2025 · 3 comments
Open

Good usage of progress bars and println #700

Lawouach opened this issue Mar 25, 2025 · 3 comments

Comments

@Lawouach
Copy link

Hi all,

Thanks for this awesome crate. It's so useful :)

I'm convinced that I'm not using it right though.

I have a tool that shows a prelud using println (just text). Then some progress bars. When the process exits I want to write, after the bars, a few final lines using println. At that stage, the scope of the multibar is gone and I can't use its handle.

Unfortunately, I end up with random behaviors:

  • progress bars disappearing
  • progress bars being duplicated
    Etc.

Following #474 (comment) I've come to the conclusion that I shouldn't basically write any text after progress bars. Is that correct? Am I missing a trick to have a flow where I can include progress bars, continue with new text, have more progress bars, etc.?

Thanks,

@Lawouach
Copy link
Author

A followup question, can we have multiple distinct multibars at once? It seems to me they compete witch each other, when interleaved with println! calls at least.

@chris-laplante
Copy link
Collaborator

Can you please post your code? I assume by multibar you are talking about MultiProgress?

@Lawouach
Copy link
Author

Yes, sorry for the naming. I was typing that in a rush.

I'll try to come up with a small example because I'm using indicatif in a rather large piece right now so it wouldn't make sense.

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

No branches or pull requests

2 participants