Skip to content

Conversation

CyrusNajmabadi
Copy link
Member

No description provided.

@@ -142,8 +142,7 @@ Namespace Microsoft.CodeAnalysis.Editor.UnitTests.Rename
' marshaled back.

Return Renamer.RenameSymbolAsync(
solution, symbol, renameTo, renameOptions,
nonConflictSymbolKeys:=Nothing, CancellationToken.None).GetAwaiter().GetResult()
solution, symbol, renameTo, renameOptions, CancellationToken.None).GetAwaiter().GetResult()
Copy link
Member Author

Choose a reason for hiding this comment

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

As part of this, use-auto-prop is no longer going through the 'rename' codepaths itself. That is because the space of what is needs to rename is so narrow that there isn't much benefit here, and because we used to have to hack up the rename engine itself to support the somewhat strange scenario that Use-Auto-Prop is following. Specifically, 'use auto prop' renames a field (with name 'f') to match the name of a property 'P'. This is, definitionally, a conflict. So we hacked up the rename engine to let the caller tell it to ignore that.

We no longer need this capability, so all that threading through of these values is gone.

CancellationToken cancellationToken)
{
var solutionEditor = new SolutionEditor(solution);

Copy link
Member Author

Choose a reason for hiding this comment

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

use-auto-prop now owns its rewriting strategy. so it can tweak it as appropriate. In this case, this all revolves around if it will have or not have this. when updating a simple name F to P.

@CyrusNajmabadi CyrusNajmabadi force-pushed the useAutoPropResolution branch from 5a5cbf9 to f75dade Compare July 16, 2025 18:26
@dibarbet
Copy link
Member

/azp run roslyn-CI

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@CyrusNajmabadi CyrusNajmabadi enabled auto-merge July 16, 2025 22:41
@CyrusNajmabadi CyrusNajmabadi merged commit 06f095f into dotnet:main Jul 17, 2025
21 of 25 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the useAutoPropResolution branch July 17, 2025 04:26
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jul 17, 2025
@RikkiGibson RikkiGibson modified the milestones: Next, 18.0 P1 Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants