msbuild
msbuild copied to clipboard
Wire up the properties reading/writing via loggingContexts
Contributes towards #9883
Context
This is 2nd from sequence of 3 changesets delivering the "Undefined Property Used" BuildCheck
This changeset wires the property read and write info to the buildcheck. The data are being sent via the LoggingContext->LoggingService->BuildCheck chain - so that we can easily add a reroute that will perform LoggingContext->LoggingService->BuildEventArgs remoting to the central node ->BuildCheck
The actuall check is not part of this changeset - it'll be delivered subsequently
Changes Made
- Imposing nullable checks on touched code
- Making sure
BuildEventContextis allways initialized inLoggingService - Extended the LoggingContecxt and LoggingService internal contract so that they can serve as sinks for build execution produced data
- Wired the property reads and writes data from engine to LoggingContext
- Wired the property reads and writes data from LoggingService to BuildCheck
- Wiring of eventing in BuildCheck
Design documentation
(part of this PR)
https://github.com/dotnet/msbuild/blob/proto/buildcheck-properties-wiring/documentation/specs/proposed/BuildCheck-Architecture.md#sourcing-unexposed-data-from-within-execution
Notes
- No actual functionality yet
- We still have singletons - The lifetime management is not yet part of this effort - will be resolved via separate work: https://github.com/orgs/dotnet/projects/373/views/7?pane=issue&itemId=62513427
- I'm going to produce small write-up or/and diagram for our arch doc to ilustrate the envisioned mechanics
- This PR will likely be in several conflicts with https://github.com/dotnet/msbuild/pull/10224 - I'm up for resolving those in the remaining PR upon approving any of these two PRs (FYI @surayya-MS)