Make METEOR_WATCH_PRIORITIZE_CHANGED opt-out instead of opt-in. #8866
Conversation
This restores the behavior of 8c70716 by default, with the option of disabling the prioritized file watching system by setting METEOR_WATCH_PRIORITIZE_CHANGED explicitly to "false". The self-tests where the environment variable is explicitly set form a nice to-do list of tests that should be improved to be more robust to cope with differences in file watcher timing. Helps with #8648 and similar issues.
LGTM! (The |
After upgrading to 1.5.1, I started to experience cases like modifications to files not being immediately effective, just like if the previous (cached) version of the modified files are (wrongly) used. That makes the (local) development cumbersome. The good thing is that after setting METEOR_WATCH_PRIORITIZE_CHANGED=false, things appeared to work properly like they've always been until version 1.5. This is just a heads up that the prioritized file watching system may have some problems and not be ready (if so, METEOR_WATCH_PRIORITIZE_CHANGED=false, should be the default, until it's more stable) |
@davidecantini That sounds like this issue, which will be fixed in Meteor 1.5.2. |
benjamn
added a commit
that referenced
this pull request
Aug 11, 2017
Should fix #8988 and #8942. Now that #8866 is the default behavior, it can take up to 5000ms for changes to files modified during the build process to be noticed. Before #8866, when we called e.g. files.writeFile(path), a native file watcher would notice the change immediately, almost always before the build process read the file again. This was definitely racy, but we were getting away with it consistently... until #8866. I was able to reproduce the problem in #8988 by running echo some-local-package-name >> .meteor/packages in an app with a local package of the given name. After debugging the endless rebuild cycle, I found that .meteor/versions was being rewritten by files.writeFile during the build process, but the file watching system was not noticing the change in time to prevent watch.isUpToDate from returning true. The change was finally detected when restarting the Watcher responsible for .meteor/versions, which of course triggered another rebuild, so the same problem kept happening again and again.
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.
This restores the behavior of 8c70716 by default, with the option of disabling the prioritized file watching system by setting
METEOR_WATCH_PRIORITIZE_CHANGED
explicitly to"false"
.The self-tests where the environment variable is explicitly set form a nice to-do list of tests that should be improved to be more robust to cope with differences in file watcher timing.
Helps with #8648 and similar issues.