-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fixes #7470 NRE in build task #7841
Conversation
@@ -93,13 +93,14 @@ internal int RunCompilation(IEnumerable<string> originalArguments, BuildPaths bu | |||
return HandleResponse(buildResponse, parsedArgs, buildPaths); | |||
} | |||
} | |||
catch | |||
catch (OperationCanceledException) |
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.
Other exceptions will still be caught further down the stack, right?
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.
Yes, all server exceptions should be caught by RunServerCompilation. By the time we get here we shouldn't be swallowing exceptions.
👍 |
@@ -157,12 +157,12 @@ protected override int RunLocalCompilation(List<string> arguments, string client | |||
} | |||
} | |||
|
|||
return null; | |||
return Task.FromResult<BuildResponse>(null); |
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.
Why does this method have to return Task<BuildResponse>
instead of just BuildResponse
? There are no await
's here. Or is it to make the signature equivalent to another function that does use await
?
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.
I spoke with @agocke offline and he explained what was going on.
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.
I swear we should write a rule that flags returning null
from a Task
based method 😦
@@ -13,6 +13,7 @@ | |||
using System.Threading.Tasks; | |||
using Microsoft.CodeAnalysis.Test.Utilities; | |||
using Roslyn.Test.Utilities; | |||
using System.Threading; |
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.
Sort usings
No description provided.