Skip to content
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

Merged
merged 1 commit into from
Jan 8, 2016
Merged

Conversation

agocke
Copy link
Member

@agocke agocke commented Jan 7, 2016

No description provided.

@agocke
Copy link
Member Author

agocke commented Jan 7, 2016

/cc @dotnet/roslyn-compiler @dotnet/roslyn-infrastructure @amcasey @TyOverby

@@ -93,13 +93,14 @@ internal int RunCompilation(IEnumerable<string> originalArguments, BuildPaths bu
return HandleResponse(buildResponse, parsedArgs, buildPaths);
}
}
catch
catch (OperationCanceledException)
Copy link
Member

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?

Copy link
Member Author

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.

@amcasey
Copy link
Member

amcasey commented Jan 7, 2016

👍

@@ -157,12 +157,12 @@ protected override int RunLocalCompilation(List<string> arguments, string client
}
}

return null;
return Task.FromResult<BuildResponse>(null);
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

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 😦

agocke added a commit that referenced this pull request Jan 8, 2016
@agocke agocke merged commit d2885d4 into dotnet:master Jan 8, 2016
@agocke agocke deleted the fix-buildtask-nre branch January 8, 2016 01:06
@@ -13,6 +13,7 @@
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Test.Utilities;
using Roslyn.Test.Utilities;
using System.Threading;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sort usings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants