-
Notifications
You must be signed in to change notification settings - Fork 184
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
Merge upstream #112
Open
2shortplanks
wants to merge
13
commits into
radovskyb:master
Choose a base branch
from
circleci:mark/fix-race
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Merge upstream #112
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ScanNow() causes the file watch loop to run once, and ensures all events have been posted before returning. It allows the caller to "synchronize" with the pending watcher events, so is useful for batch updating after it is known file events have probably occurred.
On some file systems, multiple changes to the same file within the file system's mod time resolution would be missed. This issue can be ameliorated by triggering `Write` events if a size change is detected, even if no corresponding mod time change occurs. Changes to the file content without a change to the size or mod time will still go unnoticed.
sometimes when a file/dir which is being watched is deleted a panic will occur. This appears to be because the is an assumption that if an error returns true for `IsNotExist()` that it should be castable to `os.PathError`, but this evidently is not always the case, causing a panic.
added ScanNow()
fix panic when file/dir is deleted
skip ignored files before callbacks
Preassign map size
Watcher now emits `Write` event for size only change
adding go.mod file
When we close while waiting for the next periodic re-roll or ScanNow we previously would allow the loop to execute one last time, start a rescan, and then exit the Start() function when we got a <-w.close. However, when this happens and there's a changed files there's a 50% for each file we'll choose to process the <-evt file event first before the <-w.close! This is a huge problem if it's no longer safe to do so. This change simply exits the Start function (safely, closing all the channels as before) as soon as we receive a <-w.close
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This brings in work from pull request from our local fork, passed back upstream.
Since nothing else has been merged upstream I'm not expecting this to either, but I'm doing this so that people can at least see what changes we've made.