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

Interface renaming works weirdly in some edge cases #15399

Open
psfinaki opened this issue Jun 14, 2023 · 7 comments
Open

Interface renaming works weirdly in some edge cases #15399

psfinaki opened this issue Jun 14, 2023 · 7 comments
Assignees
Labels
Area-LangService-RenameSymbol FCS and VS support for renaming symbols Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Tracking-External
Milestone

Comments

@psfinaki
Copy link
Member

WTF:

bug1.mp4

WTF!!!!

bug2.mp4

Code:

type IFoo = abstract member Bar : unit -> unit

type Foo() = interface IFoo with member __.Bar () = ()

let foo = Foo() :> IFoo

One of the weirdest things I have seen in VS. Reproduces only on the last case. VS crash is caused when I try to move the cursor in the renaming window using the mouse.

@vzarytovskii
Copy link
Member

Incremental renaming path (or whatever its called right now) is unstable, it's known.

@psfinaki
Copy link
Member Author

It's just weird it happens only when renaming the interface after the cast. And that it crashes VS every time.

@0101 0101 added Impact-High (Internal MS Team use only) Describes an issue with extreme impact on existing code. Area-LangService-RenameSymbol FCS and VS support for renaming symbols and removed Needs-Triage labels Jun 19, 2023
@0101 0101 self-assigned this Aug 3, 2023
@0101 0101 modified the milestones: Backlog, August-2023 Aug 3, 2023
@0101
Copy link
Contributor

0101 commented Aug 21, 2023

So this isn't related to interfaces, rather to renaming the last symbol in the file. And it also reproduces in C#, so not our fault this time!

@psfinaki
Copy link
Member Author

psfinaki commented Aug 28, 2023

Just wondering - can you post some C# code to get the same behavior? I am curious to reproduce.

@0101
Copy link
Contributor

0101 commented Sep 6, 2023

@psfinaki sure, for example:

var hello = 1;
var x = hello;

Just create a console app and put it at the end of Program.cs. Then try to rename hello.

Top level statements have to be enabled (they are by default) so that you can get the symbol close enough to the end of the document.

@psfinaki
Copy link
Member Author

psfinaki commented Sep 6, 2023

Hah alright, confirmed. Yeah that's quite glaring, thanks :D

@0101
Copy link
Contributor

0101 commented Sep 6, 2023

VS team triaged it. I should be notified when they fix it. Also it's probably not high impact, since renaming the last symbol in file is probably not as common :)

@0101 0101 added Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. and removed Impact-High (Internal MS Team use only) Describes an issue with extreme impact on existing code. labels Sep 6, 2023
@0101 0101 modified the milestones: August-2023, Backlog Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-LangService-RenameSymbol FCS and VS support for renaming symbols Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Tracking-External
Projects
Status: New
Development

No branches or pull requests

3 participants