-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Please support the latest (new) Windows Terminal #3
Comments
Also, when I run this in git bash, no progress bars are displayed at all. |
Txs @fiso64 fiso64 for reporting this; I'll take a look at this tomorrow. |
@fiso64 deleted an earlier comment; I'll take a look at this later today. note to self; (It's mostly the same code; that's also my project; I just carved out the ProgressBar to be standalone, and Konsole package receives many more updates due to it having many more users. Need to check if this problem is already fixed in Konsole.) |
Your sample code has errors in it. I've just tested 'ProgressBar' on Windows using the following much simpler code and it appears to be working correctly. I'm closing this issue as not a bug. If you still find you have issues, please use the code below as a guide of how to use ProgressBar in a concurrent situation. using Konsole;
class Program
{
static async Task Main(string[] args)
{
var rnd = new Random();
for (int i = 1; i <= 100; i+=2)
{
// run two progressbars at a time in parallel
await Task.WhenAll(
Task.Run(()=> DownloadFiles(rnd, i, $"FILE {i}")),
Task.Run(()=> DownloadFiles(rnd, i+1, $"FILE {i+1}"))
);
}
}
static void DownloadFiles(Random rnd, int cnt, string title)
{
var fileCount = rnd.Next(1, 50);
var bar = new ProgressBar(fileCount);
bar.Refresh(0, $"New Task {cnt}");
for (int j = 1; j <= fileCount; j++)
{
bar.Next($"Progressbar {cnt}, {j + 1} files.");
Task.Delay(rnd.Next(10, 100));
}
}
} |
As you can see, many of them aren't at 100%. Also, note that some are duplicated (e.g progress bar 98 and 100 appear on two different lines). |
Ah, that's helpful to know, thank you. I've re-opened the issue and renamed it to be more specific. |
@fiso64 Given that the update will need to work with a totally new platform rendering engine is why I'm saying it will be at the very least a few days. (managing expectations) |
Updates; some reading and possibly ?? related issues in the new terminal Random list of some light reading. Items may have nothing to do with the issue;
note; |
Update: hi @fiso64 : I thought it only appropriate to let you know that I'm not going to be able to work on this any time soon. There's not enough users of ProgressBar that have engaged with me (the developer), other than yourself, and unfortunately your immediate need is to support a new platform it wasn't designed to support, since clearly the new console in some small but critical way is not 100% backward compatible with the old windows console behavior. I'm leaving this open, so that others can see the discussion, but labelling this as "not a bug"; it's a feature request to support a new platform. As I said in my comments above, there might be a simple fix. Feel free to fork the project, and I'll happily accept a Pull Request to patch it. Best of luck, A |
Completely understand. Thanks for looking into this. |
When continuously adding new progress bars and it is run in the new windows terminal and it starts scrolling, the progress bars do not behave properly. I'm not sure how to describe what happens, but here's a minimal example:
It works fine in the default cmd on windows.
The text was updated successfully, but these errors were encountered: