-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Log ETW for SDK resolution again #9393
Log ETW for SDK resolution again #9393
Conversation
Per https://learn.microsoft.com/dotnet/api/system.diagnostics.tracing.eventsource#conventions, the version field for events must increment any time the payload is added to. I looked at https://github.com/dotnet/msbuild/blame/31c4d335325e858a3c4dba66d921d0e31bdee5ff/src/Framework/MSBuildEventSource.cs and added a version bump to every event that wasn't from 45e27c1, ad3e7d0, or an introduction of the event, and found only this one.
`EventSource.WriteEvent()` can, instead of writing the specified event, instead create `Microsoft-Build/EventSourceMessage` events that look like ``` EventSourceException while processing event "SdkResolverResolveSdkStop": Null passed as a event argument. EventSourceException while processing event "CachedSdkResolverServiceResolveSdkStop": Null passed as a event argument. ``` Fix all instances of this by enabling nullable analysis in `MSBuildEventSource.cs` and then fixing the errors that arose. Fixes dotnet#8519.
v1 of this fix is incomplete, because it didn't actually fix |
Tried #9395 but I think our normal build with the text perf log doesn't fire enough of the events to catch the SDK ones that are known (now) to be broken. |
src/Build/BackEnd/Components/ProjectCache/ProjectCacheService.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
EventSource.WriteEvent()
can, instead of writing the specified event, instead createMicrosoft-Build/EventSourceMessage
events that look likeFix instances of this by enabling nullable analysis in
MSBuildEventSource.cs
and then fixing the errors that arose.Fixes #8519.
While investigating this I noticed one event that had had a field added but no version bump, so I fixed that too.
With this change I see events: