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

Compiler server fixes #72716

Merged
merged 4 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ stages:
steps:
- template: eng/pipelines/checkout-windows-task.yml

- powershell: eng/make-bootstrap.ps1 -output $(bootstrapDir)
- powershell: eng/make-bootstrap.ps1 -output $(bootstrapDir) -ci
displayName: Build Bootstrap Compiler

- powershell: eng/test-determinism.ps1 -configuration Debug -bootstrapDir $(bootstrapDir) -ci
Expand Down
10 changes: 1 addition & 9 deletions src/Compilers/Core/CommandLine/BuildProtocol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,8 @@ public static async Task<BuildRequest> ReadAsync(Stream inStream, CancellationTo
throw new ArgumentException($"Request is over {MaximumRequestSize >> 20}MB in length");
}

cancellationToken.ThrowIfCancellationRequested();

// Read the full request
var requestBuffer = new byte[length];
await ReadAllAsync(inStream, requestBuffer, length, cancellationToken).ConfigureAwait(false);

cancellationToken.ThrowIfCancellationRequested();

// Parse the request into the Request data structure.
using var reader = new BinaryReader(new MemoryStream(requestBuffer), Encoding.Unicode);
using var reader = new BinaryReader(inStream, Encoding.Unicode, leaveOpen: true);
var requestId = reader.ReadString();
var language = (RequestLanguage)reader.ReadUInt32();
var compilerHash = reader.ReadString();
Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/Core/MSBuildTask/ManagedCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ private bool ValidateBootstrapResponse(BuildResponse? response)
Log.LogError($"Critical error {responseType} when building");
return false;
case BuildResponse.ResponseType.Rejected:
Log.LogError($"Compiler request rejected");
Log.LogError($"Compiler request rejected: {((RejectedBuildResponse)response!).Reason}");
return false;
case BuildResponse.ResponseType.CannotConnect:
if (Interlocked.Increment(ref s_connectFailedCount) > maxCannotConnectCount)
Expand Down
Loading