Commit Graph

23 Commits

Author SHA1 Message Date
Ben Newman
f42c137f55 Always copy node_modules/.bin into bundle/programs/server/npm.
Fixes #8136.
2016-12-06 10:16:43 -05:00
Ben Newman
a7ac32e00a Tolerate ENOENT errors in Builder#copyDirectory. 2016-11-08 13:33:20 -05:00
Ben Newman
ad460e0d7d Tolerate files.realpath throwing ELOOP exceptions. 2016-11-04 18:45:51 -04:00
Ben Newman
7f35e94713 Tolerate files.realpath throwing ENOENT exceptions. 2016-11-04 18:14:09 -04:00
Ben Newman
af51b8160c Use absolute paths for external symlinks in Builder#copyDirectory.
Thanks to @worldsayshi for reporting this issue with a reproduction.

Fixes #8005.
Fixes #2876.
Fixes #7154.
2016-11-04 17:44:42 -04:00
Ben Newman
1b3edb2300 Write files with appropriate mode in Builder#copyDirectory.
Fixes #7974.
2016-10-28 16:11:29 -04:00
Ben Newman
c572b12f26 Allow Builder#copyDirectory to make junction links on Windows. 2016-10-14 16:25:07 -04:00
Ben Newman
8e57ecb731 Use optimistic functions in Builder#copyDirectory. 2016-09-26 20:12:46 -04:00
Ben Newman
7574f74481 Avoid copying devDependencies from local node_modules directories.
Fixes #6750.
2016-05-16 20:49:02 -04:00
Ben Newman
992c27e716 Recreate symlinks in Builder#copyDirectory, even if !canSymlink.
According to the comment for the copyDirectory method, this was the
intended behavior before I changed it.
2016-03-09 11:52:08 -05:00
Ben Newman
b82f82e7da Revert "Follow symbolic links in builder.copyDirectory."
This reverts commit e6b33a2627.
2016-03-09 11:52:08 -05:00
Ben Newman
e6b33a2627 Follow symbolic links in builder.copyDirectory.
Fixes a blocking bug with the `meteor publish-release` command.
2016-03-08 22:48:48 -05:00
Ben Newman
99213da719 Make builder.copyDirectory symlink directory children. 2016-03-07 19:41:12 -05:00
David Greenspan
fabb20d2cd Rebuild in place for better performance
writeSiteArchive already supported rebuilding in place (rather than
creating a new build directory and moving it into place; see comments
at top of builder.js), but it was not used and didn't work:

* run-app.js only passed previousBuilders to the bundler in the case
  of a client-only refresh, in which case it also passed
  hasCachedBundle, bypassing writeSiteArchive altogether.

* writeSiteArchive's use of previousBuilders seemingly didn't work,
  because the site archive itself was never written in place, so
  trying to write the targets "in place" into a brand-new build
  directory didn't make sense (and threw an error).

With this change, previousBuilders are kept across all rebuilds
(not just client-only refreshes), which enables efficient, in-place
building (except on Windows, where in-place building has never been
supported), and writeSiteArchive is fixed to write the site archive
in place as well.
2016-02-04 17:11:39 -08:00
David Greenspan
f0b76186b5 Don't stat in Builder#write
The only reason for the files.stat in atomicallyRewriteFile (called
by Builder#write), which was taking up time comparable to write
and rename (not as much as one of those but same order of
magnitude, in the hundreds of ms total)... was for the case where we
are trying to rename a file in a way that overwrites an existing
directory.  We can avoid the stat by catching this unusual case when
rename throws an error.
2016-02-01 17:49:36 -08:00
Ben Newman
ed17924940 Add braces to every if/for(-in)/while statement in tools directory. 2015-11-13 12:25:19 -05:00
Ben Newman
739d0d9676 Spot fixes for tricky add-braces cases. 2015-11-13 12:24:32 -05:00
Slava Kim
6b1bb038d8 Move files into tools/fs 2015-08-03 22:09:28 -07:00
Slava Kim
49a7088c30 Create a folder "tool-env"
Contains uninteresting setup and cleanup files
2015-07-31 18:38:25 -07:00
Slava Kim
c51212ed82 Builder should always write a temp file first
To avoid a situation when a file is half-written
2015-07-23 16:35:35 -07:00
Slava Kim
d5586d0126 Disable in-place builder on Windows 2015-07-23 12:07:18 -07:00
Slava Kim
8975ae6a34 Write file after removing the old directory on file rewrite 2015-07-23 11:57:53 -07:00
David Glasser
2ccaf6a51e Move some files into isobuild subdirectory
The exact borderline between "Isobuild" and "the tool" is a little hazy,
but the idea is that "Isobuild" is the part that you could imagine being
embedded in a non-command-line build tool. It's not about commands or
UI, but just about building packages and apps.

A next step could be moving things that are strictly "the command-line
tool" into their own subdir, and leaving the top directory mostly just
for shared utilities like buildmessage.  (Which could even go in a utils
subdir?)
2015-07-16 15:12:36 -07:00