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

Implement support for pull diagnostic requests on additional files #62781

Open
Tracked by #49001
tmat opened this issue Jul 19, 2022 · 2 comments
Open
Tracked by #49001

Implement support for pull diagnostic requests on additional files #62781

tmat opened this issue Jul 19, 2022 · 2 comments

Comments

@tmat
Copy link
Member

tmat commented Jul 19, 2022

Depends on 1342106, which would enable us to dynamically register arbitrary files with the LSP client.

Once we have this capability we would register all additional files and respond to document pull diagnostics for these files. We would run document analysis (specifically, built-in analyzers such as EnC analyzer) on all source generated files on the request. We would then report all diagnostics that are returned from this analysis. The locations of these diagnostics would be expected to map back to the corresponding additional file via #line directives present in the source generated file.

We may find that the performance of this implementation is not good enough in which case we can optimize by establishing relationship between specific additional files and the corresponding source-generated files and only limiting analysis to the affected files.

This feature would enable diagnostics produced for source-generated files by any analyzer to be reported in additional files for any source generator that produces source code based on the content of additional files.

Specifically, it would address issues with reporting EnC rude edits for XAML files in MAUI apps (see 1577259). It would also allow us to remove custom pull diagnostic forwarding from Razor in future (once it unifies design-time and compile-time files).

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Analyzers untriaged Issues and PRs which have not yet been triaged by a lead labels Jul 19, 2022
@tmat tmat added this to the 17.4 milestone Jul 19, 2022
@tmat
Copy link
Member Author

tmat commented Jul 19, 2022

17.4 for now but will need to be pushed out to 17.5 due to dependency on VS Platform APIs.

@vatsalyaagrawal vatsalyaagrawal added Concept-Continuous Improvement and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Jul 22, 2022
@jasonmalinowski jasonmalinowski modified the milestones: 17.4, Backlog Sep 28, 2022
@tmat tmat modified the milestones: Backlog, 17.5 P2 Oct 13, 2022
@tmat
Copy link
Member Author

tmat commented Oct 13, 2022

The LSP work item is scheduled for 17.5 Preview 2.

@arunchndr arunchndr modified the milestones: 17.5 P2, 17.5 P3 Dec 30, 2022
@arunchndr arunchndr modified the milestones: 17.5 P3, Backlog Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants