Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Avoid double builds on OSX #3
Thanks for glitch. It's useful.
I noticed that every file save was generating multiple builds. It's most likely due to double events from OSX + Spotlight (howeyc/fsnotify#62). This commit addresses it by testing whether the file's mtime is different, which it isn't under this double event scenario.
The change also fixes a bug in the buildQueued logic. The variable was simply getting set to the most recent hasSuffix() call, which would fail to trigger a build if a non-Go file was modified last. You can see this with: