-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Refactor ExecuteInstantiatedTask exception handling #790
Copy link
Copy link
Open
Labels
Area: DebuggabilityIssues impacting the diagnosability of builds, including logging and clearer error messages.Issues impacting the diagnosability of builds, including logging and clearer error messages.help wantedIssues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.Issues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.triaged
Milestone
Metadata
Metadata
Assignees
Labels
Area: DebuggabilityIssues impacting the diagnosability of builds, including logging and clearer error messages.Issues impacting the diagnosability of builds, including logging and clearer error messages.help wantedIssues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.Issues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.triaged
Type
Fields
Give feedbackNo fields configured for issues without a type.
There's a great deal of logic in
ExecuteInstantiatedTaskdesigned to handle exceptions thrown by tasks: https://github.com/Microsoft/msbuild/blob/4b30fac51ab58dadfffedb2a57e83b8398e3a5e1/src/XMakeBuildEngine/BackEnd/Components/RequestBuilder/TaskBuilder.cs#L720Included in a lot of that logic is "rethrow wrapped to preserve stack", which was required in C# before C# 6. But now we have exception filters, which could simplify this logic and preserve stacks for free.
This is an important part of failure handling, so we'd need to make sure the right behavior from the existing logic is preserved.