-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Diagnostic build log not emitting properties anymore? #6609
Comments
Context: dotnet/msbuild#6609 It seems that properties are missing from MSBuild logs, ignoring part of this test for now.
From my minimal local testing, this should be fixed in our current build which will flow through soonish. Please let me know if you see this after tomorrow. (we talked about this offline but commenting here so it's not lost) |
Context: dotnet/msbuild#6609 It seems that properties are missing from MSBuild logs, ignoring part of this test for now.
Changes: dotnet/installer@abb57b4...12636f6 Changes: dotnet/linker@21df7db...f90f5c9 Changes: dotnet/runtime@5b8e178...8bb087d * Update dependencies from https://github.com/dotnet/installer build 20210623.1 Microsoft.Dotnet.Sdk.Internal From Version 6.0.100-preview.6.21313.2 to 6.0.100-preview.6.21323.1 Dependency coherency updates * Microsoft.NET.ILLink.Tasks: from 6.0.100-preview.6.21304.2 to 6.0.100-preview.6.21314.2 * Microsoft.NETCore.App.Ref: from 6.0.0-preview.6.21306.1 to 6.0.0-preview.6.21317.12 * [tests] temporarily skip asserts in BuildBasicBindingLibrary Context: dotnet/msbuild#6609 It seems that properties are missing from MSBuild logs, ignoring part of this test for now. * [templates] set .png files to `copyOnly` Context: dotnet/templating#3325 Context: https://github.com/dotnet/templating/wiki/Reference-for-template.json#content-manipulation In the current bump, `dotnet new android` + `dotnet build` fails with: Resources\mipmap-xxxhdpi\ic_launcher_round.png error APT2000: failed reading from input: PNG chunk type 49444154 is too large: chunk length is 10836 but chunk starts at byte 45/8187. The .NET templating system has a `copyOnly` mode for files that do not need any text replaced. This is a performance feature, but it also happens to workaround this issue. We should be doing this on `.png` files *anyway*, as we don't need potential "text" to be replaced. I will probably need to make similar changes in xamarin/xamarin-macios and dotnet/maui. Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
Changes: dotnet/installer@abb57b4...38e12ca Changes: dotnet/linker@21df7db...c739a81 Changes: dotnet/runtime@5b8e178...24950a3 Updates: * Microsoft.Dotnet.Sdk.Internal: from 6.0.100-preview.6.21313.2 to 6.0.100-preview.7.21321.2 * Microsoft.NET.ILLink.Tasks: from 6.0.100-preview.6.21304.2 to 6.0.100-preview.6.21317.4 * Microsoft.NETCore.App.Ref: from 6.0.0-preview.6.21306.1 to 6.0.0-preview.7.21319.2 * Remove workarounds for <RuntimeConfigParserTask/> Context: dotnet/runtime#53811 dotnet/runtime#53811 is now solved, so we can remove the workaround. * Update .apkdesc files * [tests] temporarily skip asserts in BuildBasicBindingLibrary Context: dotnet/msbuild#6609 It seems that properties are missing from MSBuild logs, ignoring part of this test for now. * [templates] set .png files to `copyOnly` Context: dotnet/templating#3325 Context: https://github.com/dotnet/templating/wiki/Reference-for-template.json#content-manipulation In the current bump, `dotnet new android` + `dotnet build` fails with: Resources\mipmap-xxxhdpi\ic_launcher_round.png error APT2000: failed reading from input: PNG chunk type 49444154 is too large: chunk length is 10836 but chunk starts at byte 45/8187. The .NET templating system has a `copyOnly` mode for files that do not need any text replaced. This is a performance feature, but it also happens to workaround this issue. We should be doing this on `.png` files *anyway*, as we don't need potential "text" to be replaced. I will probably need to make similar changes in xamarin/xamarin-macios and dotnet/maui. Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
I think this is still happening here: dotnet/android#6046 This should be using 67ba2df. It looks like the fix in #6520 is there: msbuild/src/Build/BackEnd/Components/Logging/LoggingService.cs Lines 511 to 530 in 67ba2df
But maybe there is still a newer commit we need? Let me know, thanks. |
cc @KirillOsenkov in case something jumps out at you here |
Could it be something about using
We're doing this in some integration tests, just to capture every possible log. If we hit something like a crash, sometimes it was easier to read the text log. |
Curious if you play back the binlog, will the properties be there? |
Replaying the log above & opening it in VS Code, I don't think I see any properties:
I see the env vars, but not properties:
|
mind sending me both the binlog and the original text log? |
Oh, they're on the issue above, sorry. |
Wow, the properties are not in the binlog, neither on ProjectStarted nor on ProjectEvaluationFinished. This is alarming. I'm taking a look. |
OK I got a repro. The problem is the environment variable With this set, and a multi-process build |
So, this environment variable makes stuff weird:
Without it, props are in the text log always. |
Well, I understand why properties are not on ProjectStarted. They will only be logged when not running on remote node, and with the environment variable we always run on remote node: msbuild/src/Build/BackEnd/Components/Logging/ProjectLoggingContext.cs Lines 88 to 92 in 2c37803
|
OK, and
I'd say this behavior is by design. |
To have the properties appear on ProjectEvaluationFinished:
To have the properties appear on ProjectStarted:
|
I'm so used to my change to property logging on evaluation regressing things that I'm relieved that this particular one is not a regression ;) |
We're attempting to set @rokonec here's another thing to keep an eye on when we try to re-enable it 😔 |
For close future, I will not have time to work at it. Once/if MSBuild server v1 resumes, I will take this one. |
Issue Description
We first noticed this through Maestro bumps:
We have a unit test that is asserting several MSBuild properties are in the diagnostic MSBuild log:
build.zip
It's looking for text like
AndroidSdkBuildToolsVersion =
. I see this as parameters to tasks, but that's it.That's when I noticed I'm seeing env vars in this log but not properties? Did we regress on that? Thanks!
Steps to Reproduce
I think, just build a project with
/flp1:LogFile=build.log;Verbosity=diag
and look for properties in the file?Expected Behavior
Properties are in diagnostic build logs.
Actual Behavior
I don't see properties in diagnostic build logs?
Versions & Configurations
.NET 6.0.100-preview.6.21321.13
Attach a binlog
I don't really see properties in here either:
msbuild.zip
The text was updated successfully, but these errors were encountered: