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 VS Code To Pull Diagnostics #11602

Merged
merged 13 commits into from
Mar 11, 2025
Merged

Conversation

ryzngard
Copy link
Contributor

After a few reports like microsoft/vscode-dotnettools#1746 and microsoft/vscode-dotnettools#1740 diagnostics are causing users some headaches (and a few other issues I can't find)

In VS we avoid this by using pull diagnostics. In VS Code we publish all diagnostics in the workspace. This PR simply makes it so VS Code now also uses pull diagnostics! There are a few caveats to this:

  1. HTML diagnostics aren't supported. As it turns out, they weren't before anyways. VS Code has no way to ask for them in a generic manner. This isn't a regression but I'll call it out
  2. Workspace diagnostics aren't supported (yet). Users may notice that diagnostics aren't reported until a razor file is open. The generated document will still get C# diagnostics through Roslyn workspace diagnostics (I think? Assuming dynamic files aren't filtered...). This matches our VS behavior
  3. This duplicates some code adn tests. VS had it's own pull diagnostics prior to it being in the spec. I think we can merge the two but I'm leaving that out of the scope of this PR.

This will require a PR in VS Code to adapt to the new data sent over our custom LSP method.

@ryzngard ryzngard requested a review from a team as a code owner March 10, 2025 21:31
@ryzngard ryzngard enabled auto-merge (squash) March 11, 2025 00:15
@ryzngard ryzngard merged commit c0bd75d into dotnet:main Mar 11, 2025
12 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Mar 11, 2025
ryzngard added a commit to dotnet/vscode-csharp that referenced this pull request Mar 13, 2025
[View Complete Diff of Changes](https://github.com/dotnet/razor/compare/2798396c3481573aa49f9c792179ebbb5e183dca...c0bd75d99369adcd5a2f7e1f1ac42bee8a3bf619?w=1)
  * Move VS Code To Pull Diagnostics (#11602) (PR: [#11602](dotnet/razor#11602))
  * Upgrade to net9 (#11535) (PR: [#11535](dotnet/razor#11535))
  * Cleanup CompletionTriggerAndCommitCharacters (#11600) (PR: [#11600](dotnet/razor#11600))
  * Add constraints to CaptureParameters method (#11530) (PR: [#11530](dotnet/razor#11530))
  * [main] Update dependencies from dotnet/source-build-reference-packages (#11598) (PR: [#11598](dotnet/razor#11598))
  * [FUSE] Layout mapping (#11567) (PR: [#11567](dotnet/razor#11567))
  * Stop running cohosting tests with and without FUSE (#11592) (PR: [#11592](dotnet/razor#11592))
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