Commit Graph

19955 Commits

Author SHA1 Message Date
Ben Newman
40ecbb27f2 Bump package versions for 1.6-rc.6 release. release/METEOR@1.6-rc.6 2017-10-10 10:05:36 -04:00
Ben Newman
305a1e3942 Merge branch 'devel' into release-1.6 2017-10-10 10:02:00 -04:00
Ben Newman
8b319f11e9 Reinstate meteor debug help text, but recommend --inspect-brk. 2017-10-10 09:52:02 -04:00
Ben Newman
7485d50ff6 Support --inspect and --inspect-brk for all meteor test/run commands. (#9201)
The syntax of these flags is the same as the equivalent Node.js options:
https://nodejs.org/en/docs/inspector/#command-line-options

When no port value is provided, the default is 9229.

Two notable differences:

  * The flags affect the server process spawned by the parent build
    process, rather than affecting the build process itself.

  * The --inspect-brk flag causes the server process to pause just after
    server code has loaded but before it begins to execute. This timing is
    more useful than the Node.js --inspect-brk behavior, which is to pause
    on the first instruction executed by the process, since that is too
    early to set any useful breakpoints.

Implements https://github.com/meteor/meteor-feature-requests/issues/194.
2017-10-10 09:23:46 -04:00
Jesse Rosenberger
9e3945dc9a Add missing character to circle.yml configuration.
This was preventing the proper group name from being displayed on test
group "2", though the test was still working properly.

Refs: https://github.com/meteor/meteor/pull/9190 where it was spotted.
2017-10-10 10:23:17 +03:00
David Glasser
e4367acdf1 npm-mongo: use fork of mongodb-core for #8598 (#9200) 2017-10-09 21:22:25 -04:00
skirunman
8279f12377 Fix iOS icon and launch screen sizes (#9198) 2017-10-09 21:08:57 -04:00
David Glasser
008cb568ba npm-mongo: use fork of mongodb-core for #8598 (#9200) 2017-10-09 21:02:36 -04:00
Ben Newman
670fb6d247 Make --driver-package work like --extra-packages.
Now you can run `meteor test --driver-package dispatch:mocha-browser`
without first running `meteor add dispatch:mocha-browser`, yay!
2017-10-09 19:04:24 -04:00
Ben Newman
b5abf43616 Stop using file.imported to mark fake files in the ImportScanner.
Using a Symbol ensures compiler plugins can't mark files fake accidentally
(or maliciously) when calling inputFile.addJavaScript(options).
2017-10-09 16:45:16 -04:00
Ben Newman
7a57c5ccc2 Bump $BUNDLE_VERSION to 8.6.2 before rebuilding dev bundle. 2017-10-09 14:52:45 -04:00
Ben Newman
bc145acd77 Update internal meteor-babel to 7.0.0-beta.2-1.
cbd6bb5643
2017-10-09 14:51:25 -04:00
Ben Newman
0679e7a8bf Enable native file watching on Windows unless explicitly disabled.
Native file watching is notoriously unreliable on several Windows file
systems (e.g. NTFS, since network file systems have trouble supporting
change notifications).

However, disabling native file watching for all Windows developers was
probably a step too far, since it *could* work just fine, and we still
have the fs.watchFile-based safety net, which no longer hogs idle CPU
cycles for unchanged files.

You can explicitly disable native file watching and use polling instead by
setting METEOR_WATCH_FORCE_POLLING to a truthy value.

Should help with #9175.
2017-10-09 12:19:49 -04:00
Ben Newman
da9dac4bfc Continue polling changed files at the higher watch frequency.
Meteor attempts to use native file watchers to detect changes as soon as
possible, but we also employ an fs.watchFile-based safety net to detect
changes by polling, which adds reliability on platforms with poor (or
nonexistent) support for native file watching.

However, fs.watchFile tends to consume more idle CPU cycles when many
files are watched, so we use a relatively long (5000ms) polling interval
to watch files that have not yet been changed. After we detect the first
change to a file, we promote it to a much shorter (500ms) interval and
attempt to start a native file watcher.

Even if we were able to create a native file watcher using the pathwatcher
library, it may not fire notifications reliably on some file systems, so
this commit keeps polling changed files at the higher frequency, rather
than lowering the polling interval back to 5000ms.

The number of files the developer has changed by hand should never come
close to the total number of files watched by Meteor, so keeping them at
the elevated polling interval should pose no problem for idle CPU (#9175).
2017-10-09 12:19:15 -04:00
Ben Newman
7aeeaeb816 Fix typo in ImportScanner#_scanFile.
Introduced by 3faee05eed.

cc @cpury @JanMP
2017-10-09 09:48:29 -04:00
Ben Newman
0c7f4b89a7 Bump package versions for 1.6-rc.5 release. release/METEOR@1.6-rc.5 2017-10-08 20:04:53 -04:00
Ben Newman
b8ee80e1fc Remove target directory in files.rename to avoid Windows EPERM errors.
These errors are especially harmful because they cause files.rename to
fall back to copying rather than atomically renaming, which is both much
slower and not even remotely atomic.
2017-10-08 20:00:01 -04:00
Ben Newman
e0666e7462 Revert "Rename installPath property to absModuleId, and make absolute."
This reverts commit b9f0a54b39.

Though probably a good idea for the future, this change was not really
necessary for Meteor 1.6, and probably too risky for a release candidate.
2017-10-08 15:54:46 -04:00
Ben Newman
25e0a54d4e Bump package versions for 1.6-rc.4 release. release/METEOR@1.6-rc.4 2017-10-08 14:37:19 -04:00
Ben Newman
7bb90a3350 Adjust rate limit test timing to prevent intermittent failures. 2017-10-08 14:37:17 -04:00
Ben Newman
159ddefd1d Bump LINKER_CACHE_SALT and compiler.BUILT_BY for good measure. 2017-10-08 14:05:42 -04:00
Ben Newman
68998d3658 Merge pull request #9187 from meteor/refactor-peer-dependency-processing-and-fix-issue-9182
Refactor peer dependency processing and fix issue #9182.
2017-10-08 14:04:13 -04:00
Ben Newman
dec7aee340 Add more comments to recently-modified ImportScanner logic. 2017-10-07 14:10:37 -04:00
Ben Newman
3fad449fa8 Call _scanFile far fewer times in ImportScanner#scanMissingModules. 2017-10-07 10:11:02 -04:00
Ben Newman
badb7a7e6c Remember whether parent module of failed import was dynamic.
Fixes #9182.
2017-10-06 21:31:36 -04:00
Ben Newman
b9f0a54b39 Rename installPath property to absModuleId, and make absolute.
The `installPath` property was always essentially an absolute module
identifier that was simply missing the leading '/' character, so this
commit acknowledges that role by renaming the property to `absModuleId`
and adding the leading slash.
2017-10-06 21:31:36 -04:00
Ben Newman
4ff0318dc3 Track all failed imports separately.
Previously, if more than one module in a package tried and failed to
import the same identifier, we would record information about only the
last failed import.

This was good enough for later attempting to resolve the failed import in
other packges or the application's `node_modules` directory (a concept
known as "peer dependencies"), but it sometimes discarded information
about whether the failed imports were dynamic. In particular, if the last
recorded failed import was a dynamic import, it could accidentally render
the entire peer dependency tree dynamic.

Although it's a bit more complicated than what we did before, I believe
the simplest solution is for the ImportScanner to maintain a mapping from
failed identifiers to lists of import information objects, rather than a
single object, so that no information is lost.
2017-10-06 21:22:19 -04:00
Ben Newman
3faee05eed Simplify checking/setting file.imported in ImportScanner#_scanFile.
By checking and setting this property earlier, we can avoid scanning files
more than once.
2017-10-06 19:26:58 -04:00
Ben Newman
255732630d Merge pull request #9063 from zimme/zimme/reactive-dict
Add destroy to reactive-dict
2017-10-06 10:59:54 -04:00
Ben Newman
db500526d6 Merge branch 'devel' into zimme/reactive-dict 2017-10-06 10:59:09 -04:00
Simon Fridlund
af758c0727 Update History.md
Add note about the new api of `reactive-dict`.
2017-10-04 20:56:14 +02:00
Simon Fridlund
7e5f93355c Bump version of reactive-dict 2017-10-04 20:35:29 +02:00
Jesse Rosenberger
f7570327be Merge pull request #9169 from ecwyne/patch-5
fix typo
2017-10-04 17:52:12 +03:00
Simon Fridlund
23fad4e3e3 Add test for reactive-dict's destroy method 2017-10-04 00:51:16 +02:00
Ben Newman
158b6ceb7e Bump package versions for 1.6-rc.3 release. release/METEOR@1.6-rc.3 2017-10-03 12:13:43 -04:00
Ben Newman
87ebeec54b Detect inspector client attachment by timing debugger keyword. (#9172)
The `meteor debug` command behaves like Node's `--inspect-brk` flag, in
that it attempts to pause the server before executing any server code.

However, simply passing the `--inspect-brk` flag to Node causes execution
to pause on the very first line of code, which is not good for setting any
breakpoints, because no server code has actually loaded yet.

Instead, the `meteor debug` command uses Node's `--inspect` flag to enable
debugging without an initial pause, then manually pauses at an appropriate
moment during server startup. Ideally, the pause should last until an
inspector client has been attached to the process, at which point the
developer has a chance to set any desired breakpoints, then clicks the
continue button to proceed with server startup.

The most difficult part of this process is detecting when the inspector
client has attached. Previously, the parent process listened for the child
process to print a "Debugger attached" message to STDERR, which happens as
a result of this `fprintf` call in Native C++:
7cff6e80bf/src/inspector_io.cc (L396)

However, this message was not printed in some cases, especially on Windows
(#9165), and required inter-process communication even in the ideal case.
All of that logic is gone now, thanks to this commit.

This commit takes advantage of a difference in behavior of the `debugger`
keyword depending on whether or not an inspector client is attached. When
no client is attached, the `debugger` keyword is a no-op that takes no
time (or very little time) to execute. Once a client has attached, the
`debugger` keyword triggers a breakpoint that lasts until the developer
explicitly continues execution through the client UI. Needless to say,
this makes the `debugger` keyword take longer than a no-op.

Because the `debugger` keyword does nothing until a client connects, we
can safely poll a `pause` function containing a `debugger` keyword at a
frequent interval (say, every 500ms). Once a client connects, the
`debugger` keyword will become active, pausing the server at exactly the
point we hoped. The difference is easy to detect by timing the `pause()`
function call. Once the `debugger` keyword becomes active, we stop polling
and allow server startup to continue.

Elegant!

Fixes #9165.
2017-10-03 12:11:21 -04:00
Eric Wyne
4d4d5afb5c fix typo 2017-10-02 11:41:42 -07:00
Ben Newman
ac04df949b Bump package versions for 1.6-rc.2 release. release/METEOR@1.6-rc.2 2017-10-02 13:46:44 -04:00
Ben Newman
1a8efdc31f Merge branch 'devel' into release-1.6 2017-10-02 13:44:25 -04:00
Ben Newman
e85c69680d Combine all isopackets to share transitive dependencies. (#9168)
By my calculations, the sum of the sizes of the individual isopackets was
152MB, and the size of the combined isopacket is now just 36MB. That
remarkable difference goes to show how much duplication of transitive
dependencies was happening before this change.

That's a savings of 116MB for the (uncompressed) size of the meteor-tool
package. In Meteor 1.5.x, the meteor-tool package is about 544MB, but in
Meteor 1.6 it's considerably smaller: 373MB. In other words, this change
should reduce those sizes to 428MB (-21%) and 257MB (-31%), respectively.
2017-10-02 13:41:39 -04:00
Jesse Rosenberger
efcc6945ba Update the modules test app to Meteor 1.5.2.2. 2017-10-02 17:47:12 +03:00
Ben Newman
3be6913c4d Bump package versions for 1.6-rc.1 release. release/METEOR@1.6-rc.1 2017-09-29 18:17:09 -04:00
Ben Newman
5f7b8a9046 Bump $BUNDLE_VERSION to 8.6.1 before rebuilding dev bundle. 2017-09-29 18:08:09 -04:00
Ben Newman
dc95428ecb Merge branch 'devel' into release-1.6 2017-09-29 18:07:21 -04:00
Ben Newman
201c767b31 Merge branch 'master' into devel 2017-09-29 18:03:46 -04:00
Ben Newman
450e6b4ae0 Merge pull request #9151 from meteor/release-1.5.2.2
Release 1.5.2.2
2017-09-29 18:03:10 -04:00
Ben Newman
807bfa560c Bump package versions for the official 1.5.2.2 release. release/METEOR@1.5.2.2 2017-09-29 17:14:38 -04:00
Ben Newman
2df59ba229 Mention another 1.5.2.2 bug fix in History.md and update date. 2017-09-29 17:13:22 -04:00
Ben Newman
ee43eba7b3 Bump package versions for 1.5.2.2-rc.1 release. release/METEOR@1.5.2.2-rc.1 2017-09-29 14:09:16 -04:00
Ben Newman
4420e4526f Bump $BUNDLE_VERSION to 4.8.41 before rebuilding dev bundle. 2017-09-29 13:51:51 -04:00