Commit Graph

30 Commits

Author SHA1 Message Date
David Glasser
6998b1a747 Revert accidental watch change from 78497c0
Fixes #2550.
2014-09-10 17:43:02 -07:00
David Glasser
7d05640ea0 Make buildmessage fiber-aware
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.
2014-08-04 19:03:05 -07:00
Emily Stark
58e4a31df8 Fix WatchSet.merge to actually merge files.
Not sure why this was commented out?
2014-03-30 20:39:39 -07:00
Geoff Schmidt
6c993f1ea2 first draft of 3-phase local package builder 2014-03-14 01:14:47 -07:00
ekatek
78497c0b6b Read versions instead of packages in the packages.js hack 2014-03-07 11:18:36 -08:00
David Glasser
3ebc9aba60 arguably support empty regexs in file watcher 2014-02-28 11:59:03 -08:00
Naomi Seyfer
d91110bd9c Merge branch 'devel' into sso
Conflicts:
	packages/livedata/livedata_server.js
2014-02-04 14:04:30 -08:00
Nick Martin
d1331e9c7a Reuse sha1 hashes calculated by the file watcher.
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.
2014-02-04 01:06:59 -08:00
David Glasser
990450c2a6 Backport some comment-punctuation 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 :)
2014-01-30 21:08:56 -05:00
David Glasser
daf0a4801a Ensure 500 ms of directory watch downtime.
Should help with #1506.

Fingers crossed for an eventual usable fs.watch.
2013-10-22 16:10:57 -07:00
David Glasser
67a7c2786b Don't hash settings file during deploy. 2013-10-19 01:03:50 -07:00
David Glasser
606a94b41d Calculate settings file hash properly. Fixes #1497.
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.
2013-10-18 16:18:24 -07:00
David Glasser
6c0f7dff02 Yield during background directory watches. 2013-10-11 14:18:05 -07:00
Nick Martin
085b9bb0e5 Remove now unneeded double check. 2013-10-11 13:11:22 -07:00
Nick Martin
135de89282 Rip out fs.watch entirely. 2013-10-11 13:09:27 -07:00
Nick Martin
287d43bd99 Don't use fs.watch. Poll directory contents instead. 2013-10-11 10:01:29 -07:00
David Glasser
392daa0a99 Detect symlink cycles in app dirs. 2013-08-02 10:59:41 -07:00
David Glasser
1d45b0bfa8 update comments 2013-07-31 23:26:51 -07:00
David Glasser
a2803fd111 watch nonexistent dirs better 2013-07-31 22:56:57 -07:00
David Glasser
1b82376b4b in theory, this might work 2013-07-31 22:56:57 -07:00
David Glasser
ea22b3ab02 Checkpoint for actually using WatchSets.
Have not yet touched initFromAppDir.
2013-07-31 22:56:38 -07:00
David Glasser
ad5b20990e get watch-test to pass 2013-07-31 22:56:38 -07:00
David Glasser
5ac411652a twiddle exports 2013-07-31 22:56:38 -07:00
David Glasser
4dc5aaf683 rewrite Watcher 2013-07-31 22:56:38 -07:00
David Glasser
5b76eb7a85 watcher rewrite: Add WatchSet and readDirectory. 2013-07-31 22:56:38 -07:00
Geoff Schmidt
02e1b3b1c7 Make 'meteor --help' startup >3x faster, with the help of a require() tree profiler. The speedup is entirely due to lazy-loading third party modules. 2013-05-13 11:56:51 -07:00
Geoff Schmidt
4eec2ec057 Make watch.stop() kill timers. 2013-05-13 11:51:53 -07:00
Geoff Schmidt
e26732d3dd Factor out bundle file-handling logic into new Builder class 2013-05-13 11:51:52 -07:00
Geoff Schmidt
6fc6bf1dca Packages are modeled as a set of separately-compilable Slices 2013-05-13 11:51:52 -07:00
Geoff Schmidt
24682fd7f4 New Watcher implementation (for watching for changed files and determining when to rebundle the app.) Unlike the old DependencyWatcher, it uses absolute paths and contains no Meteor-specific knowledge. Also unlike the old DependencyWatcher, it has comprehensive unit tests (scripts/watch-test.sh). 2013-05-13 11:51:52 -07:00