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

File watcher improvements #45131

Merged
merged 5 commits into from
Dec 20, 2024
Merged

Conversation

tmat
Copy link
Member

@tmat tmat commented Nov 26, 2024

Ignore changes to files in output and intermediate output directories, unless they are listed in compiler inputs in the project file (e.g. source files generated to intermediate output directory by msbuild targets).

Ignore changes directories starting with ..

Postprocess changes to correct for misbehaving file system events and file writes using temporary intermediate files.

Add MAUI Blazor test.

Fixes #3282
Fixes #44912
Partially fixes #45183 (the content is not reloaded, but dotnet-watch does not crash).
Fixes #45011

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch untriaged Request triage from a team member labels Nov 26, 2024
Copy link
Contributor

Thanks for your PR, @tmat.
To learn about the PR process and branching schedule of this repo, please take a look at the SDK PR Guide.

@tmat tmat force-pushed the FileWatcherImprovements branch from 39750ca to e469207 Compare December 18, 2024 16:51
@tmat
Copy link
Member Author

tmat commented Dec 18, 2024

@phil-allen-msft ptal

{
return [];
}

// Note:
// It is possible that we could have received multiple changes for a file that should cancel each other (such as Delete + Add),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Add then Delete is generally "nothing happened here". I think Delete then Add is equivalent to "Update". I'm thinking in particular about how something like the Resx code generator might work to product .Designer.cs from .resx, which could be Delete then Add. Does your change reflect DeleteThenAdd => Update? Or is that a not-hittable scenario?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmat tmat merged commit b810aa4 into dotnet:release/9.0.2xx Dec 20, 2024
28 of 31 checks passed
@tmat tmat deleted the FileWatcherImprovements branch December 20, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants