Extend property assignment event (The feature is opted-out by default)#11106
Conversation
…gic on bin log side
JanKrivanek
left a comment
There was a problem hiding this comment.
I have couple comments to consider.
The main thing before signoff - this is currently not a default behavior (neither with /bl) - correct? Property tracking needs to be explicitly opted in - right?
Please add that info into the PR description (as otherwise the 8.5% perf hit might be bit concerning and might need a bit more deeper look)
src/Build/BackEnd/Components/RequestBuilder/IntrinsicTasks/PropertyGroupIntrinsicTask.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Jan Krivanek <jankrivanek@microsoft.com>
|
How do I enable the feature for testing? What setting value did you use for perf testing? |
|
There are two things I did to investigate the binlog size increase:
For diffing, pick a simple console application, and do an incremental build (not clean build), setting MsBuildLogPropertyTracking to the right value. What is the default value for it currently? Why are property reassignment messages even logged when the value is 0 (the current default)? |
|
Ah, I see: msbuild/src/Build/Evaluation/PropertyTrackingEvaluatorDataWrapper.cs Lines 320 to 323 in 4042363 |
|
I'm not quite sure, but I think we might have lost the location for property reassignment with #10102 (FYI @JanKrivanek) |
src/Build/BackEnd/Components/RequestBuilder/IntrinsicTasks/PropertyGroupIntrinsicTask.cs
Outdated
Show resolved
Hide resolved
src/Build/BackEnd/Components/RequestBuilder/IntrinsicTasks/PropertyGroupIntrinsicTask.cs
Outdated
Show resolved
Hide resolved
9ec7d4d to
9a5ad3c
Compare
JanKrivanek
left a comment
There was a problem hiding this comment.
Overall looks good.
Before I'm ready to sign-off I want to be sure that the labeling of property source feels sufficient (e.g. the distionction of globals from scripts) and that the conditions are done as they are meant to be.
Ping me once adjusted or commented here and I'll rereview
src/Build/BackEnd/Components/RequestBuilder/IntrinsicTasks/PropertyGroupIntrinsicTask.cs
Outdated
Show resolved
Hide resolved
|
I think it's mostly in a good shape, I left some minor comments. Since we're not changing the default mainline scenario I'm not worried about perf (which we can always tune in a separate PR). |
KirillOsenkov
left a comment
There was a problem hiding this comment.
Looks good as far as I can see!
Thanks so much for the perseverance.
JanKrivanek
left a comment
There was a problem hiding this comment.
Awesome work!
Very helpful feature!!
Please as well add a mention of the opt-in env var somewhere into our docs


Fixes #2711
and connected to KirillOsenkov/MSBuildStructuredLog#839
Context
The feature is opted-out by default due to perf considerations !
This implementation covers cases:
Globalsource)Also, the message formatting logic was changed for
PropertyReassignmentEventArgs,PropertyInitialValueSetEventArgs,UninitializedPropertyReadEventArgsto have it optimized for existing deduplication logic (message is not passed as a part of event).The event save all the unique data and format it on the receiving side (e.g. LogViewer).
The measurements were taken for the latest OrchardCode