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

Support for Extended Data #703

Merged

Conversation

rokonec
Copy link
Contributor

@rokonec rokonec commented Sep 5, 2023

Implementing: dotnet/msbuild#9091

Context

MSBuild introduced new concept of Event args Extended data which are supposed to address need to extend events.
One of its most appealing use cases is for passing extended compiler error and warning structured information into msbuild logging infrastructure. Having such info in binlog and viewer might be of use.

Changes Made

  • add support for extended data which will be introduced in FileFormatVersion 17
  • derived classes from Error, Warning, and Message including extended data
  • add context menu item which prints context of extended data to text window

@rokonec
Copy link
Contributor Author

rokonec commented Sep 5, 2023

Attached is binary log for testing if needed.
binlog.zip

@KirillOsenkov
Copy link
Owner

this is nice! I think if extended data is available, we should manufacture a message as a child node of the extended event, and put the full text in there. Also if extended metadata is present, add metadata child nodes for each metadata

@KirillOsenkov
Copy link
Owner

See Construction.AddProperties for an example, but maybe use Metadata instead of Property

@@ -549,7 +550,7 @@
<Setter TargetName="messageText" Property="Opacity" Value="0.25" />
</DataTrigger>
</DataTemplate.Triggers>
Copy link
Owner

Choose a reason for hiding this comment

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

Probably need to change these to HierarchicalDataTemplate.Triggers

Copy link
Owner

Choose a reason for hiding this comment

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

Surprised that it works, but OK

@KirillOsenkov KirillOsenkov merged commit 90567e6 into KirillOsenkov:main Sep 6, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants