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

Move IVsHierarchyRefactorNotify notifications to Roslyn #5436

Closed
3 tasks
davkean opened this issue Sep 5, 2019 · 9 comments
Closed
3 tasks

Move IVsHierarchyRefactorNotify notifications to Roslyn #5436

davkean opened this issue Sep 5, 2019 · 9 comments
Assignees
Labels
Area-External Owned by another feature area and not this repo. Likely be closed in lieu of issue against it. Tracking Tracking a bug against another repo or a larger thematic issue tracking a group of work. Triage-Approved Reviewed and prioritized
Milestone

Comments

@davkean
Copy link
Member

davkean commented Sep 5, 2019

Also fixes: #1422.

We are notifying projects of renames in the workspace in response to a user renaming a file with a type with the same name, whereas legacy uses CodeModel from Roslyn which does it automatically. We do this so that XAML, RESX and other type consuming things can be notified and updated with the new names.

We should unify this logic into a single service and have both us and CodeModel call it, the lines in particular are this: https://github.com/dotnet/roslyn/blob/master/src/VisualStudio/Core/Impl/CodeModel/AbstractCodeModelService.cs#L498-L513.

  • Create a new service in Roslyn that wraps the above lines
  • Change AbstractCodeModelService to call it
  • Provide an API that we can use to consume it
@davkean
Copy link
Member Author

davkean commented Sep 5, 2019

This will also fix #1422 because this code would also dismiss the rename tracking (as you can see it already does in CodeModel).

@davkean davkean added the Bug label Sep 5, 2019
@davkean davkean added this to the 16.4 milestone Sep 5, 2019
@davkean
Copy link
Member Author

davkean commented Sep 5, 2019

@ocallesp This might a nice one to bite off, I can probably walk you through doing it during our 1 on 1.

@drewnoakes
Copy link
Member

in response to a user renaming a class with a type with the same name

Do you mean "in response to a user renaming a class file with a type with the same name"

@davkean
Copy link
Member Author

davkean commented Sep 5, 2019

Yes.

@jmarolf
Copy link
Contributor

jmarolf commented Sep 5, 2019

The reason we didn't do tbis was that the CodeModel service is not cancelable so if a user begins a symbol rename and wants to cancel it they either need to wait or force the process to stop in task manager.

@jmarolf
Copy link
Contributor

jmarolf commented Sep 5, 2019

Roslyn's internal notification service is cancelable (the one they use for inline rename) but it is not exposed anywhere publicly. If you can get the roslyn team to expose some kind of cancelable api I would love to not need this code.

@davkean
Copy link
Member Author

davkean commented Sep 5, 2019

That's what this bug is tracking.

@jmarolf
Copy link
Contributor

jmarolf commented Sep 5, 2019

@davkean got it, just didn't see cancellation called out as the blocker. Thanks for filing this :)

@jmarolf
Copy link
Contributor

jmarolf commented Sep 6, 2019

My hope is that when this is merged: dotnet/roslyn#38488

We could just move all the rename logic over to roslyn itself since they are the real authority on what symbol rename should do. Us needing to re-implement everything like roslyn does is not an ideal long-term solution

@davkean davkean modified the milestones: 16.4, 16.5 Nov 11, 2019
@drewnoakes drewnoakes added Area-External Owned by another feature area and not this repo. Likely be closed in lieu of issue against it. Tracking Tracking a bug against another repo or a larger thematic issue tracking a group of work. Triage-Approved Reviewed and prioritized labels Dec 10, 2019
@ocallesp ocallesp modified the milestones: 16.5, 16.6 Jan 9, 2020
@jjmew jjmew modified the milestones: 16.6, 16.7 Mar 26, 2020
@drewnoakes drewnoakes removed the Bug label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-External Owned by another feature area and not this repo. Likely be closed in lieu of issue against it. Tracking Tracking a bug against another repo or a larger thematic issue tracking a group of work. Triage-Approved Reviewed and prioritized
Projects
None yet
Development

No branches or pull requests

5 participants