diff --git a/eng/dependencies.props b/eng/dependencies.props index d9cd74601f24..accbcb8e5f4e 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,10 +9,10 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - c9274882c2f1e70586d6bffd6edb91833cc41ebd - c9274882c2f1e70586d6bffd6edb91833cc41ebd - 9ac7399739f61f6e5b5a159b000a71006641a751 - 9ac7399739f61f6e5b5a159b000a71006641a751 + 528234f0de15b714b0f439f77285196e6d932cf7 + 528234f0de15b714b0f439f77285196e6d932cf7 + 528234f0de15b714b0f439f77285196e6d932cf7 + 528234f0de15b714b0f439f77285196e6d932cf7 8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd 9004703a1923e5c5582ceb8d79712df777412446 984a541f1d8f243a704fe4074e4b60c6cc3278f7 @@ -30,13 +30,13 @@ - preview.19063.1 - 3.0.0-preview.19063.1 - 3.0.0-preview-27312-01 - 3.0.0-preview-27312-01 - beta-27311-00 - beta-27311-00 - 1.0.0-beta-27311-00 + preview.19064.4 + 3.0.0-preview.19064.4 + 3.0.0-preview-27315-01 + 3.0.0-preview-27315-01 + beta-27315-00 + beta-27315-00 + 1.0.0-beta-27315-00 4.4.0 diff --git a/global.json b/global.json index bffb5fcb9644..9437cacdd56d 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19064.4", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19064.4", - "Microsoft.NET.Sdk.IL": "3.0.0-preview-27312-01" + "Microsoft.NET.Sdk.IL": "3.0.0-preview-27315-01" } } diff --git a/src/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj b/src/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj index ef96fba5a03e..9e4810245cac 100644 --- a/src/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj +++ b/src/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj @@ -38,9 +38,6 @@ - - - diff --git a/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolDocumentWriter.cs b/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolDocumentWriter.cs deleted file mode 100644 index d5b9552e5e39..000000000000 --- a/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolDocumentWriter.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace System.Diagnostics.SymbolStore -{ - public interface ISymbolDocumentWriter - { - void SetCheckSum(System.Guid algorithmId, byte[] checkSum); - void SetSource(byte[] source); - } -} diff --git a/src/System.Memory/src/ApiCompatBaseline.uapaot.txt b/src/System.Memory/src/ApiCompatBaseline.uapaot.txt deleted file mode 100644 index 8695142337c5..000000000000 --- a/src/System.Memory/src/ApiCompatBaseline.uapaot.txt +++ /dev/null @@ -1 +0,0 @@ -TypesMustExist : Type 'System.Buffers.OperationStatus' does not exist in the implementation but it does exist in the contract. \ No newline at end of file diff --git a/src/System.Memory/src/System.Memory.csproj b/src/System.Memory/src/System.Memory.csproj index 55fadc8dc8ae..773dbae2cdb9 100644 --- a/src/System.Memory/src/System.Memory.csproj +++ b/src/System.Memory/src/System.Memory.csproj @@ -13,7 +13,6 @@ - diff --git a/src/System.Memory/src/System/Buffers/OperationStatus.cs b/src/System.Memory/src/System/Buffers/OperationStatus.cs deleted file mode 100644 index e9ddcab57148..000000000000 --- a/src/System.Memory/src/System/Buffers/OperationStatus.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace System.Buffers -{ - /// - /// This enum defines the various potential status that can be returned from Span-based operations - /// that support processing of input contained in multiple discontiguous buffers. - /// - public enum OperationStatus - { - /// - /// The entire input buffer has been processed and the operation is complete. - /// - Done, - /// - /// The input is partially processed, up to what could fit into the destination buffer. - /// The caller can enlarge the destination buffer, slice the buffers appropriately, and retry. - /// - DestinationTooSmall, - /// - /// The input is partially processed, up to the last valid chunk of the input that could be consumed. - /// The caller can stitch the remaining unprocessed input with more data, slice the buffers appropriately, and retry. - /// - NeedMoreData, - /// - /// The input contained invalid bytes which could not be processed. If the input is partially processed, - /// the destination contains the partial result. This guarantees that no additional data appended to the input - /// will make the invalid sequence valid. - /// - InvalidData, - } -} diff --git a/src/System.Runtime/tests/System/TimeSpanTests.cs b/src/System.Runtime/tests/System/TimeSpanTests.cs index 031caf375b58..a81e4a0f3348 100644 --- a/src/System.Runtime/tests/System/TimeSpanTests.cs +++ b/src/System.Runtime/tests/System/TimeSpanTests.cs @@ -538,7 +538,14 @@ public static IEnumerable Parse_Valid_TestData() yield return new object[] { "1:1:1.00001", CultureInfo.InvariantCulture, new TimeSpan(36610000100) }; yield return new object[] { "1:1:1.000001", CultureInfo.InvariantCulture, new TimeSpan(36610000010) }; yield return new object[] { "1:1:1.0000001", CultureInfo.InvariantCulture, new TimeSpan(36610000001) }; - yield return new object[] { "1:1:1.00000001", CultureInfo.InvariantCulture, new TimeSpan(36610000001) }; + + if (PlatformDetection.IsFullFramework) + { + // Full framework can produce some incorrect results in some cases involving leading zeros when + // parsing fraction more than 7 digits. we test the expected full framework results here and we have + // have more net core tests to validate the correct the results. + yield return new object[] { "1:1:1.00000001", CultureInfo.InvariantCulture, new TimeSpan(36610000001) }; + } // DD.HH:MM:SS yield return new object[] { "1.12:24:02", null, new TimeSpan(1, 12, 24, 2, 0) }; @@ -560,7 +567,14 @@ public static IEnumerable Parse_Valid_TestData() yield return new object[] { "1:1:.00001", CultureInfo.InvariantCulture, new TimeSpan(36600000100) }; yield return new object[] { "1:1:.000001", CultureInfo.InvariantCulture, new TimeSpan(36600000010) }; yield return new object[] { "1:1:.0000001", CultureInfo.InvariantCulture, new TimeSpan(36600000001) }; - yield return new object[] { "1:1:.00000001", CultureInfo.InvariantCulture, new TimeSpan(36600000001) }; + + if (PlatformDetection.IsFullFramework) + { + // Full framework can produce some incorrect results in some cases involving leading zeros when + // parsing fraction more than 7 digits. we test the expected full framework results here and we have + // have more net core tests to validate the correct the results. + yield return new object[] { "1:1:.00000001", CultureInfo.InvariantCulture, new TimeSpan(36600000001) }; + } // Just below overflow on various components yield return new object[] { "10675199", null, new TimeSpan(9223371936000000000) }; @@ -625,7 +639,16 @@ public static IEnumerable Parse_Invalid_TestData() // OverflowExceptions yield return new object[] { "1:1:1.99999999", null, typeof(OverflowException) }; // overflowing fraction - yield return new object[] { "1:1:1.000000001", null, typeof(OverflowException) }; // too many leading zeroes in fraction + + if (PlatformDetection.IsFullFramework) + { + // on non full framework we now succeed parsing the fraction .000000001 + // Full framework can produce some incorrect results in some cases involving leading zeros when + // parsing fraction more than 7 digits. we test the expected full framework results here and we have + // have more net core tests to validate the correct the results. + yield return new object[] { "1:1:1.000000001", null, typeof(OverflowException) }; // too many leading zeroes in fraction + } + yield return new object[] { "2147483647", null, typeof(OverflowException) }; // overflowing value == int.MaxValue yield return new object[] { "2147483648", null, typeof(OverflowException) }; // overflowing value == int.MaxValue + 1 yield return new object[] { "10675200", null, typeof(OverflowException) }; // overflowing number of days @@ -809,15 +832,15 @@ public static void ParseExactTest_Invalid(string input, string format, Type exce { Assert.Throws(exceptionType, () => TimeSpan.ParseExact(input, format, new CultureInfo("en-US"))); Assert.Throws(exceptionType, () => TimeSpan.ParseExact(input, format, new CultureInfo("en-US"), TimeSpanStyles.None)); - + Type exceptionTypeMultiple = exceptionType == typeof(OverflowException) || string.IsNullOrEmpty(format) ? typeof(FormatException) : exceptionType; Assert.Throws(exceptionTypeMultiple, () => TimeSpan.ParseExact(input, new string[] { format }, new CultureInfo("en-US"))); Assert.Throws(exceptionTypeMultiple, () => TimeSpan.ParseExact(input, new string[] { format }, new CultureInfo("en-US"), TimeSpanStyles.None)); - + TimeSpan result; Assert.False(TimeSpan.TryParseExact(input, format, new CultureInfo("en-US"), out result)); Assert.Equal(TimeSpan.Zero, result); - + Assert.False(TimeSpan.TryParseExact(input, format, new CultureInfo("en-US"), TimeSpanStyles.None, out result)); Assert.Equal(TimeSpan.Zero, result); diff --git a/src/System.Runtime/tests/System/TimeSpanTests.netcoreapp.cs b/src/System.Runtime/tests/System/TimeSpanTests.netcoreapp.cs index e44e53d33dda..d89791da4521 100644 --- a/src/System.Runtime/tests/System/TimeSpanTests.netcoreapp.cs +++ b/src/System.Runtime/tests/System/TimeSpanTests.netcoreapp.cs @@ -22,6 +22,30 @@ private static IEnumerable MultiplicationTestData() yield return new object[] {TimeSpan.MaxValue, 0.5, TimeSpan.FromTicks((long)(long.MaxValue * 0.5))}; } + // ParseDifferentLengthFractionWithLeadingZerosData mainly testing the behavior we have fixed in net core + // which is the way we normalize the parsed fraction and possibly rounding it. + private static IEnumerable ParseDifferentLengthFractionWithLeadingZerosData() + { + yield return new object[] {"00:00:00.00000001", new TimeSpan(0)}; + yield return new object[] {"00:00:00.00000005", new TimeSpan(1)}; + yield return new object[] {"00:00:00.09999999", new TimeSpan(1_000_000)}; + yield return new object[] {"00:00:00.0268435455", new TimeSpan(268435)}; + yield return new object[] {"00:00:00.01", new TimeSpan(1_00_000)}; + yield return new object[] {"0:00:00.01000000", new TimeSpan(100_000)}; + yield return new object[] {"0:00:00.010000000", new TimeSpan(100_000)}; + yield return new object[] {"0:00:00.0123456", new TimeSpan(123456)}; + yield return new object[] {"0:00:00.00123456", new TimeSpan(12346)}; + yield return new object[] {"0:00:00.00000098", new TimeSpan(10)}; + yield return new object[] {"0:00:00.00000099", new TimeSpan(10)}; + } + + [Theory, MemberData(nameof(ParseDifferentLengthFractionWithLeadingZerosData))] + public static void Multiplication(string input, TimeSpan expected) + { + Assert.Equal(expected, TimeSpan.Parse(input, CultureInfo.InvariantCulture)); + Assert.Equal(expected, TimeSpan.ParseExact(input, "g", CultureInfo.InvariantCulture)); + } + [Theory, MemberData(nameof(MultiplicationTestData))] public static void Multiplication(TimeSpan timeSpan, double factor, TimeSpan expected) { diff --git a/src/System.Threading.Tasks/src/ApiCompatBaseline.netcoreappaot.txt b/src/System.Threading.Tasks/src/ApiCompatBaseline.netcoreappaot.txt deleted file mode 100644 index 7f386254e2c8..000000000000 --- a/src/System.Threading.Tasks/src/ApiCompatBaseline.netcoreappaot.txt +++ /dev/null @@ -1,2 +0,0 @@ -MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.ConfigureAwait(System.Collections.Generic.IAsyncEnumerable, System.Boolean)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.WithCancellation(System.Collections.Generic.IAsyncEnumerable, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract. \ No newline at end of file diff --git a/src/System.Threading.Tasks/src/ApiCompatBaseline.uapaot.txt b/src/System.Threading.Tasks/src/ApiCompatBaseline.uapaot.txt deleted file mode 100644 index 7f386254e2c8..000000000000 --- a/src/System.Threading.Tasks/src/ApiCompatBaseline.uapaot.txt +++ /dev/null @@ -1,2 +0,0 @@ -MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.ConfigureAwait(System.Collections.Generic.IAsyncEnumerable, System.Boolean)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.WithCancellation(System.Collections.Generic.IAsyncEnumerable, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract. \ No newline at end of file diff --git a/src/System.Threading.Tasks/src/System.Threading.Tasks.csproj b/src/System.Threading.Tasks/src/System.Threading.Tasks.csproj index 0bbf9cba8a22..8e90d4ef3146 100644 --- a/src/System.Threading.Tasks/src/System.Threading.Tasks.csproj +++ b/src/System.Threading.Tasks/src/System.Threading.Tasks.csproj @@ -5,9 +5,6 @@ true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreappaot-Windows_NT-Debug;netcoreappaot-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release - - - diff --git a/src/shims/ApiCompatBaseline.uapaot.netstandard20.txt b/src/shims/ApiCompatBaseline.uapaot.netstandard20.txt index c84194d2a7f2..42fed8a03b0e 100644 --- a/src/shims/ApiCompatBaseline.uapaot.netstandard20.txt +++ b/src/shims/ApiCompatBaseline.uapaot.netstandard20.txt @@ -40,7 +40,6 @@ TypesMustExist : Type 'System.Buffers.Binary.BinaryPrimitives' does not exist in TypesMustExist : Type 'System.Buffers.StandardFormat' does not exist in the implementation but it does exist in the contract. TypesMustExist : Type 'System.Buffers.Text.Utf8Formatter' does not exist in the implementation but it does exist in the contract. TypesMustExist : Type 'System.Buffers.Text.Utf8Parser' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Buffers.OperationStatus' does not exist in the implementation but it does exist in the contract. CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.ComponentModel.BackgroundWorker' in the contract but not the implementation. CannotChangeAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' on 'System.Diagnostics.BooleanSwitch' changed from '[SwitchLevelAttribute(typeof(bool))]' in the contract to '[SwitchLevelAttribute(typeof(Boolean))]' in the implementation.