dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.96k stars 4.03k forks source link

Change signature may not update all overrides #71550

Open tmat opened 9 months ago

tmat commented 9 months ago

Checkout dotnet/roslyn at https://github.com/dotnet/roslyn/commit/3157d163e3b30b2e0cdbbec3c65bcbd139145651. Open src\EditorFeatures\DiagnosticsTestUtilities\CodeActions\AbstractCodeActionTest.cs and use Change Signature refactoring to remove workspace parameter from

protected abstract CodeRefactoringProvider CreateCodeRefactoringProvider(EditorTestWorkspace workspace, TestParameters parameters);

Apply the change and build the solution.

The build fails because some types were not updated:

\src\Features\VisualBasicTest\AddAwait\AddAwaitTests.vb(15,38): error BC30284: function 'CreateCodeRefactoringProvider' cannot be declared 'Overrides' because it does not override a function in a base class.

The build should only fail due to the workspace parameter being used in a few overrides.

CyrusNajmabadi commented 9 months ago

This is very likely due to multiple TFMs, and the usage of linked files across different projects in funky ways. Traditionally we've done terribly here, and there hasn't been enough time/resources to try to make these scenarios work out.