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

Сhange ProperyReassignment logged message type #9494

Conversation

YuliiaKovalova
Copy link
Member

Fixes #9385

Context

During the Evaluation phase, property reassignment was logged as a plain message.

Changes Made

convert plain message to -> PropertyReassignmentEventArgs

Testing

UT is added

@AR-May
Copy link
Member

AR-May commented Dec 6, 2023

Please retarget this PR to vs17.9 branch, since this is a bug fix.

@YuliiaKovalova YuliiaKovalova changed the base branch from main to vs17.9 December 6, 2023 12:35
Copy link
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

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

Looks good!

I have couple minor suggestions for consideration

[Fact]
public void VerifyLogPropertyReassignment()
{
string testtargets = ObjectModelHelpers.CleanupFileContents(@"
Copy link
Member

Choose a reason for hiding this comment

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

NIT: using """ literals allows you to use quotations as is without need to escape

src/Build.UnitTests/Evaluation/Evaluator_Tests.cs Outdated Show resolved Hide resolved
Copy link
Member

@KirillOsenkov KirillOsenkov left a comment

Choose a reason for hiding this comment

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

Looks great!

I built bootstrap MSBuild from this branch, built a project, opened in binlog viewer, and it all looks good. Confirmed the code path in the viewer to synthesize these is no longer taken. Confirmed you can search for Property reassignment, new values and old values are displayed correctly, you can navigate to the location.

Also in File -> Statistics you can see that it's usually the 6th most used args type:

image

@YuliiaKovalova YuliiaKovalova merged commit 9276c4e into dotnet:vs17.9 Dec 11, 2023
8 checks 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.

[Bug]: PropertyReassignment logged as plain messages
5 participants