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

[Bug]: Terminal logger formatting issue when displaying running targets #8781

Closed
Tracked by #8370
vitek-karas opened this issue May 19, 2023 · 7 comments
Closed
Tracked by #8370
Assignees
Labels
Area: Terminal Logger Problems with the livelogger/fancylogger/terminallogger -tl functionality. bug triaged

Comments

@vitek-karas
Copy link
Member

Issue Description

I tried to add /tl to the build in dotnet/runtime repo. For the most part it works great - I like this.
But in some cases the "active" targets (the lines which are updating with times) get mangled a little bit:
image

This is on Windows, running in Windows Terminal under powershell (.NET 7 pwsh).

Steps to Reproduce

Run something like:
.\build.cmd Clr+Libs /tl in dotnet/runtime repo.

Expected Behavior

Each target shows exactly one time.

Actual Behavior

Some targets sometimes show the time twice (with only the second one updating)

Analysis

No response

Versions & Configurations

No response

@vitek-karas vitek-karas added bug needs-triage Have yet to determine what bucket this goes in. labels May 19, 2023
@baronfel
Copy link
Member

This may already be solved with nightlies - we had a width-calculation issue that has been fixed. Can you try to reproduce with preview5 nightlies if you get a chance?

@vitek-karas
Copy link
Member Author

Will see - I can't build the runtime with a preview SDK (well, I could but it's rather complicated)

One more question:
image

Will we fix this to show humanly readable duration - as in minutes:seconds?

@baronfel
Copy link
Member

I suppose we could - but if we leave it in seconds isn't that motivation for the runtime team to make their build faster? (I kid, of course :) )

@vitek-karas
Copy link
Member Author

Do you want me to file a separate issue?

I would love to be able to build runtime in less than 60 seconds, maybe the new msbuild can make that happen ;-)

@baronfel
Copy link
Member

I went ahead and created a new issue from your comment/request.

@rainersigwald rainersigwald self-assigned this May 19, 2023
@rainersigwald
Copy link
Member

I don't think this is solved yet--I believe I messed up truncation-to-fit-in-window when I colorized TF in #8715.

@AR-May AR-May added Area: Terminal Logger Problems with the livelogger/fancylogger/terminallogger -tl functionality. and removed needs-triage Have yet to determine what bucket this goes in. labels May 23, 2023
rainersigwald added a commit to rainersigwald/msbuild that referenced this issue Jun 16, 2023
rainersigwald added a commit to rainersigwald/msbuild that referenced this issue Jun 16, 2023
The root cause of dotnet#8781 is that the optimize-output-by-skipping-
identical-characters logic is not aware of escape sequences, so it goes
horribly awry when the replacing line differs after the first escape
sequence.

Instead, apply the previous logic only if there are no escape sequences;
if there are, replace the entire line.

If this proves to cause too much flicker or perform slowly, we could
implement escape-sequence-aware truncation, length, and comparison, but
we can wait for feedback to that effect.
@rainersigwald
Copy link
Member

Should be fixed by #8907.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Terminal Logger Problems with the livelogger/fancylogger/terminallogger -tl functionality. bug triaged
Projects
None yet
Development

No branches or pull requests

4 participants