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

[FancyLogger] Show link to project outputs #8324

Merged
merged 23 commits into from
Feb 7, 2023
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge with dotnet/main
edvilme committed Jan 27, 2023

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kylekurz Kyle Kurz
commit e1ccbc35224570dc975dc131dac1dfbcb34c2dc1
6 changes: 5 additions & 1 deletion src/MSBuild/FancyLogger/ANSIBuilder.cs
Original file line number Diff line number Diff line change
@@ -120,7 +120,11 @@ public static string SpaceBetween(string leftText, string rightText, int width)
string result = String.Empty;
string leftNoFormatString = ANSIRemove(leftText);
string rightNoFormatString = ANSIRemove(rightText);
if (leftNoFormatString.Length + rightNoFormatString.Length >= width) return leftText + rightText;
if (leftNoFormatString.Length + rightNoFormatString.Length >= width)
{
return leftText + rightText;
}

int space = width - (leftNoFormatString.Length + rightNoFormatString.Length);
result += leftText;
result += new string(' ', space - 1);
6 changes: 5 additions & 1 deletion src/MSBuild/FancyLogger/FancyLogger.cs
Original file line number Diff line number Diff line change
@@ -252,7 +252,11 @@ public void Shutdown()
int warningCount = 0;
foreach (var project in projects)
{
if (project.Value.AdditionalDetails.Count == 0) continue;
if (project.Value.AdditionalDetails.Count == 0)
{
continue;
}

Console.WriteLine(project.Value.ToANSIString());
errorCount += project.Value.ErrorCount;
warningCount += project.Value.WarningCount;
3 changes: 1 addition & 2 deletions src/MSBuild/FancyLogger/FancyLoggerBuffer.cs
Original file line number Diff line number Diff line change
@@ -83,8 +83,7 @@ public static void Terminate()
// Delete contents from alternate buffer before switching back to main buffer
Console.Write(
ANSIBuilder.Cursor.Home() +
ANSIBuilder.Eraser.DisplayCursorToEnd()
);
ANSIBuilder.Eraser.DisplayCursorToEnd());
// Reset configuration for buffer and cursor, and clear screen
Console.Write(ANSIBuilder.Buffer.UseMainBuffer());
Console.Write(ANSIBuilder.Cursor.Visible());
6 changes: 5 additions & 1 deletion src/MSBuild/FancyLogger/FancyLoggerProjectNode.cs
Original file line number Diff line number Diff line change
@@ -184,7 +184,11 @@ public FancyLoggerTargetNode AddTarget(TargetStartedEventArgs args)
MessageCount++;
FancyLoggerMessageNode node = new FancyLoggerMessageNode(args);
// Add output executable path
if (node.ProjectOutputExecutablePath is not null) ProjectOutputExecutable = node.ProjectOutputExecutablePath;
if (node.ProjectOutputExecutablePath is not null)
{
ProjectOutputExecutable = node.ProjectOutputExecutablePath;
}

AdditionalDetails.Add(node);
return node;
}
You are viewing a condensed version of this merge commit. You can view the full changes here.