-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
cmd/govim: watcher tests fails on macOS #759
Comments
TestScripts/scenario_default/watcher log:
|
In case it's not clear, the bug is that the const.go event is 'Changed', not 'Created'. I don't have access to a Mac at the moment, so this is a shot in the dark: is it possible that the fsevent matches BOTH fChanged and fCreated, here? |
FWIW, I just checked and the event type doesn't currently matter to gopls, so at least for now I believe this bug to be only affecting testing. |
Thanks for taking a look! I'll create a PR later tonight unless someone else beats me to it. |
Darwin has a separate file system watcher, and it might emit events that includes both "Created" and "Changed" flag in the same event. Since the flag "checked" is checked before "created", the darwin implementation will skip to report "created" if both files exist. It looks like it only affects tests at the moment (see comments in #759). This fix alters order so that only "created" is reported if both flags exist. Fixes #759
@findleyr If I understand it correctly, the correct way would be to report |
@leitzler I'm not that familiar with fsevents, but yes in this case I think we should just be sending I'd be curious to know whether it is the |
Had the flag in my scroll back from the quick test, and it looks like it was |
Darwin has a separate file system watcher, and it might emit events that includes both "Created" and "Changed" flag in the same event. Since the flag "checked" is checked before "created", the darwin implementation will skip to report "created" if both files exist. It looks like it only affects tests at the moment (see comments in #759). This fix alters order so that only "created" is reported if both flags exist. Fixes #759
What version of Vim/Gvim are you using?
Vim/Gvim version
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?go env
OutputWhat version/commit of
govim
are you using?Current master, 897d5a4
What did you do?
VIM_FLAVOR=vim go test .
incmd/govim
What did you expect to see?
No failures
What did you see instead?
The text was updated successfully, but these errors were encountered: