[Cohost] Consider supporting workspace diagnostics
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
In the past Razor has never supported workspace diagnostics, or closed file diagnostics. I don't know if there was a good reason for this, but under cohosting and with FUSE, it seems to me like there certainly isn't one now.
There are two basic ways we can handle this:
* Razor can support `workspace/diagnostic` LSP requests
* We would want to improve our diagnostics handling in this case, to take advantage of ResultId etc. to cache properly
* We could let Roslyn report diagnostics for Razor generated files when doing Full Solution Analysis
* We'd need to modify Roslyn to hook up span mapping, or use the line directives to do this
* This would make it optional, based on the anaylsis scope settings that Roslyn already has
* This would only report C# errors, but given those are the only ones that can break the build, that might be okay
Contributor guide
Research direction
No files, tests, or entry points are named. Start by tracing Razor diagnostics handling and the workspace/diagnostic LSP request path, then compare that approach with Roslyn reporting diagnostics for generated Razor files and span mapping. Done requires choosing and implementing one approach with a defined result for workspace or closed-file diagnostics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100