Actually verify that uniloaded packages are in the list. Add missing
'ejson'. Remove (ah well) test that relies on ability to uniload an app
package (which shouldn't work anyway, but it would be nice to test
uniload Assets...)
We're going to make uniload use a different flavor of "complete" catalog
soon. So we need to reduce the number of singleton-ish references to
it.
Also, we need one PackageCache per catalog, so stop it from being a
singleton too.
Also eliminated arguments that weren't used anywhere,
and removed an XXX comment that was false (recordPackages
doesn't use buildmessage to report connection failures)
Many of these (mostly in top level commands in commands-packages.js) are
not super well thought out: they use a new "doOrDie" helper to run some
function in a capture and exit if there are any messages. We really
need to get a little more thoughtful about the big picture of error
handling (combining "build" errors, network errors, catalog errors,
etc). But this at least allows the addition of more buildmessage
assertions.
At the very least, this ensures that if you edit a package.js in a local
package while "meteor run" is running, that instead of crashing the tool
it properly shows the buildmessage and lets you fix the issue.
If Autoupdate.autoupdateVersion is set outside of the Autoupdate
package, we wouldn't notify the client of the new version. This
patch simplifies the updating logic by only having one document
per version type.
If we ever load javascript (uniload load or package.js parse) outside of
a buildmessage job and there's a syntax error, FancySyntaxError gets
thrown instead of properly processed. Now, we shouldn't do that (we
should only load JS inside a buildmessage job!) but our codebase isn't
currently up to that standard, so at least ensure that there's some
level of useful syntax error (albeit with an ugly internal stack trace
attached) in this case.
Before, there were some random contexts (like 'test-packages') which
didn't print downloads. Now, the default is printing, and the exception
is the automatic background updater.
(Some of these bulk contexts should probably set silent and print their
own progress bar. And maybe even do paralellism...)
Generally clean up the tropohouse.maybeDownloadPackageForArchitectures
interface. Change it to take options, remove the vestigial return
value (though really, there needs to be better error handling...)