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

Undoing a Roslyn rename prompts a rename #5139

Closed
davkean opened this issue Jul 23, 2019 · 14 comments · Fixed by #6179
Closed

Undoing a Roslyn rename prompts a rename #5139

davkean opened this issue Jul 23, 2019 · 14 comments · Fixed by #6179
Assignees
Labels
Regression Regressions from a previous (typically public) build or release. Triage-Investigate Reviewed and investigation needed by dev team
Milestone

Comments

@davkean
Copy link
Member

davkean commented Jul 23, 2019

Steps to Reproduce:

  1. File -> New -> Console App (.NET Core)
  2. Press F2 to rename Program -> NotProgram

-- observe that Program.cs has been renamed to NotProgram.cs --

  1. In same editor, CTRL+Z to undo rename

Expected Behavior:
No prompt to rename

Actual Behavior:
image

User Impact:

@davkean
Copy link
Member Author

davkean commented Jul 23, 2019

/cc @jmarolf @ryzngard

Looks like both your bits arrived in master, and the above is the result.

@jmarolf jmarolf self-assigned this Jul 23, 2019
@jmarolf jmarolf added this to the 16.3 milestone Jul 23, 2019
@jmarolf
Copy link
Contributor

jmarolf commented Aug 19, 2019

@davkean I cannot reproduce this with the repro steps provided. Is there anything else that you did other than what you've suggested?

@jmarolf jmarolf added the Resolution-No-Repro We cannot reproduce the bug. We need more information, clearer repro steps or a sample project. label Aug 19, 2019
@jmarolf jmarolf removed their assignment Aug 22, 2019
@drewnoakes drewnoakes modified the milestones: 16.3, 16.4 Sep 24, 2019
@davkean davkean removed the Resolution-No-Repro We cannot reproduce the bug. We need more information, clearer repro steps or a sample project. label Oct 15, 2019
@davkean
Copy link
Member Author

davkean commented Oct 15, 2019

Here's a video:

cfbce04d-3bcf-41e8-a504-084f6f04949d

@davkean
Copy link
Member Author

davkean commented Oct 15, 2019

This is going to because we conflating "renames" via dataflow with user actions.

@jmarolf
Copy link
Contributor

jmarolf commented Oct 15, 2019

@davkean I cannot reliably repo this today, can you provide consistent repro steps on a build we've release?

@davkean
Copy link
Member Author

davkean commented Oct 15, 2019

I mentioned early on in the rewrite that we shouldn't be using dataflow renames as an indication that the user renamed the class, any setting of ProjectItem.Name should result in this.

@jmarolf
Copy link
Contributor

jmarolf commented Oct 15, 2019

I think I see where I misunderstood @davkean when you said this:

Press F2 to rename Program -> NotProgram

I thought you mean't F2 in the solution explorer, I assume you actually meant F2 on the class definition, which I can repro

@jmarolf
Copy link
Contributor

jmarolf commented Oct 15, 2019

yeah, well need to re-write everything again...

@davkean davkean added Bug Regression Regressions from a previous (typically public) build or release. labels Dec 10, 2019
@davkean davkean modified the milestones: 16.4, 16.5, 16.6 Dec 10, 2019
@davkean davkean added the Triage-Investigate Reviewed and investigation needed by dev team label Dec 10, 2019
@ocallesp ocallesp self-assigned this Feb 7, 2020
@ocallesp
Copy link
Contributor

ocallesp commented Feb 7, 2020

@davkean I will investigate this issue.
This issue is related to https://youtrack.jetbrains.com/issue/RSRP-476479
e-mail thread with subject [EXTERNAL] Bogus 'You are renaming a file...`

@ocallesp ocallesp closed this as completed Feb 7, 2020
@ocallesp ocallesp reopened this Feb 7, 2020
@ocallesp
Copy link
Contributor

@jmarolf @davkean I cannot repro this issue using the steps in the description. Is there any missing step ?

@davkean
Copy link
Member Author

davkean commented Feb 10, 2020

@ocallesp The "Rename File" code fix isn't showing up for me anymore, can you see it? Regardless, this will still occur when any component (such as R#) uses APIs to rename files.

@ryzngard
Copy link
Contributor

This is currently blocking us from enabling this on the Roslyn side, so it shouldn't show up for CPS projects.

@davkean
Copy link
Member Author

davkean commented Feb 10, 2020

Did you remove the code fix? It was enabled at one point.

@ryzngard
Copy link
Contributor

It hasn't been enabled for a long time as far as I'm aware. The PR is here dotnet/roslyn#39225

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Regression Regressions from a previous (typically public) build or release. Triage-Investigate Reviewed and investigation needed by dev team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants