Skip to content
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 .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
Comment thread
daxian-dbw marked this conversation as resolved.
Outdated
#-------------------------------------------------------------------------------------------------------------

FROM mcr.microsoft.com/dotnet/core/sdk:3.1.100-preview1
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.100-preview2

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
Expand Down
8 changes: 4 additions & 4 deletions assets/files.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -3062,9 +3062,6 @@
<Component Id="cmpF6FDA6202E9D4CEF9F21A23D32571BFC" Guid="{e0776aa4-b3aa-4a15-a497-697b510fba8c}">
<File Id="fil9120D0A4381F4B34B80AB37D2EFBCF7D" KeyPath="yes" Source="$(env.ProductSourcePath)\InstallPSCorePolicyDefinitions.ps1" />
</Component>
<Component Id="cmpEC42F4F98D70437BB0E290A0E0FE1775" Guid="{5483092a-12c2-4e6c-b730-be491b8909c0}">
<File Id="filBE60A48C75214B7B810D695039AC47B5" KeyPath="yes" Source="$(env.ProductSourcePath)\mscordaccore_$(var.FileArchitecture)_$(var.FileArchitecture)_4.700.19.50403.dll" />
</Component>
<Component Id="cmp73A4CC8E2C9E4594A3D8258C9E00D7E6" Guid="{0aba3675-b1b5-4464-b8ed-937d3b9ea9ed}">
<File Id="fil8DBDCAE679714880A535D26FFE95A8F9" KeyPath="yes" Source="$(env.ProductSourcePath)\Microsoft.PowerShell.GraphicalHost.dll.config" />
</Component>
Expand All @@ -3074,6 +3071,9 @@
<Component Id="cmp2E32A6E773F543F0A150B972F8D3E23A" Guid="{a43d0117-1193-4316-a0f6-fef892870f38}">
<File Id="fil66411B8941CA492E93BF262EA72C6BE6" KeyPath="yes" Source="$(env.ProductSourcePath)\Microsoft.PowerShell.GraphicalHost.xml" />
</Component>
<Component Id="cmpCD1095120697449FA27BE5759D83F618" Guid="{dac64ea2-13b9-409a-b215-974201244c9f}">
<File Id="filA48D09FB0F0C40E982B626C101698232" KeyPath="yes" Source="$(env.ProductSourcePath)\mscordaccore_$(var.FileArchitecture)_$(var.FileArchitecture)_4.700.19.52202.dll" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
Expand Down Expand Up @@ -3914,12 +3914,12 @@
<ComponentRef Id="cmp34649490F5B04041A08E73D7A86D5A5A" />
<ComponentRef Id="cmpB3116053008E492C9B36C89BF682B8F7" />
<ComponentRef Id="cmp859A3876902946E7B5B4965F90664C5D" />
<ComponentRef Id="cmpEC42F4F98D70437BB0E290A0E0FE1775" />
<ComponentRef Id="cmpF1B0E6DCC3BD4797B206C879EF270062" />
<ComponentRef Id="cmp73A4CC8E2C9E4594A3D8258C9E00D7E6" />
<ComponentRef Id="cmpAC984FA3A67247BC996F60290C87D0A1" />
<ComponentRef Id="cmp2E32A6E773F543F0A150B972F8D3E23A" />
<ComponentRef Id="cmp25A144CC34E545378735B06794A02F90" />
<ComponentRef Id="cmpCD1095120697449FA27BE5759D83F618" />
</ComponentGroup>
</Fragment>
</Wix>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "3.1.100-preview1-014459"
"version": "3.1.100-preview2-014569"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

<ItemGroup>
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.7.0-preview2.19523.17" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.3.1" />
<PackageReference Include="System.Threading.AccessControl" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.Drawing.Common" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.Threading.AccessControl" Version="4.7.0-preview2.19523.17" />
<PackageReference Include="System.Drawing.Common" Version="4.7.0-preview2.19523.17" />
<PackageReference Include="NJsonSchema" Version="10.0.27" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,15 @@ private static string StreamToString(Stream stream, Encoding encoding)

// Increment byteIndex to the next block of bytes in the input buffer, if any, to convert.
byteIndex += bytesUsed;

// The behavior of decoder.Convert changed start .NET 3.1-preview2.
// The change was made in https://github.com/dotnet/coreclr/pull/27229
// The recommendation from .NET team is to not check for 'completed' if 'flush' is false.
// Break out of the loop if all bytes have been read.
if (!flush && bytesRead == byteIndex)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Now that complete is useless, I think we'd better change this implementation a bit more. Like the following:

            while (true)
            {
                // Read at most the number of bytes that will fit in the input buffer. The
                // return value is the actual number of bytes read, or zero if no bytes remain.
                bytesRead = stream.Read(bytes, 0, useBufferSize * 4);
                if (bytesRead == 0)
                {
                    break;
                }

                bool completed = false;
                int byteIndex = 0;
                int bytesUsed;
                int charsUsed;

                while (bytesRead > byteIndex)
                {
                    // If this is the last input data, flush the decoder's internal buffer and state.
                    bool flush = (bytesRead == 0);
                    decoder.Convert(bytes, byteIndex, bytesRead - byteIndex,
                                    chars, 0, useBufferSize, flush,
                                    out bytesUsed, out charsUsed, out completed);
                    // The conversion produced the number of characters indicated by charsUsed. Write that number
                    // of characters to our result buffer
                    result.Append(chars, 0, charsUsed);

                    // Increment byteIndex to the next block of bytes in the input buffer, if any, to convert.
                    byteIndex += bytesUsed;
                }
            } while (bytesRead != 0);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Never mind. Change of the API makes it hard to reason about -- does decoder.Convert needs to be called again when bytesRead is 0? If it's needed, then will it produce any chars? If not, what's the purpose of doing so?
Without the understanding of those questions, let's keep the change as safe as possible, at least for now.

{
break;
}
}
} while (bytesRead != 0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="System.Diagnostics.EventLog" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.Diagnostics.EventLog" Version="4.7.0-preview2.19523.17" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<!-- the following package(s) are from https://github.com/dotnet/fxdac -->
<PackageReference Include="System.Data.SqlClient" Version="4.8.0-preview1.19504.10" />
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="System.IO.Packaging" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.Text.Encodings.Web" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.IO.Packaging" Version="4.7.0-preview2.19523.17" />
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="4.7.0-preview2.19523.17" />
<PackageReference Include="System.Text.Encodings.Web" Version="4.7.0-preview2.19523.17" />
<!-- the following package(s) are from https://github.com/dotnet/wcf -->
<PackageReference Include="System.ServiceModel.Duplex" Version="4.7.0-preview1.final" />
<PackageReference Include="System.ServiceModel.Http" Version="4.7.0-preview1.final" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<ProjectReference Include="..\System.Management.Automation\System.Management.Automation.csproj" />
<ProjectReference Include="..\Microsoft.WSMan.Runtime\Microsoft.WSMan.Runtime.csproj" />
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.7.0-preview2.19523.17" />
</ItemGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
<!-- the Application Insights package -->
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.11.0" />
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="Microsoft.Win32.Registry.AccessControl" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.DirectoryServices" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.Management" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.Security.AccessControl" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.Security.Permissions" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="Microsoft.Win32.Registry.AccessControl" Version="4.7.0-preview2.19523.17" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0-preview2.19523.17" />
<PackageReference Include="System.DirectoryServices" Version="4.7.0-preview2.19523.17" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="4.7.0-preview2.19523.17" />
<PackageReference Include="System.Management" Version="4.7.0-preview2.19523.17" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.0-preview2.19523.17" />
<PackageReference Include="System.Security.AccessControl" Version="4.7.0-preview2.19523.17" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="4.7.0-preview2.19523.17" />
<PackageReference Include="System.Security.Permissions" Version="4.7.0-preview2.19523.17" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0-preview2.19523.17" />
<!-- the following package(s) are from the powershell org -->
<PackageReference Include="Microsoft.Management.Infrastructure" Version="2.0.0-preview.2" />
<PackageReference Include="Microsoft.PowerShell.Native" Version="7.0.0-preview.3" />
Expand Down
4 changes: 2 additions & 2 deletions test/tools/WebListener/WebListener.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.0-preview1.19508.20" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.0-preview2.19528.8" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0-preview2.19523.17" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="System.Security.AccessControl" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.Security.AccessControl" Version="4.7.0-preview2.19523.17" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Management.Infrastructure" Version="1.0.0" />
<PackageReference Include="System.Security.AccessControl" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.Security.Principal.Windows" Version="4.7.0-preview1.19504.10" />
<PackageReference Include="System.Security.AccessControl" Version="4.7.0-preview2.19523.17" />
<PackageReference Include="System.Security.Principal.Windows" Version="4.7.0-preview2.19523.17" />
</ItemGroup>
</Project>