Specifically, don't watch until after serverHandle points to the NEW
process. This way, if the watcher files, we are sure to kill the new process,
not fail to kill it because serverHandle is still pointing at the old process or
no process. The old behavior led to sometimes failing to kill the server; while
it would eventually die due to failed keepalive, the new servers would also fail
due to EADDRINUSE.
This change is possible because unlike the only dependencyInfo, WatchSets are
completely self-contained (there's no "... and it should look like it did the
first time" involved).
While we're at it, make restartServer always stops the watcher, and clear some
variables after they're used.
Fixes#1247.
We call these the pluginProviderPackages because these are the packages that, if
they change, could affect the set of plugins available to this package (and thus
require it to be rebuilt).
In fact, each slice's dependencies already contains pluginDependencies (see
after the linker.prelink call in Slice.build, and recall that a package's
plugins are always active in itself).
This makes saveAsUnipackage -> initFromUnipackage less lossy. Also means that,
eg, plugins don't end up dependent on tests in packages they use.
Use of the json file path as the key in sliceDependencies is kind of hacky, but
I'm viewing buildinfo.json as less of a standardized format as unipackage.json.
That's because this change could introduce or remove a plugin, which affects how
the dependent package is built (eg, could change an extension between being
handled vs static).
Does not affect transitive dependencies.
.meteor/packages in new apps now contains "standard-app-packages", which implies
the standard set of packages like mongo-livedata. There is no special-casing in
initFromAppDir. This line has been added to all the examples, etc.
There's a new concept of "upgraders". "meteor run-upgrader app-packages" will
add standard-app-packages to the app, as well as all of the package in the app's
packages/ directory (an unrelated change since 0.6.4). This will be integrated
soon with "meteor update"; run-upgrader is essentially for testing.
project.add_package no longer adds packages that are already there.
This implies that all exports are package variables, which made underscore,
jquery, and htmljs (which explicitly assigned to fields on the global variable)
break. We now properly encapsulate these packages (except for window.jQuery,
which we let sneak out because bootstrap wants it). This means that packages
that want _ need to use underscore, and packages that want $ need to use jquery.
Also, you can't use _ in minimongo $where any more (matching mongod).