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

Ensure diagnostic logger verbosity Fixes #7780 #7897

Merged
merged 2 commits into from
Aug 28, 2022

Conversation

Forgind
Copy link
Member

@Forgind Forgind commented Aug 18, 2022

Fixes #7780

Context

When using MSBuildDebugEngine, we should log everything at diagnostic verbosity. If no loggers were attached in the normal way, we still set verbosity to diagnostic (for command line builds) and manually set both DetailedSummary and LogTaskInputs on the BuildParameters in BuildManager. I believe these are the only two variables set by binlogs that weren't being set by MSBuildDebugEngine.

Changes Made

This sets the verbosity to diagnostic in XMake and sets DetailedSummary and LogTaskInputs on BuildParameters.

Testing

Notes

When using MSBuildDebugEngine, we should log everything at diagnostic verbosity. If no loggers were attached in the normal way, we still set verbosity to diagnostic (for command line builds) and manually set both DetailedSummary and LogTaskInputs on the BuildParameters in BuildManager. I believe these are the only two variables set by binlogs that weren't being set by MSBuildDebugEngine.
src/MSBuild/XMake.cs Show resolved Hide resolved
Comment on lines +471 to +472
parameters.DetailedSummary = true;
parameters.LogTaskInputs = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What other implications does setting summary here have? Does it affect attached loggers?

@Forgind
Copy link
Member Author

Forgind commented Aug 23, 2022

I deployed my changes to VS, set MSBuildDebugEngine to 1, and set MSBUILDDEBUGPATH. Console logger verbosity should be minimal. Here are the pieces that lead me to think this is working as desired:

Rebuild started...
1>------ Rebuild All started: Project: ConsoleApp1, Configuration: Debug Any CPU ------
Restored C:\Users\forgind\Desktop\Archives\Bug-specific\7780\ConsoleApp1\ConsoleApp1\ConsoleApp1.csproj (in 16 ms).
1>C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(219,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
1>ConsoleApp1 -> C:\Users\forgind\Desktop\Archives\Bug-specific\7780\ConsoleApp1\ConsoleApp1\bin\Debug\net6.0\ConsoleApp1.dll
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

image

That is as desired, correct?

@Forgind Forgind added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Aug 25, 2022
@benvillalobos benvillalobos merged commit 14c24b2 into dotnet:main Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MSBUILDDEBUGENGINE should infer maximal logging (MSBUILDLOGTASKINPUTS)
3 participants