Skip to content

[dotnet watch] Replace DotNetWatch.targets with ProjectGraph traversal #40214

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

Open
tmat opened this issue Apr 16, 2024 · 0 comments
Open

[dotnet watch] Replace DotNetWatch.targets with ProjectGraph traversal #40214

tmat opened this issue Apr 16, 2024 · 0 comments
Assignees
Milestone

Comments

@tmat
Copy link
Member

tmat commented Apr 16, 2024

Currently we invoke msbuild to evaluate GenerateWatchList target on the root project, which traverses all project dependencies and collects items that are to be watched. The target can be customized by defining CustomCollectWatchItems target. This is currently done by Razor SDK to collect razor and cshtml files.

This approach seems unnecessarily complex as we already create ProjectGraph and traverse it in some scenarios. We could use the evaluation results from the graph to determine watch file list.

The customization is really not very useful as we need to understand what impact a change in each file has on the compilation. We know what the inputs to C#/VB compilation are (compile items and additional items) so we just need to include all of them.

Related: dotnet/aspnetcore#31217

@tmat tmat self-assigned this Apr 16, 2024
@ghost ghost added Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch untriaged Request triage from a team member labels Apr 16, 2024
@tmat tmat added Area-Watch and removed untriaged Request triage from a team member Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch labels Apr 16, 2024
@tmat tmat added this to the Backlog milestone Apr 16, 2024
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

1 participant