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 Bar "loses sync" under windows and spews 100's of lines #22055

Open
gcohler opened this issue Nov 23, 2024 · 4 comments
Open

Progress Bar "loses sync" under windows and spews 100's of lines #22055

gcohler opened this issue Nov 23, 2024 · 4 comments
Labels
bug Observed behavior contradicts documented or intended behavior

Comments

@gcohler
Copy link

gcohler commented Nov 23, 2024

Zig Version

v13

Steps to Reproduce and Observed Behavior

I see it when I run a zig build on the zigem-sdk repo. The progress bar works normally for part of the build (i.e. overwriting itself as it progresses). Then all of a sudden, it "loses sync" and just spews 100's of lines. That is it no longer overwrites, it just writes 100s of lines of the same thing essentially.

Expected Behavior

Two expectations:

  1. I expect it to work as it does under Linux.
  2. I expect that for this sort of output, there should be a "quiet" option that turns it off.

So this is both a bug report and an enhancement request.

@gcohler gcohler added the bug Observed behavior contradicts documented or intended behavior label Nov 23, 2024
@squeek502
Copy link
Collaborator

squeek502 commented Nov 23, 2024

I can't reproduce this (using Windows 10 with Windows Terminal).

  • zig build on zigem-sdk hits 404 errors due to repository renames. After fixing that, the build errors with 10/14 steps completed with unable to spawn chmod: FileNotFound, likely meaning zigem-sdk does not fully support building from a Windows host.
  • What terminal are you using? If your terminal supports ANSI escape sequences (ENABLE_VIRTUAL_TERMINAL_PROCESSING), then the Zig progress bar will use them, meaning there is no difference between Windows and Linux in terms of how the progress bar is drawn.
    • If your terminal does support escape sequences, then this could be indicative of a bug in your terminal's escape sequence processing
    • Note: If your terminal does not support escape sequences, you will see a character at the start of the progress tree

@gcohler
Copy link
Author

gcohler commented Nov 23, 2024

My bad: I forgot to say that you should use branch staging and a VS Code Bash Terminal window (for this).

And I happen to be using Windows 11 -- but I don't think it's a 10 v 11 issue. I think it's a VS code terminal window issue.

Here's a cookbook (assuming zig is installed and in the path):

git clone -b staging [email protected]:em-foundation/zigem-sdk.git
cd zigem-sdk
code .

Then open a Bash terminal window inside VsCode:

./utils/clean.sh -d     # this just cleans out things to be sure build has something to do
zig build

And you should see the problem after a little while. The build works fine. It's just the terminal window is filled with detritus.

@squeek502
Copy link
Collaborator

Do you see a character at the start of the progress tree?

@gcohler
Copy link
Author

gcohler commented Nov 23, 2024

And I don't see a ► character at the start of the progress tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior
Projects
None yet
Development

No branches or pull requests

2 participants