-
-
Notifications
You must be signed in to change notification settings - Fork 260
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
Extension activates invariant of the workspace #882
Labels
Comments
ProphetLamb
added a commit
to ProphetLamb-Organistion/Roslynator
that referenced
this issue
Mar 1, 2022
@josefpihrt Any chance I could get this reviewed and merged? |
Hi, Yes, sure. I'll take a look. Thanks. |
josefpihrt
pushed a commit
that referenced
this issue
Mar 12, 2022
fixed with #883 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Excerpt from Dependency update is workspace agnostic:
1. without a workspace, or
2. with any non C# workspace.
We expect the C# extension to do nothing.
But what actually happens is:
When working with a rust or js project, this is but a mildly infuriating annoyance, on a Windows machine with dotnet installed.
The real problem arises when working with a Linux system where no dotnet is installed. The C# extension attempts to start, using up an unreasonable amount of CPU time and displaying a very much annoying and inappropriate error message. That it failed to locate the dotnet sdk.
The C# extension is not required in an empty, rust, tex, js or any other non C# workspace and thus should - according to the VSCode extension guidelines not install unrelated software, or even initialize anything at all. That should be delayed until the extension is actually required.
This issue is caused by Roslynator depending on ms-dotnettools.csharp. As can be seen in the extension host log.
To fix this adopt the activation events of the C# extension.
https://github.com/OmniSharp/omnisharp-vscode/blob/65c110a03b0ca2f97a897d71996e46f30f5235bb/package.json#L544-L564
https://github.com/JosefPihrt/Roslynator/blob/942ca0797fd75b69ee520ef3f655f25a1712b36e/src/VisualStudioCode/package/package.json#L37-L39
The text was updated successfully, but these errors were encountered: