Skip to content

Support for Extended Data#703

Merged
KirillOsenkov merged 4 commits intoKirillOsenkov:mainfrom
rokonec:rokonec/extended-data-in-events
Sep 6, 2023
Merged

Support for Extended Data#703
KirillOsenkov merged 4 commits intoKirillOsenkov:mainfrom
rokonec:rokonec/extended-data-in-events

Conversation

@rokonec
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

rokonec commented Sep 5, 2023

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

@KirillOsenkov
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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.

2 participants