From fbf161c294026f576f3f73ee97278e299cc09153 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 4 Nov 2025 17:19:59 +0000 Subject: [PATCH 01/11] Update dependencies from https://github.com/dotnet/roslyn build 20250915.8 On relative base path root Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset From Version 4.12.0-3.25467.18 -> To Version 4.14.0-3.25465.8 Microsoft.CodeAnalysis.Analyzers From Version 3.11.0-beta1.25173.3 -> To Version 3.12.0-beta1.25465.8 --- eng/Version.Details.xml | 22 +++++++++++----------- eng/Versions.props | 8 ++++---- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index fb2c40fedf6190..52e5a4c3797b28 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -360,30 +360,30 @@ https://github.com/dotnet/runtime-assets 7ace84ca21dc53ca1e9c5d6f6d02b8245461eabf - + https://github.com/dotnet/roslyn - dcf9af2b54e4469b94697b1b92d31354ce698f66 + b0a9adbf61d6fb6ef4e53e09555fa6b6f189fcef - + https://github.com/dotnet/roslyn - dcf9af2b54e4469b94697b1b92d31354ce698f66 + b0a9adbf61d6fb6ef4e53e09555fa6b6f189fcef - + https://github.com/dotnet/roslyn - dcf9af2b54e4469b94697b1b92d31354ce698f66 + b0a9adbf61d6fb6ef4e53e09555fa6b6f189fcef - - https://github.com/dotnet/roslyn-analyzers - 16865ea61910500f1022ad2b96c499e5df02c228 + + https://github.com/dotnet/roslyn + b0a9adbf61d6fb6ef4e53e09555fa6b6f189fcef https://github.com/dotnet/roslyn-analyzers 16865ea61910500f1022ad2b96c499e5df02c228 - + https://github.com/dotnet/roslyn - dcf9af2b54e4469b94697b1b92d31354ce698f66 + b0a9adbf61d6fb6ef4e53e09555fa6b6f189fcef diff --git a/eng/Versions.props b/eng/Versions.props index aced2bc9461ac4..86866d61971c08 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,7 +36,7 @@ - 3.11.0-beta1.25173.3 + 3.12.0-beta1.25465.8 9.0.0-preview.25173.3 - 4.12.0-3.25467.18 - 4.12.0-3.25467.18 - 4.12.0-3.25467.18 + 4.14.0-3.25465.8 + 4.14.0-3.25465.8 + 4.14.0-3.25465.8 --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sbomer <787361+sbomer@users.noreply.github.com> --- .../src/System/Text/Json/Document/JsonDocument.MetadataDb.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.MetadataDb.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.MetadataDb.cs index dca61c889c89d8..20cdf3775c0a43 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.MetadataDb.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.MetadataDb.cs @@ -381,7 +381,7 @@ internal MetadataDb CopySegment(int startIndex, int endIndex) byte[] newDatabase = new byte[length]; _data.AsSpan(startIndex, length).CopyTo(newDatabase); - Span newDbInts = MemoryMarshal.Cast(newDatabase); + Span newDbInts = MemoryMarshal.Cast(newDatabase.AsSpan()); int locationOffset = newDbInts[0]; // Need to nudge one forward to account for the hidden quote on the string. From 46bb931fe20e5c673a48e1f9aabf01d259bf2a84 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Mon, 10 Nov 2025 15:07:12 -0500 Subject: [PATCH 03/11] Fix conversion error --- .../System.Runtime.Numerics/src/System/Numerics/BigInteger.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs b/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs index e173705da39c47..dced09c94df283 100644 --- a/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs +++ b/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs @@ -384,7 +384,7 @@ public BigInteger(ReadOnlySpan value, bool isUnsigned = false, bool isBigE // The bytes parameter is in little-endian byte order. // We can just copy the bytes directly into the uint array. - value.Slice(0, wholeUInt32Count * 4).CopyTo(MemoryMarshal.AsBytes(val)); + value.Slice(0, wholeUInt32Count * 4).CopyTo(MemoryMarshal.AsBytes(val.AsSpan())); } // In both of the above cases on big-endian architecture, we need to perform From fd0957e8dd2e62ebe202811c08c55ec1da67b661 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 11 Nov 2025 02:02:35 +0000 Subject: [PATCH 04/11] Update dependencies from https://github.com/dotnet/roslyn build 20251110.12 On relative base path root Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset From Version 4.12.0-3.25467.18 -> To Version 4.14.0-3.25560.12 Microsoft.CodeAnalysis.Analyzers From Version 3.11.0-beta1.25173.3 -> To Version 3.12.0-beta1.25560.12 --- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 52e5a4c3797b28..068d5d15ffd281 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -360,30 +360,30 @@ https://github.com/dotnet/runtime-assets 7ace84ca21dc53ca1e9c5d6f6d02b8245461eabf - + https://github.com/dotnet/roslyn - b0a9adbf61d6fb6ef4e53e09555fa6b6f189fcef + 27eff4aab1ec7f7c9e15efcc65b02937023f9b34 - + https://github.com/dotnet/roslyn - b0a9adbf61d6fb6ef4e53e09555fa6b6f189fcef + 27eff4aab1ec7f7c9e15efcc65b02937023f9b34 - + https://github.com/dotnet/roslyn - b0a9adbf61d6fb6ef4e53e09555fa6b6f189fcef + 27eff4aab1ec7f7c9e15efcc65b02937023f9b34 - + https://github.com/dotnet/roslyn - b0a9adbf61d6fb6ef4e53e09555fa6b6f189fcef + 27eff4aab1ec7f7c9e15efcc65b02937023f9b34 https://github.com/dotnet/roslyn-analyzers 16865ea61910500f1022ad2b96c499e5df02c228 - + https://github.com/dotnet/roslyn - b0a9adbf61d6fb6ef4e53e09555fa6b6f189fcef + 27eff4aab1ec7f7c9e15efcc65b02937023f9b34 diff --git a/eng/Versions.props b/eng/Versions.props index 86866d61971c08..3f3e0b05fd8838 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,7 +36,7 @@ - 3.12.0-beta1.25465.8 + 3.12.0-beta1.25560.12 9.0.0-preview.25173.3 - 4.14.0-3.25465.8 - 4.14.0-3.25465.8 - 4.14.0-3.25465.8 + 4.14.0-3.25560.12 + 4.14.0-3.25560.12 + 4.14.0-3.25560.12 --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sbomer <787361+sbomer@users.noreply.github.com> --- .../src/System/Net/Http/Headers/HttpHeaders.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaders.cs b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaders.cs index 03b5934ea38dc1..905250e96a05bd 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaders.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaders.cs @@ -1205,8 +1205,8 @@ internal static int GetStoreValuesIntoStringArray(HeaderDescriptor descriptor, o } int currentIndex = 0; - ReadStoreValues(values, info.ParsedAndInvalidValues, descriptor.Parser, ref currentIndex); - ReadStoreValues(values, info.RawValue, null, ref currentIndex); + ReadStoreValues(values.AsSpan(), info.ParsedAndInvalidValues, descriptor.Parser, ref currentIndex); + ReadStoreValues(values.AsSpan(), info.RawValue, null, ref currentIndex); Debug.Assert(currentIndex == length); return length; From 985324a044ef9ff467af6e57c9109251dc5eea44 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Sat, 2 Nov 2024 09:49:32 +0200 Subject: [PATCH 07/11] Cherry-pick dotnet/roslyn update from .NET 10 Commit message of the cherry-picked commit (note this branch now references newer versions): Update Roslyn to 4.13.0-1.24510.9 (#109467) * Update Roslyn to 4.13.0-1.24510.9 * Update roslyn-analyzers * Fix first-class Span breaks * Remove LangVersion=latest * Fixup more places * Updates and fixes --------- Co-authored-by: Jan Jones --- .../TestCasesRunner/AssemblyChecker.cs | 2 +- .../DependencyInjectionSpecificationTests.cs | 2 +- .../tests/StringValuesTests.cs | 30 +++++++------- .../tests/ImmutableStackTest.cs | 2 +- .../tests/ListDictionaryTests.cs | 4 +- .../Generic/Queue/Queue.Generic.Tests.cs | 1 - .../Generic/Stack/Stack.Generic.Tests.cs | 2 +- .../Composition/CompositionErrorTests.cs | 2 +- .../TraceListenerClassTests.cs | 2 +- .../System.Memory/tests/Memory/CopyTo.cs | 2 +- .../tests/ReadOnlySpan/CopyTo.cs | 2 +- .../System.Memory/tests/Span/CopyTo.cs | 2 +- .../System/Net/Http/Headers/HttpHeaders.cs | 6 +-- .../tests/TensorTests.cs | 40 +++++++++---------- .../System.Diagnostics.Debug.Tests.csproj | 1 + .../System/Globalization/GraphemeBreakTest.cs | 2 +- .../CompilerServices/RuntimeHelpersTests.cs | 11 +++-- 17 files changed, 59 insertions(+), 54 deletions(-) diff --git a/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/AssemblyChecker.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/AssemblyChecker.cs index bbe9184c4d7817..c62434f172dd2f 100644 --- a/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/AssemblyChecker.cs +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/AssemblyChecker.cs @@ -977,7 +977,7 @@ private IEnumerable VerifyReferences (AssemblyDefinition original, Assem .Select (name => name.Name) .ToArray (); - if (!actual.SequenceEqual(expected)) + if (!actual!.SequenceEqual(expected)) yield return $"Expected references do not match actual references:\n\tExpected: {string.Join(", ", expected)}\n\tActual: {string.Join(", ", actual)}"; } diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/DependencyInjectionSpecificationTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/DependencyInjectionSpecificationTests.cs index dd910d35e102e8..46381662e03d02 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/DependencyInjectionSpecificationTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/DependencyInjectionSpecificationTests.cs @@ -900,7 +900,7 @@ public void DisposesInReverseOrderOfCreation() // Assert Assert.Equal(outer, callback.Disposed[0]); - Assert.Equal(multipleServices.Reverse(), callback.Disposed.Skip(1).Take(3).OfType()); + Assert.Equal(Enumerable.Reverse(multipleServices), callback.Disposed.Skip(1).Take(3).OfType()); Assert.Equal(outer.SingleService, callback.Disposed[4]); } diff --git a/src/libraries/Microsoft.Extensions.Primitives/tests/StringValuesTests.cs b/src/libraries/Microsoft.Extensions.Primitives/tests/StringValuesTests.cs index 5a0a0719ccc574..6cb9cb3c808491 100644 --- a/src/libraries/Microsoft.Extensions.Primitives/tests/StringValuesTests.cs +++ b/src/libraries/Microsoft.Extensions.Primitives/tests/StringValuesTests.cs @@ -453,19 +453,19 @@ public void DefaultNullOrEmpty_Concat(StringValues stringValues) { string[] expected = new[] { "abc", "bcd", "foo" }; StringValues expectedStringValues = new StringValues(expected); - Assert.Equal(expected, StringValues.Concat(stringValues, expectedStringValues)); - Assert.Equal(expected, StringValues.Concat(expectedStringValues, stringValues)); - Assert.Equal(expected, StringValues.Concat((string)null, in expectedStringValues)); - Assert.Equal(expected, StringValues.Concat(in expectedStringValues, (string)null)); + Assert.Equal(expected, StringValues.Concat(stringValues, expectedStringValues).ToArray()); + Assert.Equal(expected, StringValues.Concat(expectedStringValues, stringValues).ToArray()); + Assert.Equal(expected, StringValues.Concat((string)null, in expectedStringValues).ToArray()); + Assert.Equal(expected, StringValues.Concat(in expectedStringValues, (string)null).ToArray()); string[] empty = new string[0]; StringValues emptyStringValues = new StringValues(empty); - Assert.Equal(empty, StringValues.Concat(stringValues, StringValues.Empty)); - Assert.Equal(empty, StringValues.Concat(StringValues.Empty, stringValues)); - Assert.Equal(empty, StringValues.Concat(stringValues, new StringValues())); - Assert.Equal(empty, StringValues.Concat(new StringValues(), stringValues)); - Assert.Equal(empty, StringValues.Concat((string)null, in emptyStringValues)); - Assert.Equal(empty, StringValues.Concat(in emptyStringValues, (string)null)); + Assert.Equal(empty, StringValues.Concat(stringValues, StringValues.Empty).ToArray()); + Assert.Equal(empty, StringValues.Concat(StringValues.Empty, stringValues).ToArray()); + Assert.Equal(empty, StringValues.Concat(stringValues, new StringValues()).ToArray()); + Assert.Equal(empty, StringValues.Concat(new StringValues(), stringValues).ToArray()); + Assert.Equal(empty, StringValues.Concat((string)null, in emptyStringValues).ToArray()); + Assert.Equal(empty, StringValues.Concat(in emptyStringValues, (string)null).ToArray()); } [Theory] @@ -475,24 +475,24 @@ public void Concat(StringValues stringValues, string[] array) string[] filled = new[] { "abc", "bcd", "foo" }; string[] expectedPrepended = array.Concat(filled).ToArray(); - Assert.Equal(expectedPrepended, StringValues.Concat(stringValues, new StringValues(filled))); + Assert.Equal(expectedPrepended, StringValues.Concat(stringValues, new StringValues(filled)).ToArray()); string[] expectedAppended = filled.Concat(array).ToArray(); - Assert.Equal(expectedAppended, StringValues.Concat(new StringValues(filled), stringValues)); + Assert.Equal(expectedAppended, StringValues.Concat(new StringValues(filled), stringValues).ToArray()); StringValues values = stringValues; foreach (string s in filled) { values = StringValues.Concat(in values, s); } - Assert.Equal(expectedPrepended, values); + Assert.Equal(expectedPrepended, (string[])values); values = stringValues; - foreach (string s in filled.Reverse()) + foreach (string s in Enumerable.Reverse(filled)) { values = StringValues.Concat(s, in values); } - Assert.Equal(expectedAppended, values); + Assert.Equal(expectedAppended, (string[])values); } [Fact] diff --git a/src/libraries/System.Collections.Immutable/tests/ImmutableStackTest.cs b/src/libraries/System.Collections.Immutable/tests/ImmutableStackTest.cs index 4abd031ed43b2d..397990ee494971 100644 --- a/src/libraries/System.Collections.Immutable/tests/ImmutableStackTest.cs +++ b/src/libraries/System.Collections.Immutable/tests/ImmutableStackTest.cs @@ -305,7 +305,7 @@ public void PeekRef_Empty() protected override IEnumerable GetEnumerableOf(params T[] contents) { ImmutableStack stack = ImmutableStack.Empty; - foreach (T value in contents.Reverse()) + foreach (T value in Enumerable.Reverse(contents)) { stack = stack.Push(value); } diff --git a/src/libraries/System.Collections.Specialized/tests/ListDictionaryTests.cs b/src/libraries/System.Collections.Specialized/tests/ListDictionaryTests.cs index e1e2d9da040da8..abbecf3bd18c1c 100644 --- a/src/libraries/System.Collections.Specialized/tests/ListDictionaryTests.cs +++ b/src/libraries/System.Collections.Specialized/tests/ListDictionaryTests.cs @@ -137,7 +137,7 @@ public static void Set_CustomComparerTest() int visited = s_dictionaryData.Length; - Assert.All(s_dictionaryData.Reverse(), element => + Assert.All(Enumerable.Reverse(s_dictionaryData), element => { string newValue = "new" + element.Value; Assert.True(ld.Contains(element.Key)); @@ -154,7 +154,7 @@ public static void Remove_CustomComparerTest() ObservableStringComparer comparer = new ObservableStringComparer(); ListDictionary ld = Fill(new ListDictionary(comparer), s_dictionaryData); - Assert.All(s_dictionaryData.Reverse(), element => + Assert.All(Enumerable.Reverse(s_dictionaryData), element => { int originalSize = ld.Count; Assert.True(ld.Contains(element.Key)); diff --git a/src/libraries/System.Collections/tests/Generic/Queue/Queue.Generic.Tests.cs b/src/libraries/System.Collections/tests/Generic/Queue/Queue.Generic.Tests.cs index 7c900d4c6ef325..e5adef0e878d7a 100644 --- a/src/libraries/System.Collections/tests/Generic/Queue/Queue.Generic.Tests.cs +++ b/src/libraries/System.Collections/tests/Generic/Queue/Queue.Generic.Tests.cs @@ -181,7 +181,6 @@ public void Queue_Generic_ToArray_NonWrappedQueue(int count) Queue collection = new Queue(count + 1); AddToCollection(collection, count); T[] elements = collection.ToArray(); - elements.Reverse(); Assert.True(Enumerable.SequenceEqual(elements, collection.ToArray())); } diff --git a/src/libraries/System.Collections/tests/Generic/Stack/Stack.Generic.Tests.cs b/src/libraries/System.Collections/tests/Generic/Stack/Stack.Generic.Tests.cs index a3e04713f1d6aa..8c032eff8f7deb 100644 --- a/src/libraries/System.Collections/tests/Generic/Stack/Stack.Generic.Tests.cs +++ b/src/libraries/System.Collections/tests/Generic/Stack/Stack.Generic.Tests.cs @@ -80,7 +80,7 @@ public void Stack_Generic_Constructor_IEnumerable(EnumerableType enumerableType, _ = numberOfMatchingElements; IEnumerable enumerable = CreateEnumerable(enumerableType, null, enumerableLength, 0, numberOfDuplicateElements); Stack stack = new Stack(enumerable); - Assert.Equal(enumerable.ToArray().Reverse(), stack.ToArray()); + Assert.Equal(Enumerable.Reverse(enumerable.ToArray()), stack.ToArray()); } [Fact] diff --git a/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionErrorTests.cs b/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionErrorTests.cs index 4dbd14618a3165..0a0b4e7ed09a60 100644 --- a/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionErrorTests.cs +++ b/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionErrorTests.cs @@ -416,7 +416,7 @@ private static CompositionError CreateCompositionError(CompositionErrorId id, st private static CompositionError CreateCompositionError(params string[] messages) { CompositionError error = null; - foreach (string message in messages.Reverse()) + foreach (string message in Enumerable.Reverse(messages)) { CompositionException exception = null; if (error != null) diff --git a/src/libraries/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests/TraceListenerClassTests.cs b/src/libraries/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests/TraceListenerClassTests.cs index a2e60be4859335..095bfac1763b70 100644 --- a/src/libraries/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests/TraceListenerClassTests.cs +++ b/src/libraries/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests/TraceListenerClassTests.cs @@ -358,7 +358,7 @@ public void WriteFooterTest_LogicalOperationStack() listener.Flush(); Assert.Contains("LogicalOperationStack=", listener.Output); - Assert.Contains(string.Join(", ", items.Reverse()), listener.Output); + Assert.Contains(string.Join(", ", Enumerable.Reverse(items)), listener.Output); } finally { diff --git a/src/libraries/System.Memory/tests/Memory/CopyTo.cs b/src/libraries/System.Memory/tests/Memory/CopyTo.cs index 69f9f1fd2a4423..c88fd64d52e5d4 100644 --- a/src/libraries/System.Memory/tests/Memory/CopyTo.cs +++ b/src/libraries/System.Memory/tests/Memory/CopyTo.cs @@ -41,7 +41,7 @@ public static void TryCopyToArraySegmentImplicit() Memory srcMemory = src; bool success = srcMemory.TryCopyTo(segment); Assert.True(success); - Assert.Equal(src, segment); + Assert.Equal(src.AsSpan(), segment); } [Fact] diff --git a/src/libraries/System.Memory/tests/ReadOnlySpan/CopyTo.cs b/src/libraries/System.Memory/tests/ReadOnlySpan/CopyTo.cs index 578f7867ac96ce..0d297485f7a40f 100644 --- a/src/libraries/System.Memory/tests/ReadOnlySpan/CopyTo.cs +++ b/src/libraries/System.Memory/tests/ReadOnlySpan/CopyTo.cs @@ -42,7 +42,7 @@ public static void TryCopyToArraySegmentImplicit() ReadOnlySpan srcSpan = new ReadOnlySpan(src); bool success = srcSpan.TryCopyTo(segment); Assert.True(success); - Assert.Equal(src, segment); + Assert.Equal(src.AsSpan(), segment); } [Fact] diff --git a/src/libraries/System.Memory/tests/Span/CopyTo.cs b/src/libraries/System.Memory/tests/Span/CopyTo.cs index 0e87eea54c61fc..4b10f5d00bdb1e 100644 --- a/src/libraries/System.Memory/tests/Span/CopyTo.cs +++ b/src/libraries/System.Memory/tests/Span/CopyTo.cs @@ -42,7 +42,7 @@ public static void TryCopyToArraySegmentImplicit() Span srcSpan = new Span(src); bool success = srcSpan.TryCopyTo(segment); Assert.True(success); - Assert.Equal(src, segment); + Assert.Equal(src.AsSpan(), segment); } [Fact] diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaders.cs b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaders.cs index 905250e96a05bd..ef8b5f06288463 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaders.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaders.cs @@ -1165,7 +1165,7 @@ internal static void GetStoreValuesAsStringOrStringArray(HeaderDescriptor descri else { Debug.Assert(length > 1, "The header should have been removed when it became empty"); - values = multiValue = new string[length]; + values = (multiValue = new string[length])!; } int currentIndex = 0; @@ -1205,8 +1205,8 @@ internal static int GetStoreValuesIntoStringArray(HeaderDescriptor descriptor, o } int currentIndex = 0; - ReadStoreValues(values.AsSpan(), info.ParsedAndInvalidValues, descriptor.Parser, ref currentIndex); - ReadStoreValues(values.AsSpan(), info.RawValue, null, ref currentIndex); + ReadStoreValues(values!, info.ParsedAndInvalidValues, descriptor.Parser, ref currentIndex); + ReadStoreValues(values!, info.RawValue, null, ref currentIndex); Debug.Assert(currentIndex == length); return length; diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs b/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs index b1ad7a4c2d78cf..357fb4c295f90f 100644 --- a/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs +++ b/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs @@ -684,7 +684,7 @@ public static void TensorMultiplyTests() Tensor t1 = Tensor.Create(Enumerable.Range(0, 3), [3, 1]); Tensor t2 = Tensor.Multiply(t0.AsReadOnlyTensorSpan(), t1); - Assert.Equal([3,3], t2.Lengths.ToArray()); + Assert.Equal([3,3], t2.Lengths); Assert.Equal(0, t2[0, 0]); Assert.Equal(0, t2[0, 1]); Assert.Equal(0, t2[0, 2]); @@ -697,7 +697,7 @@ public static void TensorMultiplyTests() t2 = Tensor.Multiply(t1.AsReadOnlyTensorSpan(), t0); - Assert.Equal([3, 3], t2.Lengths.ToArray()); + Assert.Equal([3, 3], t2.Lengths); Assert.Equal(0, t2[0, 0]); Assert.Equal(0, t2[0, 1]); Assert.Equal(0, t2[0, 2]); @@ -711,7 +711,7 @@ public static void TensorMultiplyTests() t1 = Tensor.Create(Enumerable.Range(0, 9), [3, 3]); t2 = Tensor.Multiply(t0.AsReadOnlyTensorSpan(), t1); - Assert.Equal([3, 3], t2.Lengths.ToArray()); + Assert.Equal([3, 3], t2.Lengths); Assert.Equal(0, t2[0, 0]); Assert.Equal(1, t2[0, 1]); Assert.Equal(4, t2[0, 2]); @@ -729,7 +729,7 @@ public static void TensorBroadcastTests() Tensor t0 = Tensor.Create(Enumerable.Range(0, 3), [1, 3, 1, 1, 1]); Tensor t1 = Tensor.Broadcast(t0, [1, 3, 1, 2, 1]); - Assert.Equal([1, 3, 1, 2, 1], t1.Lengths.ToArray()); + Assert.Equal([1, 3, 1, 2, 1], t1.Lengths); Assert.Equal(0, t1[0, 0, 0, 0, 0]); Assert.Equal(0, t1[0, 0, 0, 1, 0]); @@ -739,7 +739,7 @@ public static void TensorBroadcastTests() Assert.Equal(2, t1[0, 2, 0, 1, 0]); t1 = Tensor.Broadcast(t0, [1, 3, 2, 1, 1]); - Assert.Equal([1, 3, 2, 1, 1], t1.Lengths.ToArray()); + Assert.Equal([1, 3, 2, 1, 1], t1.Lengths); Assert.Equal(0, t1[0, 0, 0, 0, 0]); Assert.Equal(0, t1[0, 0, 1, 0, 0]); @@ -751,7 +751,7 @@ public static void TensorBroadcastTests() t0 = Tensor.Create(Enumerable.Range(0, 3), [1, 3]); t1 = Tensor.Create(Enumerable.Range(0, 3), [3, 1]); var t2 = Tensor.Broadcast(t0, [3, 3]); - Assert.Equal([3, 3], t2.Lengths.ToArray()); + Assert.Equal([3, 3], t2.Lengths); Assert.Equal(0, t2[0, 0]); Assert.Equal(1, t2[0, 1]); @@ -765,7 +765,7 @@ public static void TensorBroadcastTests() t1 = Tensor.Create(Enumerable.Range(0, 3), [3, 1]); t2 = Tensor.Broadcast(t1, [3, 3]); - Assert.Equal([3, 3], t2.Lengths.ToArray()); + Assert.Equal([3, 3], t2.Lengths); Assert.Equal(0, t2[0, 0]); Assert.Equal(0, t2[0, 1]); @@ -789,11 +789,11 @@ public static void TensorBroadcastTests() Assert.Equal(2, s1[2, 2]); var t3 = t2.Slice(0..1, ..); - Assert.Equal([1, 3], t3.Lengths.ToArray()); + Assert.Equal([1, 3], t3.Lengths); t1 = Tensor.Create(Enumerable.Range(0, 3), default); t2 = Tensor.Broadcast(t1, [3, 3]); - Assert.Equal([3, 3], t2.Lengths.ToArray()); + Assert.Equal([3, 3], t2.Lengths); Assert.Equal(0, t2[0, 0]); Assert.Equal(1, t2[0, 1]); @@ -811,15 +811,15 @@ public static void TensorResizeTests() { Tensor t0 = Tensor.Create(Enumerable.Range(0, 8), [2, 2, 2]); var t1 = Tensor.Resize(t0, [1]); - Assert.Equal([1], t1.Lengths.ToArray()); + Assert.Equal([1], t1.Lengths); Assert.Equal(0, t1[0]); t1 = Tensor.Resize(t0, [1, 1]); - Assert.Equal([1, 1], t1.Lengths.ToArray()); + Assert.Equal([1, 1], t1.Lengths); Assert.Equal(0, t1[0, 0]); t1 = Tensor.Resize(t0, [6]); - Assert.Equal([6], t1.Lengths.ToArray()); + Assert.Equal([6], t1.Lengths); Assert.Equal(0, t1[0]); Assert.Equal(1, t1[1]); Assert.Equal(2, t1[2]); @@ -828,7 +828,7 @@ public static void TensorResizeTests() Assert.Equal(5, t1[5]); t1 = Tensor.Resize(t0, [10]); - Assert.Equal([10], t1.Lengths.ToArray()); + Assert.Equal([10], t1.Lengths); Assert.Equal(0, t1[0]); Assert.Equal(1, t1[1]); Assert.Equal(2, t1[2]); @@ -841,7 +841,7 @@ public static void TensorResizeTests() Assert.Equal(0, t1[9]); t1 = Tensor.Resize(t0, [2, 5]); - Assert.Equal([2, 5], t1.Lengths.ToArray()); + Assert.Equal([2, 5], t1.Lengths); Assert.Equal(0, t1[0, 0]); Assert.Equal(1, t1[0, 1]); Assert.Equal(2, t1[0, 2]); @@ -859,8 +859,8 @@ public static void TensorSplitTests() { Tensor t0 = Tensor.Create(Enumerable.Range(0, 8), [2, 2, 2]); var t1 = Tensor.Split(t0, 2, 0); - Assert.Equal([1, 2, 2], t1[0].Lengths.ToArray()); - Assert.Equal([1, 2, 2], t1[1].Lengths.ToArray()); + Assert.Equal([1, 2, 2], t1[0].Lengths); + Assert.Equal([1, 2, 2], t1[1].Lengths); Assert.Equal(0, t1[0][0, 0, 0]); Assert.Equal(1, t1[0][0, 0, 1]); Assert.Equal(2, t1[0][0, 1, 0]); @@ -871,8 +871,8 @@ public static void TensorSplitTests() Assert.Equal(7, t1[1][0, 1, 1]); t1 = Tensor.Split(t0, 2, 1); - Assert.Equal([2, 1, 2], t1[0].Lengths.ToArray()); - Assert.Equal([2, 1, 2], t1[1].Lengths.ToArray()); + Assert.Equal([2, 1, 2], t1[0].Lengths); + Assert.Equal([2, 1, 2], t1[1].Lengths); Assert.Equal(0, t1[0][0, 0, 0]); Assert.Equal(1, t1[0][0, 0, 1]); Assert.Equal(4, t1[0][1, 0, 0]); @@ -883,8 +883,8 @@ public static void TensorSplitTests() Assert.Equal(7, t1[1][1, 0, 1]); t1 = Tensor.Split(t0, 2, 2); - Assert.Equal([2, 2, 1], t1[0].Lengths.ToArray()); - Assert.Equal([2, 2, 1], t1[1].Lengths.ToArray()); + Assert.Equal([2, 2, 1], t1[0].Lengths); + Assert.Equal([2, 2, 1], t1[1].Lengths); Assert.Equal(0, t1[0][0, 0, 0]); Assert.Equal(2, t1[0][0, 1, 0]); Assert.Equal(4, t1[0][1, 0, 0]); diff --git a/src/libraries/System.Runtime/tests/System.Diagnostics.Debug.Tests/System.Diagnostics.Debug.Tests.csproj b/src/libraries/System.Runtime/tests/System.Diagnostics.Debug.Tests/System.Diagnostics.Debug.Tests.csproj index f27284e29a9079..8cd911f50213dc 100644 --- a/src/libraries/System.Runtime/tests/System.Diagnostics.Debug.Tests/System.Diagnostics.Debug.Tests.csproj +++ b/src/libraries/System.Runtime/tests/System.Diagnostics.Debug.Tests/System.Diagnostics.Debug.Tests.csproj @@ -13,6 +13,7 @@ + diff --git a/src/libraries/System.Runtime/tests/System.Globalization.Tests/System/Globalization/GraphemeBreakTest.cs b/src/libraries/System.Runtime/tests/System.Globalization.Tests/System/Globalization/GraphemeBreakTest.cs index c741edd8829661..e7edba854fae70 100644 --- a/src/libraries/System.Runtime/tests/System.Globalization.Tests/System/Globalization/GraphemeBreakTest.cs +++ b/src/libraries/System.Runtime/tests/System.Globalization.Tests/System/Globalization/GraphemeBreakTest.cs @@ -141,7 +141,7 @@ public void VisualBasicReverseString() // Arrange string forwardActual = string.Concat(clusters.SelectMany(cluster => cluster).Select(rune => rune.ToString())); - string reverseExpected = string.Concat(clusters.Reverse().SelectMany(cluster => cluster).Select(rune => rune.ToString())); + string reverseExpected = string.Concat(Enumerable.Reverse(clusters).SelectMany(cluster => cluster).Select(rune => rune.ToString())); // Act diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs index 13ce28e4f233cd..8c9f6ea247c580 100644 --- a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs +++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs @@ -391,10 +391,10 @@ public static void ArrayGetSubArrayTest() Assert.Equal(a, RuntimeHelpers.GetSubArray(a, range)); range = new Range(Index.FromStart(1), Index.FromEnd(5)); - Assert.Equal(new int [] { 2, 3, 4, 5}, RuntimeHelpers.GetSubArray(a, range)); + Assert.Equal(new int[] { 2, 3, 4, 5 }, RuntimeHelpers.GetSubArray(a, range)); range = new Range(Index.FromStart(0), Index.FromStart(a.Length + 1)); - Assert.Throws(() => { int [] array = RuntimeHelpers.GetSubArray(a, range); }); + Assert.Throws(() => { int[] array = RuntimeHelpers.GetSubArray(a, range); }); } [Fact] @@ -454,6 +454,11 @@ private ref struct RefStructWithReferences private ref struct RefStructWithRef { public ref int a; + + internal RefStructWithRef(ref int aVal) + { + a = ref aVal; + } } private ref struct RefStructWithNestedRef @@ -499,7 +504,7 @@ public static unsafe void SizeOf() Assert.Equal(8, RuntimeHelpers.SizeOf(typeof(double).TypeHandle)); Assert.Equal(3, RuntimeHelpers.SizeOf(typeof(Byte3).TypeHandle)); Assert.Equal(nint.Size, RuntimeHelpers.SizeOf(typeof(void*).TypeHandle)); - Assert.Equal(nint.Size, RuntimeHelpers.SizeOf(typeof(delegate* ).TypeHandle)); + Assert.Equal(nint.Size, RuntimeHelpers.SizeOf(typeof(delegate*).TypeHandle)); Assert.Equal(nint.Size, RuntimeHelpers.SizeOf(typeof(int).MakeByRefType().TypeHandle)); Assert.Throws(() => RuntimeHelpers.SizeOf(default)); Assert.ThrowsAny(() => RuntimeHelpers.SizeOf(typeof(List<>).TypeHandle)); From 8f7224bbec5351a7be2224019b6adea3a817d1a2 Mon Sep 17 00:00:00 2001 From: Sven Boemer Date: Thu, 20 Nov 2025 15:36:35 -0800 Subject: [PATCH 08/11] Use Enumerable.Reverse for clarity in PermuteDimensions --- .../src/System/Numerics/Tensors/netcore/TensorExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs index 8c8f02970db525..414e3c55d91f21 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs @@ -2658,7 +2658,7 @@ public static Tensor PermuteDimensions(this Tensor tensor, params ReadO if (dimensions.IsEmpty) { - lengths = tensor._lengths.Reverse().ToArray(); + lengths = Enumerable.Reverse(tensor._lengths).ToArray(); permutation = Enumerable.Range(0, tensor.Rank).Reverse().ToArray(); } else From d3b617afed84d3586a296c8543ef25341c24c2f5 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 21 Nov 2025 02:03:24 +0000 Subject: [PATCH 09/11] Update dependencies from https://github.com/dotnet/roslyn build 20251120.7 On relative base path root Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset From Version 4.12.0-3.25569.8 -> To Version 4.14.0-3.25570.7 Microsoft.CodeAnalysis.Analyzers From Version 3.11.0-beta1.25173.3 -> To Version 3.12.0-beta1.25570.7 --- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index dee79849af6584..4423c3fbb40e8e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -360,30 +360,30 @@ https://github.com/dotnet/runtime-assets 91ea918f8fb26ec1d290283e5c5eeb1b003113da - + https://github.com/dotnet/roslyn - 27eff4aab1ec7f7c9e15efcc65b02937023f9b34 + 8cafac4760a78176ef0e167bea66b97b65437930 - + https://github.com/dotnet/roslyn - 27eff4aab1ec7f7c9e15efcc65b02937023f9b34 + 8cafac4760a78176ef0e167bea66b97b65437930 - + https://github.com/dotnet/roslyn - 27eff4aab1ec7f7c9e15efcc65b02937023f9b34 + 8cafac4760a78176ef0e167bea66b97b65437930 - + https://github.com/dotnet/roslyn - 27eff4aab1ec7f7c9e15efcc65b02937023f9b34 + 8cafac4760a78176ef0e167bea66b97b65437930 https://github.com/dotnet/roslyn-analyzers 16865ea61910500f1022ad2b96c499e5df02c228 - + https://github.com/dotnet/roslyn - 27eff4aab1ec7f7c9e15efcc65b02937023f9b34 + 8cafac4760a78176ef0e167bea66b97b65437930 diff --git a/eng/Versions.props b/eng/Versions.props index 26793143b6b827..597f34b75879c7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,7 +36,7 @@ - 3.12.0-beta1.25560.12 + 3.12.0-beta1.25570.7 9.0.0-preview.25173.3 - 4.14.0-3.25560.12 - 4.14.0-3.25560.12 - 4.14.0-3.25560.12 + 4.14.0-3.25570.7 + 4.14.0-3.25570.7 + 4.14.0-3.25570.7 + + + + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4423c3fbb40e8e..a7e00edcaed052 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -360,17 +360,17 @@ https://github.com/dotnet/runtime-assets 91ea918f8fb26ec1d290283e5c5eeb1b003113da - + https://github.com/dotnet/roslyn - 8cafac4760a78176ef0e167bea66b97b65437930 + 304768b76e90f5d224b745e3a03cfc5e9509baf6 - + https://github.com/dotnet/roslyn - 8cafac4760a78176ef0e167bea66b97b65437930 + 304768b76e90f5d224b745e3a03cfc5e9509baf6 - + https://github.com/dotnet/roslyn - 8cafac4760a78176ef0e167bea66b97b65437930 + 304768b76e90f5d224b745e3a03cfc5e9509baf6 https://github.com/dotnet/roslyn @@ -381,9 +381,9 @@ 16865ea61910500f1022ad2b96c499e5df02c228 - + https://github.com/dotnet/roslyn - 8cafac4760a78176ef0e167bea66b97b65437930 + 304768b76e90f5d224b745e3a03cfc5e9509baf6 diff --git a/eng/Versions.props b/eng/Versions.props index 597f34b75879c7..d377a4815d1f52 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -44,9 +44,9 @@ Any tools that contribute to the design-time experience should use the MicrosoftCodeAnalysisVersion_LatestVS property above to ensure they do not break the local dev experience. --> - 4.14.0-3.25570.7 - 4.14.0-3.25570.7 - 4.14.0-3.25570.7 + 4.14.0-3.25179.1 + 4.14.0-3.25179.1 + 4.14.0-3.25179.1 - + https://github.com/dotnet/roslyn - 304768b76e90f5d224b745e3a03cfc5e9509baf6 + 8cafac4760a78176ef0e167bea66b97b65437930 diff --git a/eng/Versions.props b/eng/Versions.props index d377a4815d1f52..597f34b75879c7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -44,9 +44,9 @@ Any tools that contribute to the design-time experience should use the MicrosoftCodeAnalysisVersion_LatestVS property above to ensure they do not break the local dev experience. --> - 4.14.0-3.25179.1 - 4.14.0-3.25179.1 - 4.14.0-3.25179.1 + 4.14.0-3.25570.7 + 4.14.0-3.25570.7 + 4.14.0-3.25570.7