-
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
Missing SdkResolverResolveSdk/Stop
event
#8519
Comments
I think my PR would fix this but I never had time to really dive into it and my suggested fix wasn't well received. |
Would you mind explaining what versions have to do with events not firing? I'm confused as to what the versions are defaulting to or why they would be different from each other. |
May fix #8519 Context Some SdkResolverResolveSdkStop events aren't being picked up. This is especially problematic, since those hold most of the interesting information. This tries to ensure that they are logged even if we throw. Changes Made Move stop event to finally block Testing None
The move to |
Instead of the real events we get
|
`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.
`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.
I've been looking at a few ETW traces, and I can see
Microsoft-Build/SdkResolverResolveSdk/Start
events, but no correspondingStop
event.Since the info about the resolver and the SDK to be resolved is in Stop, this is unfortunate:
msbuild/src/Build/BackEnd/Components/SdkResolution/SdkResolverService.cs
Lines 324 to 326 in 47a7121
Watching in the debugger, I can see that we're calling our event
msbuild/src/Framework/MSBuildEventSource.cs
Lines 498 to 502 in 47a7121
and it's getting into the underlying call:
I've seen this on
17.6.0-preview-23122-03+f93b24b5a for .NET Framework
as well as17.5.0-preview-23061-01+040e2a90e for .NET
, and in some traces from others that should be on older released versions.The text was updated successfully, but these errors were encountered: