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

Improves workaround for MacOS file watching quirks #47926

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

tmat
Copy link
Member

@tmat tmat commented Mar 26, 2025

Fixes #47912

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch untriaged Request triage from a team member labels Mar 26, 2025
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.

@Forgind
Copy link
Member

Forgind commented Mar 27, 2025

I think this is a reasonable direction, though I'm also wondering if an alternative might be to try to figure out that a file is a backup and not watch it at all if so. (One option on that front could just be checking for ~ at the end and seeing if the path without that would be a known file)

@tmat
Copy link
Member Author

tmat commented Mar 27, 2025

a file is a backup and not watch it at all if so.

The problem is there is a not a standardized convention for the names of these files. Each editor has their own naming for these files.

@Forgind
Copy link
Member

Forgind commented Mar 28, 2025

a file is a backup and not watch it at all if so.

The problem is there is a not a standardized convention for the names of these files. Each editor has their own naming for these files.

Yeah; it'd be a heuristic for sure. I've just noticed ending in ~ seems to be a pretty common convention (notably on linux/mac)

@Forgind Forgind removed the untriaged Request triage from a team member label Mar 28, 2025
@angularsen
Copy link

angularsen commented Mar 28, 2025

From a bit of googling, it does seem like ~ is widely used for temp files.

I think it could be wise to not watch these by default, until it becomes more easily configurable what files to include/exclude in watch, which if I'm reading right is tracked by #45539.

@tmat tmat merged commit d02e720 into dotnet:release/9.0.3xx Mar 28, 2025
34 checks passed
@tmat tmat deleted the FixChangePostprocessing branch March 28, 2025 14:49
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants