The test was failing because it was written to run against the real
local warehouse, instead of a stubbed one. When initializing the
Sandbox with an explicit warehouse, the test failed because of
incorrect logic piping the right path to the packages database
(in this case "test-packages.data.db" instead of "packages.data.db").
Unfortunately, the test still fails -- this time potentially due to a bug:
After publishing the package for the first time with `--create`,
the next step tries to update but gets the following error:
There is no package named test:i1iyhj. If you are creating a
new package, use the --create flag.
If we don't clean up the tarball, then the following command (`meteor
build`) fails ("Couldn't create tarball"), but for some reason still
exits with code 0. So we then go on to successfully untar the output of
`meteor build`. If we clean up the tarball from `meteor bundle`, we at
least catch the failure by trying to untar a nonexistent file.
The client cache in sql-land was broken: it sent over the wrong sync token as the default.
This meant that the server thought that this was a much older client. As a result, any
0.9.3+ packages with '_' or '||' in their versions/dependencies were filtered out. There is no
easy way to undo that sort of filtering without deleting the db for a variety of reasons, and if
we are going to delete the db, we might as well increment the version so we don't have to worry about
consistency.
If we fail to install one plugin, then we uninstall all plugins to avoid
awakening the Cordova monsters. Previously, this test was passing
because we were passing a `--settings` argument, which was allowing the
facebookconnect plugin to install, but the build to fail to other,
not-understood reasons. Now that we've removed `--settings`, the plugin
fails to install, which means that all plugins get uninstalled.
Test passes now.
If we fail to install one plugin, then we uninstall all plugins to avoid
awakening the Cordova monsters. Previously, this test was passing
because we were passing a `--settings` argument, which was allowing the
facebookconnect plugin to install, but the build to fail to other,
not-understood reasons. Now that we've removed `--settings`, the plugin
fails to install, which means that all plugins get uninstalled.
Test passes now.
(still outstanding: changes to package publication workflow)
A package marked debugOnly in the package source is not to be bundled in production.
Moreover, if a package/app depends on a debugOnly package, that entire tree should
not be bundled. (But we should take it into account when figuring out versions!)
Does the following:
- In the catalog, we have a function that takes in a set of versions and a set of original
constraints and traverses it, recursively, to build a subset of versions that we *should*
bundle, and the corresponding subset of versions that we shouldn't (because they are either
debugOnly themselves or pulled in by debugOnly packages). (We do this in the catalog because
it is an addon onto the results of the constraint solver, tied deeply into our representation
of data)
- In the packageLoader, we keep track packages & versions that we should bundle, and also,
packages that we should exclude. We do this in the package-loader because, essentially, that's the
object that we use to keep the results of the constraint-solver, and we already propagate it to all
functions that care about it. (Possibly we should subsequently rename it later).
- In the compiler, when we figure out buildTimeDependencies, we ask if we need to bundle debug
builds. If not, we filter them out (see above). Also, when we actually build together unibuilds,
we don't touch the ones that the packageloader tells us to exclude (which ensures that they don't make
it into the final product).
- In the project, we keep track of whether this project is building in debug mode. That's because the project
is where we keep the state of our curent project that we are building, and if we are ever in the state of
building multiple things, then that's the code that we would need to touch (see also that we make a similar
assumption when solving constraints).
- Adds the option to keepthe project debug-build-free and calls it in commands when approporiate.
* --port now requires a port ('meteor run --port example.com' isn't valid).
* --mobile-server defaults to your detected IP address and the port from
--port.
* If you provide a value for --mobile-server, we default to http:// as
the protocol. A host is required for --mobile-server if you don't omit
the option entirely. Similar for the --server argument to 'meteor
build'.
This commit includes the 'netroute' npm module as a core package (which
has binary dependencies) for IP detection. It would be nice to put it in
packages/non-core, but I think it has to be a core package in order to
uniload it.