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

Fix for directory remove/move/rename #3829

Merged
merged 4 commits into from
Jun 6, 2020

Conversation

savpek
Copy link
Contributor

@savpek savpek commented Jun 5, 2020

VSCode file watcher has limitation where it doesn't notify any removed files if folder is removed/moved/renamed (microsoft/vscode#90746).

What happens is VSCode don't notify about removed file but send new one in another location in cases like directory rename. This causes duplicate documents on workspace -> cannot build because of duplicate types etc. Only way to currently fix this is restart which occurs fairly often if you refactor folders around.

Because file watcher doesn't support notifying removed files but it supports notifying about removed files i added new endpoint parameter at omnisharp-roslyn side to notify about removed folder -> omnisharp-roslyn can remove matching documents from folder at it's workspace.

PR at omnisharp-roslyn side OmniSharp/omnisharp-roslyn#1821

Before after rename/move/delete directory operation at vscode:
image

After these fixes:
image

@savpek
Copy link
Contributor Author

savpek commented Jun 5, 2020

Ready for review @filipw @JoeRobich @david-driscoll

@savpek savpek marked this pull request as ready for review June 5, 2020 15:59
Copy link
Member

@JoeRobich JoeRobich left a comment

Choose a reason for hiding this comment

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

LGTM

@JoeRobich JoeRobich merged commit 7e8bd2b into dotnet:master Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants