github.com/tilt-dev/tilt@v0.33.15-0.20240515162809-0a22ed45d8a0/internal/watch/watcher_windows.go (about) 1 //go:build windows 2 // +build windows 3 4 package watch 5 6 import ( 7 "github.com/tilt-dev/fsnotify" 8 ) 9 10 // TODO(nick): I think the ideal API would be to automatically increase the 11 // size of the buffer when we exceed capacity. But this gets messy, 12 // because each time we get a short read error, we need to invalidate 13 // everything we know about the currently changed files. So for now, 14 // we just provide a way for people to increase the buffer ourselves. 15 // 16 // It might also pay to be clever about sizing the buffer 17 // relative the number of files in the directory we're watching. 18 func MaybeIncreaseBufferSize(w *fsnotify.Watcher) { 19 w.SetBufferSize(DesiredWindowsBufferSize()) 20 }