diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f12ed1cca1a1e..7ea4ad03c07e3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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 diff --git a/src/Compilers/Core/CommandLine/BuildProtocol.cs b/src/Compilers/Core/CommandLine/BuildProtocol.cs index b2fa1ec0b622a..e315beaf65a28 100644 --- a/src/Compilers/Core/CommandLine/BuildProtocol.cs +++ b/src/Compilers/Core/CommandLine/BuildProtocol.cs @@ -132,16 +132,8 @@ public static async Task 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(); diff --git a/src/Compilers/Core/MSBuildTask/ManagedCompiler.cs b/src/Compilers/Core/MSBuildTask/ManagedCompiler.cs index b2a9dfe48325f..68ceaeecff859 100644 --- a/src/Compilers/Core/MSBuildTask/ManagedCompiler.cs +++ b/src/Compilers/Core/MSBuildTask/ManagedCompiler.cs @@ -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)