Skip to content

Conversation

@T-Gro
Copy link
Member

@T-Gro T-Gro commented Nov 18, 2022

The following code did not rename the constructor in " let a = ..." line, because the type and the constructor where considered to be different things in the binary store used for searching (which is consecutively used for renaming).

type MyType() = 
    member x.DoNothing(d:MyType) = ()

let a = MyType()
let b = new MyType()
a.DoNothing(b)

After the change, renaming gets applied correctly across all usages:
image

At the same time, the workflow DSL has been expanded to support:

  • Placement of a cursor (to keep a FsharpSymbolUse record)
  • Finding all references within a file

And the search scenarios within file and across file covered by tests.

@T-Gro T-Gro requested a review from a team as a code owner November 18, 2022 07:28
@T-Gro
Copy link
Member Author

T-Gro commented Nov 18, 2022

Original issue : #13199

@T-Gro T-Gro linked an issue Nov 18, 2022 that may be closed by this pull request
@T-Gro T-Gro added this to the November-2022 milestone Nov 18, 2022
@T-Gro T-Gro self-assigned this Nov 18, 2022
@T-Gro T-Gro requested review from 0101 and vzarytovskii November 18, 2022 07:54
psfinaki
psfinaki previously approved these changes Nov 18, 2022
Copy link
Contributor

@psfinaki psfinaki left a comment

Choose a reason for hiding this comment

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

Useful stuff, thanks!

abonie
abonie previously approved these changes Nov 18, 2022
0101
0101 previously approved these changes Nov 21, 2022
@T-Gro T-Gro dismissed stale reviews from 0101, abonie, and psfinaki via 434d807 November 21, 2022 11:31
@T-Gro T-Gro requested review from 0101, abonie and psfinaki November 21, 2022 11:31
@psfinaki psfinaki merged commit c6350ce into dotnet:main Nov 21, 2022
@T-Gro T-Gro deleted the refactor-rename-doesnt-work-for-constructors branch November 21, 2022 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Refactor Rename doesn't work for simple type rename

5 participants