Commit Graph

149 Commits

Author SHA1 Message Date
Jesse Rosenberger
9e0f61c4b3 Revert "Use fs.move() from fs-extra to fix EXDEV cross device error in docker builds. (#8491)"
Unfortunately, `fs-extra` is still not as perfect at handling various
file system conditions as would be ideal.  It seemed sensical to try and
use a library like this however, it turns out that the Meteor suite
of file system functions stands up best on Windows, which is where I
encountered most problems.

For example, `fs-extra` still tries to create symlinks as an unprivileged
user – a forbidden task on Windows unless running as Administrator.

In addition, I ran into a constant stream of other errors: `ENOTEMPTY`,
`EBUSY`, `EEXIST` – all for various reasons.

My current recommendation is that we remove `fs-extra` and replace the
`Builder#complete` `renameDirAlmostAtomically` call (which does not
absolutely _have_ to be done atomically) with a `try`/`catch` which
resorts to a basic copy if `err.code === 'EXDEV'`.  All other
functionality stays the same.

This reverts commits:

* d49f3e2704
* 3257bafc84
* 74cb8ebdc2
* 5bbdcc9baa
* 6a0767bbac
2017-04-06 06:50:03 +03:00
Jesse Rosenberger
74cb8ebdc2 Improve fs-extras move calls for Windows platform. (#8560)
* Improve `fs-extra.move` calls for Windows platform.

This is a follow-up to meteor/meteor#8491 which worked properly on Unix
platforms, but failed in a variety of ways on Windows due to its lack
of Fiber-awareness and desire to create symlinks as unprivileged users
(something not always possible on Windows).

The Fiber issue was observed when trying to remove "src" directories
within the `move` function (which tries a variety of OS/OS/arch-specific
techniques to accomplish its goal) after they had been copied to "dest".
On Windows, this resulted in `EDIRNOTEMPTY` errors since Windows appears
to temporarily cache the file-handle or doesn't release the file-handle
until the next tick.

The symlink issue will hopefully improve in an upcoming release of
Windows (Creator Edition) when Microsoft makes it possible to create
symlinks as an unprivileged user, however it will still require enabling
"Developer" mode in Windows settings.  This implements the same catch
which was already in place for `fs.rename` on the `fs.move` provided by
`fs-extra`.

Performance gains were the same in tests comparing before and after
these changes.

Relates to:
https://github.com/meteor/meteor/issues/8558#issuecomment-291194385

* A few code-cleanups to my original commit.
2017-04-05 12:58:32 +03:00
Jesse Rosenberger
cba8c63340 Update node-gyp and node-pre-gyp packages.
* `node-gyp` - Adds support for Visual Studio 2017.
  - https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md#v360-2017-03-16
* `node-pre-gyp` - Nothing notable.
  - https://github.com/mapbox/node-pre-gyp/blob/master/CHANGELOG.md#0634
2017-04-04 19:42:03 +03:00
Jesse Rosenberger
7915afbbc1 Update npm package to v4.4.4.
Notable changes:
  https://github.com/npm/npm/releases/tag/v4.4.4
2017-04-04 19:42:03 +03:00
Jeremy Shimko
d49f3e2704 Use fs.move() from fs-extra to fix EXDEV cross device error in docker builds. (#8491)
Use fs.move to fix EXDEV cross device error in docker builds.

Fixes #7852.
2017-03-28 15:53:22 +03:00
Ben Newman
0eb52a1fd8 Upgrade meteor-babel to v0.19.1 and reify to v0.6.6. 2017-03-25 11:12:52 -04:00
Ben Newman
9a057f4e51 Upgrade meteor-babel to v0.18.2 and reify to v0.5.7. 2017-03-21 15:23:03 -04:00
Ben Newman
e972fa3eb1 Bump meteor-babel to v0.18.1 to fix strict minification errors. 2017-03-17 21:26:15 -04:00
Ben Newman
06574b78a7 Update meteor-babel to version 0.18.0.
The most important change in this version is that the Reify compiler can
now compile these useful `export ... from ...` extensions:

  https://github.com/leebyron/ecmascript-export-ns-from
  https://github.com/leebyron/ecmascript-export-default-from

Fixes #8432 (`transform-export-extensions` no longer needed).
2017-03-16 11:28:43 -04:00
Ben Newman
9d4d7488a7 Update meteor-babel to version 0.17.2.
The most important change in this version is that the Reify compiler is
now just another Babel plugin, so it's possible for other Babel presets
and plugins to run before it.

Fixes #8399.
Fixes #8422.
Fixes https://github.com/meteor/babel/issues/13.
2017-03-14 18:07:03 -04:00
Jesse Rosenberger
ba06bf6eed Upgrade node-gyp to 3.5.0 and node-pre-gyp to 0.6.33.
`node-gyp` has been upgraded by a minor version and `node-pre-gyp` by a
patch version.

No notable changes aside from potentially improved support for `yarn` in
`node-pre-gyp`

The release notes for each are available below:

* node-gyp:
  * https://github.com/nodejs/node-gyp/releases/tag/v3.5.0
  * https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md#v350-2017-01-10

* node-pre-gyp:
  * https://github.com/mapbox/node-pre-gyp/releases/tag/v0.6.33
  * https://github.com/mapbox/node-pre-gyp/blob/master/CHANGELOG.md#0633
2017-03-03 02:26:13 +02:00
Jesse Rosenberger
8ea41588ea Upgrade npm to latest 4.x release, 4.3.0.
This is a minor version bump to npm.

The release notes are available at:
  https://github.com/npm/npm/releases/tag/v4.3.0
2017-03-03 02:23:36 +02:00
Ben Newman
ebbc02d025 Upgrade meteor-babel and reify to versions 0.14.4 and 0.4.8.
Thanks to @abernix for fixing this Babel/Babylon bug in Reify:
https://github.com/benjamn/reify/pull/62

Fixes #8312.
2017-02-13 18:11:11 -05:00
Ben Newman
cc8734ddca Merge branch 'master' into devel 2017-02-02 15:18:48 -05:00
Ben Newman
be0c8c3ee0 Upgrade the npm npm package to version 4.1.2. 2017-02-01 10:11:19 -05:00
Bartosz Wojtkowiak
40fbe24853 Update cordova-lib in dev bundle to 6.4.0 2017-01-11 21:48:34 +01:00
Ben Newman
f434383c02 Upgrade the npm npm package to version 4.0.2. 2016-12-01 17:53:53 -05:00
Ben Newman
8577c9a233 Upgrade the meteor-babel npm package to version 0.14.3. 2016-11-30 13:40:24 -05:00
Ben Newman
bd0a7be6e2 Upgrade the meteor-babel npm package to version 0.14.2. 2016-11-26 13:29:33 -05:00
Ben Newman
e2be0bbc8a Upgrade the npm npm package to version 3.10.9. 2016-10-21 22:16:29 -04:00
Ben Newman
9ff66d11c7 Ugrade the meteor-promise npm package to version 0.8.0.
Most notably, this update provides error stack traces that include context
from Promise.await calls and await expressions, so (for example) you can
tell where a certain yielding files.* method was originally called,
instead of only getting a useless native stack trace.
2016-10-20 17:51:03 -04:00
Ben Newman
6b06f440f1 Upgrade the fibers npm package to version 1.0.15.
This should hopefully improve performance in the rare event that a large
number of fibers get created simultaneously.
2016-10-20 17:19:55 -04:00
Ben Newman
ca51aa327b Update the optimism npm package to version 0.3.3. 2016-10-12 13:22:26 -04:00
Ben Newman
6bb4bd739b Update the meteor-babel npm package to version 0.13.0. 2016-10-11 22:35:10 -04:00
Ben Newman
c7c42b843e Update the optimism npm package to version 0.3.1. 2016-10-11 19:48:29 -04:00
Ben Newman
b594b460a4 Go back to using pathwatcher.watch, with new rewatching logic.
Judging from the variety and extent of test failures, switching to
chokidar.watch was too drastic a change for this late-beta stage of the
release cycle.

The problem with pathwatcher.watch was that watches don't survive the
deletion of the watched file, because (like fs.watch) it watches files
based on inodes, not paths. This problem can be solved in a relatively
narrow way, by attempting to rewatch the file after any "delete" or
"rename" events.
2016-10-11 10:02:06 -04:00
Ben Newman
117b1a8525 Use chokidar for file watching instead of pathwatcher.
Healthy competition among fs.watch wrappers appears to have produced a
clear winner: https://www.npmjs.com/package/chokidar

This wrapper is better for Meteor than pathwatcher was, because it can
watch directory trees recursively, and it has no trouble watching
nonexistent file paths, whereas pathwatcher would throw an exception.
2016-10-10 14:12:51 -04:00
Ben Newman
5969628990 Update the optimism npm package to version 0.3.0. 2016-10-10 11:53:10 -04:00
Ben Newman
875222c8ec Update the optimism npm package to v0.2.3. 2016-10-07 19:32:18 -04:00
Martijn Walraven
cc9882b12d Update cordova-lib in dev bundle to 6.3.1 2016-10-05 16:11:32 -04:00
Ben Newman
8b42bfa6f0 Add optimism@0.2.2 to the dev bundle. 2016-10-03 17:25:42 -04:00
Ben Newman
80fdc16e21 Add v8-profiler@5.6.5 to the dev bundle. 2016-09-30 10:31:58 -04:00
Ben Newman
2483fb3cb3 Update the lru-cache npm package to v4.0.1. 2016-09-27 12:47:13 -04:00
Ben Newman
a13d3fd938 Update the pathwatcher npm package to v6.7.1.
Also remove explicit dependency on `runas`, which is depended upon by
`pathwatcher`.
2016-09-27 12:15:04 -04:00
Ben Newman
670c305927 Update the npm npm package to v3.10.8. 2016-09-27 12:07:41 -04:00
Ben Newman
497270eabe Add glob package to dev_bundle/lib/node_modules. 2016-09-09 13:28:15 -04:00
Ben Newman
32d02beead Update the fibers npm package to v1.0.14. 2016-09-09 11:28:49 -04:00
Ben Newman
0d1834368b Update the node-pre-gyp npm package to v0.6.30. 2016-09-09 11:28:48 -04:00
Ben Newman
d411113e7f Update the npm npm package to v3.10.7. 2016-09-09 11:28:46 -04:00
Ben Newman
ca51c8fd87 Upgrade npm to 3.10.6.
https://github.com/npm/npm/blob/master/CHANGELOG.md#v3106-2016-07-07
2016-08-16 12:50:28 -04:00
Ben Newman
f6a52788f0 Remove BrowserStack from dev bundle. 2016-08-15 14:23:09 -04:00
Ben Newman
62ff1ec5ed Upgrade npm tar package to v2.2.1. 2016-08-11 16:08:57 -04:00
Ben Newman
d6cc3429fe Update meteor-babel to v0.12.0. 2016-08-11 11:43:08 -04:00
Ben Newman
e5313e9144 Update meteor-ecmascript-runtime to v0.2.9. 2016-08-11 11:42:59 -04:00
Ben Newman
bb8e1a3b9f Implement ConcatStream class instead of using concat-stream npm package. 2016-08-01 14:42:22 -04:00
Tom Coleman
7769951ee8 Switched to concat-stream for performance 2016-08-01 17:55:37 +10:00
Tom Coleman
c5cc1c7ddd Added stream buffers to the dev bundle 2016-07-14 16:12:02 +10:00
Ben Newman
c54686126e Merge branch 'devel' into release-1.4 2016-07-09 15:07:52 -04:00
Ben Newman
f16d8b36fa Update node, npm, node-gyp, and node-pre-gyp.
https://nodejs.org/en/blog/release/v0.10.46/
https://github.com/npm/npm/releases/tag/v3.10.5
https://github.com/nodejs/node-gyp/releases/tag/v3.4.0
https://github.com/mapbox/node-pre-gyp/releases/tag/v0.6.29
2016-07-08 13:44:07 -04:00
Ben Newman
27ac47aa14 Upgrade meteor-babel and reify to latest versions. 2016-07-06 21:00:38 -04:00