Commit Graph

6410 Commits

Author SHA1 Message Date
Ben Newman
36302ba715 Set METEOR_WATCH_PRIORITIZE_CHANGED to "false" in "update during run" self-test. 2017-07-11 12:07:47 -04:00
Ben Newman
12753cb916 Additional timeouts for Meteor 1.6 failing tests.
Note that eee519ad58 greatly reduced the
TIMEOUT_SCALE_FACTOR for Circle CI tests, which likely caused some tests
to time out more often, so these additional timeouts are really just a way
of re-bumping individual timeouts, which arguably leaves the test suite in
a better overall state of health.
2017-07-11 12:07:46 -04:00
Ben Newman
5146864012 Merge branch 'release-1.5.1' into release-1.6 2017-07-10 13:22:45 -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
cfc2c25d1d Update package-lock.json and shrinkwraps for modules test app. 2017-06-27 19:22:04 -04:00
Ben Newman
c78b1dfb2f Use URL versions for npm packages installed from URLs.
If a package has a semantic (x.y.z) version in npm-shrinkwrap.json, npm
appears to install it always from the npm registry, rather than the
original tarball URL (uncommon but used by the less and stylus Meteor
packages, among others).
2017-06-27 19:22:04 -04:00
Ben Newman
42526ea5a8 Additional timeouts for CSS hot code push tests. 2017-06-27 19:22:04 -04:00
Ben Newman
355558d28a Additional timeout for compiler plugin caching tests. 2017-06-27 19:22:04 -04:00
Ben Newman
b80b4108b1 Fix modules tests broken by the upgrade to npm 5.0.3.
The new version of npm no longer tolerates stray packages in node_modules
that are not mentioned in package.json, such as node_modules/repl.
2017-06-27 19:22:04 -04:00
Jesse Rosenberger
0b40dde4ae Account for different error messages in npm v5.
Much in the same way as these were changed from v3 to v4, they have been
changed again!
2017-06-27 19:22:04 -04:00
Ben Newman
75cc85438c Adjust Npm.depends dependency management to work with npm 5.
Part of #8728 (Release 1.6).
2017-06-27 19:22:04 -04:00
Ben Newman
7925f4ae2e Shorten login test timeouts to avoid extremely long time to failure. 2017-06-27 16:22:33 -04:00
Ben Newman
e3e259169f Merge branch 'release-1.5.1' into release-1.6 2017-06-27 11:30:41 -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
Ben Newman
943c6a4d83 Merge branch 'release-1.5.1' into release-1.6 2017-06-21 14:40:01 -04:00
Ben Newman
ab338d6cd8 Don't call meteorDebugFuture.wait() unless METEOR_INSPECT_BRK is set.
Bug fixed: we should never be calling meteorDebugFuture.wait() in
production, so we now use process.env.METEOR_INSPECT_BRK in developement
to enable the waiting.

Lesson learned: if you call Fiber.yield() in the only running Fiber
without any other events scheduled on the event loop, the program will
immediately exit with code 0, as it should.

Closes #8817.
2017-06-19 14:32:52 -04:00
Ben Newman
85ee23cfa5 Stop using Object.create to clone process.env in npm-rebuild.js.
Fixes #8808.
2017-06-19 12:29:13 -04: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
Ben Newman
ab4f54c49a Revert unnecessary npm_config_disturl overrides. 2017-06-15 09:40:11 -04:00
Ben Newman
175ee4885b Always spawn app process with IPC to enable proc.send(message). 2017-06-14 19:38:50 -04:00
Ben Newman
8550412bb0 Reimplement meteor debug using the Node 8 inspector.
This is the feature that excites me most about Meteor 1.6, hands down.

Benefits include:

* Works with `meteor test[-packages] --debug-port 9229` (for tests), as
  well as just `meteor debug` (for apps).

* The application process waits patiently for the debugger to attach, so
  you don't have to race to open the debugger.

* The application process pauses at a location just after all server code
  has been evaluated, but before any code starts executing, giving you a
  chance to set reliable breakpoints anywhere in server code. This is much
  better than using the `node --inspect-brk` flag, since that stops too
  soon to set any useful breakpoints.

* The application server runs at full speed, so you don't have to wait
  forever to hit that all-important breakpoint, and you don't lose nearly
  as much time if you accidentally continue past the line of code where
  the trouble is occurring.

* Even if your application is stuck in an infinite loop, you can still
  attach the debugger, pause execution, and debug the loop.

* No more `node-inspector`! Instead, you can now debug your server code in
  native Chrome DevTools, or several other high-quality inspector clients,
  such as VS Code or WebStorm (seriously, check out the documentation:
  https://nodejs.org/en/docs/inspector/#inspector-tools-clients). The list
  of debuggable processes can be found at the URL chrome://inspect.

* Realistic performance and memory profiling is now possible via the
  familiar DevTools interface.

* I highly recommend this Chrome extension that automatically (re)connects
  to any open inspector sockets, so you don't have to keep manually
  (re)attaching the debugger: http://june07.com/nim

* The implementation of `meteor debug` no longer has to proxy multiple
  private/public debugger ports. Look at all that deleted code!

This new inspector is so much better than the old `node-inspector` that
I've been using the release-1.6 branch to debug problems in Meteor 1.5,
despite the risks of using Node 8, because those risks are so far
outweighed by the quality of the new debugging experience.

That said, the experience isn't perfect (yet). I welcome your feedback on
the Meteor 1.6 PR: https://github.com/meteor/meteor/pull/8728
2017-06-14 19:08:40 -04:00
Ben Newman
92b6d48960 Set disturl safely for meteor npm and Meteor package .npm management. 2017-06-14 12:18:39 -04:00
Ben Newman
7f44db91db Revert "Work around a Node 8.1.0 regression that broke meteor login."
This reverts commit dd11432722.

This bug that necessitated this workaround was fixed by
https://github.com/nodejs/node/pull/13560, as mentioned in
https://nodejs.org/en/blog/release/v8.1.1/.
2017-06-14 11:33:34 -04: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
48deea984d Update node-gyp and node-pre-gyp to latest versions. 2017-06-13 19:33:27 -04: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
Ben Newman
85cc9f2407 Don't skip reinstalling unchanged Npm.depends-style dependencies.
Fixes #8732.
Should also fix #8747.
2017-06-12 14:44:51 -04:00
Ben Newman
dd11432722 Work around a Node 8.1.0 regression that broke meteor login. 2017-06-09 10:02: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
Jesse Rosenberger
f244a5b0c6 Change runInThisContext to Script.prototype.runInThisContext. (#8771)
This actually changed ages ago, in Node.js 0.11 via
fd3657610e
however the descriptive error message, which was previously
enabled with `true` as the third argument, was silently lost.

This reimplements the descriptive error message as mentioned in
https://github.com/meteor/meteor/issues/3200#issuecomment-289685677 by
@d-schiffner.
2017-06-08 18:07:04 -04: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
77843cdb28 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-06-06 12:52:09 -04:00
Ben Newman
6f925b0103 Merge branch 'devel' into release-1.6 2017-06-06 12:51:50 -04:00