Commit Graph

28 Commits

Author SHA1 Message Date
David Glasser
5d17598584 Update pathwatcher, which took our PR
Our PR landed in 4.1.0, so we no longer need a fork.

Hopefully, the runas-related bug which causes dev bundle builds to
sometimes fail (which is why we moved the install to its own step) is
fixed with the newer version of runas used by pathwatcher now.

Note that we were previous using a fork with an early version of our PR,
which put the numeric errno on 'code'. The accepted version of the PR
puts the numeric errno on 'errno' (and in Node 0.12, puts a string on
'code').
2015-02-16 14:34:54 -08:00
Sashko Stubailo
415ec102a2 Disable pathwatcher only on Windows 2015-01-28 13:39:37 -08:00
Sashko Stubailo
dee47d5cff Fix accidental duplicate code from rebase 2015-01-20 22:34:20 -08:00
Sashko Stubailo
84dcd9728c Revert this commit! Disable pathwatcher completely 2015-01-20 22:34:20 -08:00
Slava Kim
ced465286a Disable pathwatcher on Windows by default 2015-01-20 22:06:57 -08:00
David Glasser
da4ae8b3a8 Use files-wrapped pathwatcher
Accidentally broken in 6320acabc4 (the merge of 1.0.2 into devel).
2014-12-29 17:32:35 -08:00
David Glasser
995a57d0c2 Merge branch 'master' into devel
Conflicts:
	tools/safe-pathwatcher.js
2014-12-22 17:48:12 -08:00
David Glasser
2343c1253e Make wiki link visible, fix capitalization 2014-12-22 13:32:21 -08:00
David Glasser
5df873a4e0 Don't crash on pathwatcher failures
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).

Conflicts:
	meteor
	tools/safe-pathwatcher.js
2014-12-22 12:27:55 -08:00
David Glasser
f5f136adc9 Don't crash on pathwatcher failures
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).
2014-12-22 12:19:59 -08:00
David Glasser
6320acabc4 Merge branch 'master' into devel
Conflicts:
	History.md
	tools/safe-pathwatcher.js
	tools/tests/old.js
	tools/watch.js
2014-12-19 11:42:50 -08:00
Ben Newman
0c8edc1511 Use both pathwatcher and polling to detect changes more robustly.
This strategy was suggested by @glasser after we realized just how
hopeless it is to probe the file system to test pathwatcher:
https://github.com/meteor/meteor/issues/3285#issuecomment-67296961

I've made some attempt to de-duplicate these events (since we're
effectively watching twice now), but we have other mechanisms for dealing
with bursty file change events, so these measures do not need to be
completely bulletproof.

Fixes #3284 (again).
2014-12-17 14:16:41 -05:00
Ben Newman
6f41fe9b4d Remove stray console.log statements. 2014-12-17 12:55:00 -05:00
Ben Newman
c2ce95fd11 Use both pathwatcher and polling to detect changes more robustly.
This strategy was suggested by @glasser after we realized just how
hopeless it is to probe the file system to test pathwatcher:
https://github.com/meteor/meteor/issues/3285#issuecomment-67296961

I've made some attempt to de-duplicate these events (since we're
effectively watching twice now), but we have other mechanisms for dealing
with bursty file change events, so these measures do not need to be
completely bulletproof.

Fixes #3284 (again).
2014-12-17 12:50:54 -05:00
David Glasser
bd54f09e4c Fix safe-pathwatcher memory leak 2014-12-17 00:14:25 -08:00
David Glasser
d090f55b4b Fix safe-pathwatcher memory leak 2014-12-17 00:05:50 -08:00
Ben Newman
1307132c25 Create temporary pathwatcher test file in app directory.
Previously we were testing pathwatcher.watch by creating a file in
.meteor/local, but developers using Vagrant VMs often mount .meteor on a
different (non-network) file system, for Mongo's sake.

Writing the file directly in the app directory increases the likelihood
that it will interact with pathwatcher in the same way as other source
files the developer will be editing.

Conflicts from devel:
	tools/safe-pathwatcher.js
2014-12-16 17:09:59 -08:00
Ben Newman
fe8297697b Avoid pathwatcher.watch failures in testDirectory. 2014-12-16 17:07:03 -08:00
Ben Newman
3b569ab33d Create temporary pathwatcher test file in app directory.
Previously we were testing pathwatcher.watch by creating a file in
.meteor/local, but developers using Vagrant VMs often mount .meteor on a
different (non-network) file system, for Mongo's sake.

Writing the file directly in the app directory increases the likelihood
that it will interact with pathwatcher in the same way as other source
files the developer will be editing.
2014-12-16 19:25:25 -05:00
Ben Newman
fc52c5fbf5 Small fixes to tools/safe-pathwatcher.js. 2014-12-16 12:34:43 -05:00
Slava Kim
d37a2ab5c3 Make pathwatcher calls go through files.js
Conflicts:
	tools/files.js
	tools/safe-pathwatcher.js
2014-12-15 23:55:34 -08:00
Ben Newman
87f4189e11 Avoid pathwatcher.watch failures in testDirectory. 2014-12-16 02:07:40 -05:00
Ben Newman
cf9ad04e17 Console.debug instead of .warn about falling back to fs.watchFile. 2014-12-16 01:51:48 -05:00
David Glasser
bd3e276f33 Move pathwatcher fallback message to debug level 2014-12-15 22:51:30 -08:00
Ben Newman
651348f6f5 Allow forcing fs.watchFile with an environment variable. 2014-12-15 13:13:16 -08:00
Ben Newman
0f00c9e482 Fall back to fs.watchFile if pathwatcher.watch does not work.
Fixes #3284.
2014-12-15 13:13:15 -08:00
Ben Newman
d3a06930a7 Allow forcing fs.watchFile with an environment variable. 2014-12-15 11:54:59 -05:00
Ben Newman
ddae20cb4b Fall back to fs.watchFile if pathwatcher.watch does not work.
Fixes #3284.
2014-12-15 11:17:50 -05:00