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

Disable File Operation Based CodeActions in Liveshare/Codespaces #5210

Closed
TanayParikh opened this issue Aug 21, 2020 · 1 comment · Fixed by #2446
Closed

Disable File Operation Based CodeActions in Liveshare/Codespaces #5210

TanayParikh opened this issue Aug 21, 2020 · 1 comment · Fixed by #2446
Assignees
Milestone

Comments

@TanayParikh
Copy link
Contributor

#2420 (comment)

Ahhh one other note I forgot to mention that can totally be done in a follow up. We'll need to disable the file operation based CodeActions in LiveShare guest/Codespaces scenarios until they make them work. That's because the underlying system will pre-create the file based off the existence of the light bulb. Meaning when a user is typing <abcd> it's super likely LiveShare will create multiple files: a.razor, ab.razor, abc.razor, 'abcd.razor' etc. and destroy users file systems.

This alone may be a difficult problem to handle. Some ideas would be to implement a MiddleLayer (assuming the LSP platform supports them for CodeActions) or somehow utilize the InitializationOptions OR just pass in an extra parameter/service to the Razor language server that's VS aware.

@TanayParikh TanayParikh self-assigned this Aug 21, 2020
@TanayParikh
Copy link
Contributor Author

Discussed with liveshare / LSP platform.

Created: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1179917

ETA: Unknown, but it seems like the change may be a bit more involved than originally thought. May have to patch on our end for now.

@ghost ghost closed this as completed in #2446 Aug 28, 2020
ghost referenced this issue Aug 28, 2020
* Disable File Operation Based CodeActions in Liveshare/Codespaces

Fixes: https://github.com/dotnet/aspnetcore/issues/25128

* LanguageServerFeatureOptions

* PR Feedback
@ghost ghost locked as resolved and limited conversation to collaborators Sep 28, 2020
@ghost ghost unlocked this conversation Oct 9, 2021
@allisonchou allisonchou transferred this issue from dotnet/aspnetcore Oct 9, 2021
@allisonchou allisonchou added this to the 16.8-Preview3 milestone Oct 9, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 8, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants