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

WIP: Fix issue simplifying name in speculative context #75255

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

merge conflict

5b44a16
Select commit
Loading
Failed to load commit list.
Draft

WIP: Fix issue simplifying name in speculative context #75255

merge conflict
5b44a16
Select commit
Loading
Failed to load commit list.
Azure Pipelines / roslyn-CI failed Sep 30, 2024 in 35m 44s

Build #20240930.28 had test failures

Details

Tests

  • Failed: 56 (0.00%)
  • Passed: 1,401,435 (98.80%)
  • Other: 16,926 (1.19%)
  • Total: 1,418,417

Annotations

Check failure on line 109 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / roslyn-CI

Build log #L109

The process cannot access the file 'D:\a\_work\1\s\artifacts\log\Release\Build.Server.log' because it is being used by another process.

Check failure on line 120 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / roslyn-CI

Build log #L120

(NETCORE_ENGINEERING_TELEMETRY=Test) Tests failed

Check failure on line 130 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / roslyn-CI

Build log #L130

PowerShell exited with code '1'.

Check failure on line 117 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / roslyn-CI

Build log #L117

(NETCORE_ENGINEERING_TELEMETRY=Test) Tests failed

Check failure on line 1 in Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.ImplementInterface.ImplementInterfaceTests.TestRemoveParenthesesAroundTypeReference1

See this annotation in the file changed.

@azure-pipelines azure-pipelines / roslyn-CI

Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.ImplementInterface.ImplementInterfaceTests.TestRemoveParenthesesAroundTypeReference1

System.InvalidOperationException : Context: Iterative code fix application
content of '/0/Test0.cs' did not match. Diff shown with expected as baseline:
 using System;
 
 interface I
 {
     void Goo(DayOfWeek x = DayOfWeek.Friday);
 }
 
 class C : I
 {
     DayOfWeek DayOfWeek { get; set; }
 
-    public void Goo(DayOfWeek x = DayOfWeek.Friday)
+    public void Goo(DayOfWeek x = System.DayOfWeek.Friday)
     {
         throw new NotImplementedException();
     }
 }
Raw output
   en Microsoft.CodeAnalysis.Testing.DefaultVerifier.Fail(String message) en /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/DefaultVerifier.cs:línea 105
   en Microsoft.CodeAnalysis.Testing.IVerifierExtensions.EqualOrDiff(IVerifier verifier, String expected, String actual, String message) en /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/Extensions/IVerifierExtensions.cs:línea 67
   en Microsoft.CodeAnalysis.Testing.CodeFixTest`1.<VerifyProjectAsync>d__49.MoveNext() en /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:línea 537
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   en Microsoft.CodeAnalysis.Testing.CodeFixTest`1.<VerifyFixAsync>d__48.MoveNext() en /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:línea 515
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   en Microsoft.CodeAnalysis.Testing.CodeFixTest`1.<VerifyFixAsync>d__46.MoveNext() en /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:línea 477
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   en Microsoft.CodeAnalysis.Testing.CodeFixTest`1.<RunImplAsync>d__44.MoveNext() en /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:línea 316
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions.CSharpCodeFixVerifier`2.Test.<RunImplAsync>d__24.MoveNext() en /_/src/Features/DiagnosticsTestUtilities/CodeActions/CSharpCodeFixVerifier`2+Test.cs:línea 90
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   en Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<RunAsync>d__61.MoveNext() en /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:línea 172
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.ImplementInterface.ImplementInterfaceTests.<TestWithAllCodeStyleOptionsOffAsync>d__7.MoveNext() en /_/src/Analyzers/CSharp/Tests/ImplementInterface/ImplementInterfaceTests.cs:línea 66
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.Ha

Check failure on line 1 in Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.ImplementInterface.ImplementInterfaceTests.TestRemoveParenthesesAroundTypeReference1

See this annotation in the file changed.

@azure-pipelines azure-pipelines / roslyn-CI

Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.ImplementInterface.ImplementInterfaceTests.TestRemoveParenthesesAroundTypeReference1

System.InvalidOperationException : Context: Iterative code fix application
content of '/0/Test0.cs' did not match. Diff shown with expected as baseline:
 using System;
 
 interface I
 {
     void Goo(DayOfWeek x = DayOfWeek.Friday);
 }
 
 class C : I
 {
     DayOfWeek DayOfWeek { get; set; }
 
-    public void Goo(DayOfWeek x = DayOfWeek.Friday)
+    public void Goo(DayOfWeek x = System.DayOfWeek.Friday)
     {
         throw new NotImplementedException();
     }
 }
Raw output
   en Microsoft.CodeAnalysis.Testing.DefaultVerifier.Fail(String message) en /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/DefaultVerifier.cs:línea 105
   en Microsoft.CodeAnalysis.Testing.IVerifierExtensions.EqualOrDiff(IVerifier verifier, String expected, String actual, String message) en /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/Extensions/IVerifierExtensions.cs:línea 67
   en Microsoft.CodeAnalysis.Testing.CodeFixTest`1.<VerifyProjectAsync>d__49.MoveNext() en /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:línea 537
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   en Microsoft.CodeAnalysis.Testing.CodeFixTest`1.<VerifyFixAsync>d__48.MoveNext() en /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:línea 515
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   en Microsoft.CodeAnalysis.Testing.CodeFixTest`1.<VerifyFixAsync>d__46.MoveNext() en /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:línea 477
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   en Microsoft.CodeAnalysis.Testing.CodeFixTest`1.<RunImplAsync>d__44.MoveNext() en /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:línea 316
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions.CSharpCodeFixVerifier`2.Test.<RunImplAsync>d__24.MoveNext() en /_/src/Features/DiagnosticsTestUtilities/CodeActions/CSharpCodeFixVerifier`2+Test.cs:línea 90
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   en Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<RunAsync>d__61.MoveNext() en /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:línea 172
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.ImplementInterface.ImplementInterfaceTests.<TestWithAllCodeStyleOptionsOffAsync>d__7.MoveNext() en /_/src/Analyzers/CSharp/Tests/ImplementInterface/ImplementInterfaceTests.cs:línea 66
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.Ha

Check failure on line 1 in Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.ImplementInterface.ImplementInterfaceTests.TestRemoveParenthesesAroundTypeReference1

See this annotation in the file changed.

@azure-pipelines azure-pipelines / roslyn-CI

Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.ImplementInterface.ImplementInterfaceTests.TestRemoveParenthesesAroundTypeReference1

Actual and expected values differ. Expected shown in baseline of diff:
 Option Strict On
 Imports System
 Interface I
     Sub Goo(Optional x As DayOfWeek = DayOfWeek.Monday)
 End Interface
 
 Class C
     Implements I
 
     Property DayOfWeek As DayOfWeek
 
-    Public Sub Goo(Optional x As DayOfWeek = DayOfWeek.Monday) Implements I.Goo
+    Public Sub Goo(Optional x As DayOfWeek = System.DayOfWeek.Monday) Implements I.Goo
         Throw New NotImplementedException()
     End Sub
 End Class
Raw output
   en Xunit.Assert.True(Nullable`1 condition, String userMessage) en /_/src/xunit.assert/Asserts/BooleanAsserts.cs:línea 147
   en Roslyn.Test.Utilities.AssertEx.EqualOrDiff(String expected, String actual, String message) en /_/src/Compilers/Test/Core/Assert/AssertEx.cs:línea 310
   en Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions.AbstractCodeActionOrUserDiagnosticTest_NoEditor.<TestOperationsAsync>d__39.MoveNext() en /_/src/Features/DiagnosticsTestUtilities/CodeActionsLegacy/AbstractCodeActionOrUserDiagnosticTest_NoEditor.cs:línea 652
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions.AbstractCodeActionOrUserDiagnosticTest_NoEditor.<TestActionAsync>d__38.MoveNext() en /_/src/Features/DiagnosticsTestUtilities/CodeActionsLegacy/AbstractCodeActionOrUserDiagnosticTest_NoEditor.cs:línea 609
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions.AbstractCodeActionOrUserDiagnosticTest_NoEditor.<TestAsync>d__34.MoveNext() en /_/src/Features/DiagnosticsTestUtilities/CodeActionsLegacy/AbstractCodeActionOrUserDiagnosticTest_NoEditor.cs:línea 501
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions.AbstractCodeActionOrUserDiagnosticTest_NoEditor.<TestInRegularAndScript1Async>d__32.MoveNext() en /_/src/Features/DiagnosticsTestUtilities/CodeActionsLegacy/AbstractCodeActionOrUserDiagnosticTest_NoEditor.cs:línea 441
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.ImplementInterface.ImplementInterfaceTests.VB$StateMachine_76_TestRemoveParenthesesAroundTypeReference1.MoveNext() en /_/src/Analyzers/VisualBasic/Tests/ImplementInterface/ImplementInterfaceTests.vb:línea 2383
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_0.<<InvokeTestMethodAsync>b__1>d.MoveNext() en /_/src/xunit.execution/Sdk/Frameworks/Runners/TestInvoker.cs:línea 285
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en Xunit.Sdk.ExecutionTimer.<AggregateAsync>d__4.MoveNext() en /_/src/xunit.execution/Sdk/Frameworks/ExecutionTimer.cs:línea 48
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en Xunit.Sdk.ExceptionAggregator.<RunAsync>d__9.MoveNext() en /_/src/xunit.core/Sdk/ExceptionAggregator.cs:línea 90

Check failure on line 1 in Microsoft.CodeAnalysis.Editor.UnitTests.Simplification.TypeNameSimplifierTest.TestVisualBasic_DoNotSimplifyOpenGenericNullable

See this annotation in the file changed.

@azure-pipelines azure-pipelines / roslyn-CI

Microsoft.CodeAnalysis.Editor.UnitTests.Simplification.TypeNameSimplifierTest.TestVisualBasic_DoNotSimplifyOpenGenericNullable

Assert.Equal() Failure: Strings differ
                                  ↓ (pos 72)
Expected: ···"    Dim x = GetType(Nullable(Of ))
     "···
Actual:   ···"    Dim x = GetType(System.Nullable(Of ))"···
                                  ↑ (pos 72)
Raw output
   en Xunit.Assert.Equal(String expected, String actual, Boolean ignoreCase, Boolean ignoreLineEndingDifferences, Boolean ignoreWhiteSpaceDifferences, Boolean ignoreAllWhiteSpace) en /_/src/xunit.assert/Asserts/StringAsserts.cs:línea 402
   en Microsoft.CodeAnalysis.Editor.UnitTests.Simplification.AbstractSimplificationTests.VB$StateMachine_6_AssertCodeEqual.MoveNext() en /_/src/EditorFeatures/Test2/Simplification/AbstractSimplificationTests.vb:línea 129
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en Microsoft.CodeAnalysis.Editor.UnitTests.Simplification.AbstractSimplificationTests.VB$StateMachine_1_TestAsync.MoveNext() en /_/src/EditorFeatures/Test2/Simplification/AbstractSimplificationTests.vb:línea 23
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en Microsoft.CodeAnalysis.Editor.UnitTests.Simplification.TypeNameSimplifierTest.VB$StateMachine_117_TestVisualBasic_DoNotSimplifyOpenGenericNullable.MoveNext() en /_/src/EditorFeatures/Test2/Simplification/TypeNameSimplifierTest.vb:línea 5012
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_0.<<InvokeTestMethodAsync>b__1>d.MoveNext() en /_/src/xunit.execution/Sdk/Frameworks/Runners/TestInvoker.cs:línea 285
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en Xunit.Sdk.ExecutionTimer.<AggregateAsync>d__4.MoveNext() en /_/src/xunit.execution/Sdk/Frameworks/ExecutionTimer.cs:línea 48
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
   en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   en Xunit.Sdk.ExceptionAggregator.<RunAsync>d__9.MoveNext() en /_/src/xunit.core/Sdk/ExceptionAggregator.cs:línea 90