Instead, increase polling interval for that file/dir to 500ms from 5s.
Fixes#3336.
The most common case where this was occuring is when you're on Linux and
your inotify max_user_watches is too low. A wiki page will explain how
to increase this. In debug mode, a message will tell you to go to the
wiki page if you hit the limit (we may later expose this message by
default, but it is part of the new user experience).
This will be useful when we want to be smart with windows file paths later
Also, all of the file calls are asynchronous with fibers now, which comes with
many benefits.
This is a combination of 23 commits. Original messages:
Wrap a large number of fs calls inside files.*
Convert a few more fs calls to files.*
More moving fs.* to files
Implement read/write streams and open/read/close
Get rid of fs from auth.js
Remove fs and unused imports from catalog-local and catalog-remote
Remove unused imports from catalog.js
Replace a whole lot of fs calls
Fix error
Migrate a lot more fs. calls to files.
Add a temporary symlink method
Convert old test to files.*
Use files.pathX instead of path.x everywhere
Replace path.x to files.pathX in tests
Small fixes to files.js and one rename
Make cleanup run in a fiber
Make wrapping functions take function name in case we need it
Add some timeouts and stuff to HCP tests
wrapFsFunc also makes a sync version of the function
Sometimes you just don't want to yield!
Make sure JsImage readFromDisk doesn't yield
Remove unused imports from npm test
Change order of test now that some things don't yield
Fix missing files import, and add a debug error printout
Port a simplified version of Meteor.EnvironmentVariable and
Meteor.bindEnvironment to fiber-helpers.js to deal with this.
Identify uses of fiberHelpers.inFiber and switch them to either
fiberHelpers.bindEnvironment (if the callback they are wrapping is
semantically "part of" the context that creates the callback) or
fiberHelpers.inBareFiber (otherwise).
Without this, concurrency was causing the wrong buildmessage message
sets and jobs to be active when builds yielded.
The file watcher (watch.js) calculates the sha1 hash of source files
to see if they've changed. For static assets in `public`, the bundler
then calculates the same hash again for the client manifest.
This commit adds a small optimization to return the hash calculated by
the file watcher, so that it can be reused by the bundler.
There are more optimizations that probably could be done to avoid
other unnecessary sha1 hash recalculations, but they'd likely need
larger architectural changes.
From tool-refactoring to sso.
Makes the tool-refactoring/sso diff a little smaller (including removing
some files from it entirely) and easier to review. Only took about five
minutes to prepare, I swear this isn't a total waste of time :)
Previously we were hashing the Unicode string, not the bytes.
This also removes a race condition. Now there is only one use of
watchSet.addFile which does not go through
watch.readAndWatchFile (adding package.js hashes to multiple watch sets
at once), and that use does correctly hash the bytes.