Commit Graph

6380 Commits

Author SHA1 Message Date
Ben Newman
25f003d0bc Throttle requestGarbageCollection to once per 500ms.
With Meteor 1.6 / Node 8, I noticed _buildLocalPackages taking multiple
seconds on initial server startup and restart, and the problem seems to be
that we call the global.gc function too often. This wasn't a problem in
previous versions of Node, as far as I know, but it makes sense to heed
the comment in tools/utils/gc.js, now that it matters.
2017-07-13 20:10:37 -04:00
Rob Fallows
7d2416435b (re)fixes #8879 Build phase command line output jumps 2017-07-12 14:43:45 -04:00
Ben Newman
692602ac46 Set METEOR_WATCH_PRIORITIZE_CHANGED to "false" in "update during run" self-test. 2017-07-10 22:11:33 -04:00
Ben Newman
a5fe404876 Add additional timeouts to "update during run" self-test. 2017-07-10 15:22:51 -04:00
Ben Newman
86eedd4bc6 Make METEOR_WATCH_PRIORITIZE_CHANGED opt-out instead of opt-in.
This restores the behavior of 8c70716954 by
default, with the option of disabling the prioritized file watching system
by setting METEOR_WATCH_PRIORITIZE_CHANGED explicitly to "false".

The self-tests where the environment variable is explicitly set form a
nice to-do list of tests that should be improved to be more robust to cope
with differences in file watcher timing.

Helps with #8648 and similar issues.
2017-07-10 12:31:11 -04:00
Ben Newman
54c4dbcbf7 Require opting into the behavior introduced by the previous commit.
Although I think 8c70716954 is a good idea
in practice, it altered the timing of self-tests enough to cause a number
of failures, so for now that behavior will be gated behind the environment
variable METEOR_WATCH_PRIORITIZE_CHANGED.
2017-06-30 11:41:00 -04:00
Ben Newman
8c70716954 Use native file watchers only to watch recently changed files.
This drastically reduces the number of open file descriptors by not
preemptively acquiring a file descriptor for every watched file.

The downside is that the first time you edit a particular file, you may
have to wait up to DEFAULT_POLLING_INTERVAL milliseconds before Meteor
notices the change. The upside is that changes will be detected
instantaneously for that file in the future, even after restart.

If holding open too many file descriptors is indeed a contributing factor
to issues such as #8648, then this change should go a long way towards
mitigating those problems.

cc @abernix @hwillson
2017-06-30 10:24:11 -04:00
Ben Newman
e86600b52b Rename "watchers" to "entries" where appropriate in safe-watcher.js. 2017-06-30 10:06:19 -04:00
Ben Newman
ac2595ad92 Merge branch 'devel' into release-1.5.1 2017-06-27 09:36:42 -04:00
Antonio Tapiador del Dujo
0b1a1ef59f Make require and module visible for meteor shell scripts 2017-06-27 09:31:43 -04:00
Antonio Tapiador del Dujo
2bcfb073c4 Remove parentheses wrapper of evaluateAndExit commmand
The prevented to run certain commands in scripts,
like `import { Foo } from './bar'`

See https://github.com/meteor/meteor/issues/8823
2017-06-27 09:31:43 -04:00
Ben Newman
d411229206 Merge branch 'devel' into release-1.5.1 2017-06-26 19:07:05 -04:00
Ben Newman
cf3c8270c6 Display PhantomJS stderr after tests finish, if not empty string. 2017-06-26 15:29:25 -04:00
Jesse Rosenberger
e2a6f397e7 Merge pull request #8842 from RickvdP/master
Updated old github wiki references to Meteor Guide/API docs
2017-06-26 14:08:39 +03:00
Rick van der Plas
e71a9e9856 Updated old github wiki references to Meteor Guide/API docs 2017-06-24 18:44:10 +02:00
Jesse Rosenberger
a05be9a600 Merge branch 'devel' into additional-packages-option 2017-06-19 14:58:37 +03:00
Rick
c6f80b9502 Updated doc URLs 2017-06-19 12:00:35 +02:00
Michał Powaga
ec78bdb8ce Remove redundant empty line 2017-06-14 15:42:35 +01:00
Michał Powaga
4d106db287 Fix formatting 2017-06-14 15:38:53 +01:00
Ben Newman
7e1d4ba6a1 Don't skip reinstalling unchanged Npm.depends-style dependencies. (#8787)
Fixes #8732.
Should also fix #8747.
2017-06-12 16:59:34 -04:00
Michał Powaga
e6a53ee564 Update help.txt 2017-06-08 23:30:36 +01:00
Michał Powaga
7239bf5ec2 Add --extra-packages option to test and test-packages commands 2017-06-08 23:26:47 +01:00
Michał Powaga
4c236dd69e --extra-packages now overrides .meteor/packages constraints 2017-06-08 16:21:09 +01:00
Michał Powaga
4c45c28a92 Remove unnecessary file 2017-06-08 11:08:48 +01:00
Michał Powaga
809179b725 Add example to help command 2017-06-08 11:02:27 +01:00
Michał Powaga
0f6f9d5ebf Trim input when parsing --extra-packages 2017-06-08 10:59:14 +01:00
Michał Powaga
a276af1706 Add selftest 2017-06-08 10:56:56 +01:00
Michał Powaga
dd19865a1e Add --extra-packages option 2017-06-06 23:24:42 +01:00
Ben Newman
cdc047bbc7 Update unicode asset sanitization tests (and History.md). 2017-06-06 12:25:33 -04:00
Ben Newman
a2f26cbe6e Fix #8761 in three different ways.
The root of the problem was that the es5-ext npm package contains
directories called '#', e.g.
https://github.com/medikoo/es5-ext/tree/master/array/%23

These directory names were being sanitized to '' and thus ignored when
reserving paths in the Builder, which led to reservation conflicts later.

This commit fixes the problem in three different and independently
sufficient ways:

* Use files.mkdir_p instead of files.mkdir when creating parent
  directories of written files.

* Replace illegal characters in sanitized paths with '_' instead of ''.

* Allow '#' in sanitized paths (only needs to be escaped in the shell, not
  actually forbidden in paths).
2017-06-06 12:25:33 -04:00
Ben Newman
40f1d99e2c Stop polyfilling global.Buffer in modules test app. 2017-06-02 16:37:19 -04:00
Ben Newman
929fa0e90e Test that require("module") returns Module constructor on the client.
On the server, require("module") returns Node's native Module constructor,
which is not the same as module.constructor in our server JS bundle.
2017-06-02 16:26:54 -04:00
Ben Newman
a7feffd5a6 Upgrade the modules test app to Meteor 1.5. 2017-06-02 14:31:37 -04:00
Ben Newman
9c5293b6e2 Upgrade the dynamic-import test app to Meteor 1.5. 2017-06-02 14:25:46 -04:00
Ben Newman
a2aec7becf Add a failing test of dynamic imports from user:name packages.
Confirms #8751.
2017-06-02 10:45:24 -04:00
Hugh Willson
a4c3e335eb Merge pull request #8684 from paulincai/patch-1
Update to present media object sizes
2017-05-31 11:28:01 -04:00
Ben Newman
da097e209d Bump LINKER_CACHE_SALT and compiler.BUILT_BY for good measure. 2017-05-30 14:16:46 -04:00
Ben Newman
1df6668cc9 Test that importing the winston npm package works now.
This is a test that should have accompanied my previous commit
81a07ed84f.
2017-05-29 19:37:33 -04:00
James
6445a44001 Clarify meteor update message for indirect dependencies
* Adjust string style to be in line with meteor style guide 6.2

* Partially addresses #8721 #8488
2017-05-29 14:41:00 -04:00
Ben Newman
cd4fc028f8 Upgrade reify to version 0.11.20 to fix getNamespace bug.
Reported here:
https://github.com/meteor/meteor/pull/8327#issuecomment-304582864

Fixed by:
aeb46dcd61
2017-05-29 12:02:56 -04:00
Ben Newman
e2210ef01d Update Reify API usage for version 0.11.13. 2017-05-26 18:22:02 -04:00
paulincai
c1ae89d45d Update icons and launch screen specs
Align with the values at lines 16-48
2017-05-24 18:25:29 +04:00
Ben Newman
a445e50c11 Merge branch 'release-1.4.4.3' into release-1.5 2017-05-22 20:21:10 -04:00
Ben Newman
2a3fd57303 Style tweaks and a small bug fix.
These checks should still happen when body is an empty string, which (for
better or worse) is falsy in JavaScript.
2017-05-22 16:40:48 -04:00
David Glasser
5f18c6e24a tools: fix Galaxy discovery
1a036553 in 1.4.4.2 expanded on the HTTP error checking added by 30aec9f in
1.4.2. Neither of these changes were aware that discoverGalaxy invokes
httpHelpers.request with json:true, resulting in a `body` that is a parsed JSON
object rather than a string or Buffer.  Before 1.4.4.2, this had no consequences
because body.length is undefined and `undefined < 90` is false, but the change
to Buffer.byteLength actually made the condition true.

It's safe to not check length in the JSON case because a truncated JSON object
is not legal JSON (unless the truncation just drops trailing whitespace, in
white case that's OK).

I check for both string and Buffer because some calls to this function pass in
an encoding option.  Buffer.byteLength works with both types.
2017-05-22 16:40:42 -04:00
Ben Newman
47496e9dba Call requestGarbageCollection in Isopack#_writeTool.
This method appears to be causing large spikes in memory consumption on
Circle CI during the `meteor --get-ready` preparation step, which often
leads to the test process being killed.

Also added a call in IsopackCache#_loadLocalPackage for good measure.

We're now calling requestGarbageCollection pretty frequently when
we run Node with --expose-gc, but that currently only happens during
Circle CI tests, so I don't think we need to implement the improvements
suggested in tools/utils/gc.js, yet.

Previously: 35f488e140, f6df21ff1e
2017-05-22 16:40:32 -04:00
Ben Newman
35386e49dd Re-run individual tests to avoid re-running the whole suite.
To deal with individual flaky tests, we often just re-run the entire test
suite, which feels like an enormous waste of shared computing resources.

This change automatically re-runs individual failed tests as many as two
more times, and considers the test successful if any of those attempts
succeeds.

cc @abernix @hwillson et al.
2017-05-22 16:40:32 -04:00
Ben Newman
0fbb97432c Fix ENOTEMPTY and EPERM errors on Windows.
Windows began suffering from cryptic ENOTEMPTY and EPERM errors between
1.5-beta.20 and 1.5-rc.0. After a tricky `git bisect` adventure, I tracked
the problem down to my commit b6694b2f5d,
which caused dynamic modules to be written more than once by the bundler.
Though I don't understand exactly why Windows complained in this way, I'm
glad that it did, because otherwise this mistake would merely have been a
performance problem, and might not have been noticed before the release.
2017-05-18 11:48:40 -04:00
Ben Newman
16a8a3ae3c Tweaks to linker caching.
No longer using a RegExp when we know what the old file wildcard path
should be, and no longer using Fiber when we can just use a Promise
callback (since all Promise callbacks run in a Fiber).
2017-05-16 13:43:38 -04:00
Hugh Willson
b8a8833ac6 Moved LINKER_CACHE_SALT into cacheKeySuffix part of cache filename hash. 2017-05-16 13:41:40 -04:00