Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,6 @@ void FileChangedCallback(string path, ChangeKind kind)
{
ImmutableInterlocked.Update(ref changedFilesAccumulator, changedFiles => changedFiles.Add(changedFile));
}
else
{
Context.Reporter.Verbose($"Change ignored: {kind} '{path}'.");
}
}

fileChangedCallback = FileChangedCallback;
Expand Down Expand Up @@ -454,6 +450,11 @@ async Task<ImmutableList<ChangedFile>> CaptureChangedFilesSnapshot(ImmutableDict
{
// start next iteration unless shutdown is requested
}
catch (Exception) when ((waitForFileChangeBeforeRestarting = false) == true)
{
// unreachable
throw new InvalidOperationException();
}
finally
{
// stop watching file changes:
Expand Down Expand Up @@ -598,6 +599,7 @@ private async ValueTask WaitForFileChangeBeforeRestarting(FileWatcher fileWatche
return new ChangedFile(new FileItem { FilePath = path, ContainingProjectPaths = [] }, kind);
}

Context.Reporter.Verbose($"Change ignored: {kind} '{path}'.");
return null;
}

Expand Down
Loading
Loading