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
Text log format doesn't distinguish between item metadata and new items #3966
Comments
I believe this is a bug in the log viewer rather than msbuild. cc @KirillOsenkov <Message Importance="high" Text="@(_ProjectsFiles->'%(Identity): %(AdditionalMetadata)')" /> or similar are fine. |
I think you might be right. |
This issue was moved to KirillOsenkov/MSBuildStructuredLog#224 |
First of all, thanks for the very detailed bug report and an easy to reproduce issue. Unfortunately this is one of the few places in MSBuild where logging doesn't have enough structure. The log message has this exact text:
The viewer is already using various heuristics to recover structure here: However by looking at the text above the indentation of 8 spaces for the multiline metadata really leaves us no way of knowing that it's the continuation of the metadata value from the previous line. Ideally the log message would have a more structured representation of items and metadata, however I'm afraid it's not doable because of backwards compatibility. Lets keep the issue open on the MSBuild side as well to see if we can improve logging of added items with multiline metadata. Maybe emitting text delimiters? |
OK I have an idea how to fix this. When we print the metadata value that contains multiple lines we should split the value into individual lines and indent each line 8 spaces. This way the indentation will be correct in both the text log and the log viewer. I may prepare a PR at some point, but probably not soon. |
Thanks for taking a look so quickly! |
I need to test this scenario to make sure #6155 fixes it properly. |
Confirmed that #6155 fixes it properly: |
Fixed by #6155 |
I'm attempting to create an ItemGroup with some additional metadata and when the metadata spans multiple lines I get empty items created.
Steps to reproduce
Project file
Expected behavior
Actual behavior
Environment data
Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
15.9.20.62856
OS info:
Windows 10 1809
The text was updated successfully, but these errors were encountered: