Commit Graph

1997 Commits

Author SHA1 Message Date
David Glasser
69cf01a138 don't leak readstream 2014-08-18 20:11:47 -07:00
David Glasser
883fc8516d files.OfflineError prettier than [object Object]
(It should also be caught at every httpHelpers.getUrl call and handled
properly, but this is a start.)
2014-08-18 20:10:52 -07:00
David Glasser
196089ae33 package-client: Help users without usernames
- If they're in deferred-registration state, give them their
  registration link and exit.

- Before running the login prompt, mention that it's a Meteor developer
  account which you can sign up for on www.meteor.com.
2014-08-18 19:13:06 -07:00
David Glasser
9054effdeb Fix ServiceConnection DDP negotiation
Now ServiceConnection's guarantee is that once a DDP connection is
successfully negotiated, it won't restart. This relies on the assumption
that the only use of reconnect({_force: true}) is DDP protocol
negotiation!

Drop some unnecessary (and flawed, for this application) `disconnect`
stream events.

Also, remove some unnecessary `new` calls.

Fixes 'meteor mongo some-galaxy app'.
2014-08-18 17:09:04 -07:00
David Glasser
f3085db2d2 Work around a node-tar bug
See https://github.com/npm/fstream/issues/26
2014-08-18 15:10:15 -07:00
David Glasser
4ac638d60b oops, didn't mean to add blank line 2014-08-18 00:32:15 -07:00
David Glasser
558fb92651 state that package stat error is only in checkout 2014-08-18 00:31:12 -07:00
David Glasser
4af87eadb1 old test app version bump (this is silly) 2014-08-18 00:28:37 -07:00
David Glasser
73b33ee4da note about why official.refresh uses buildmessage 2014-08-18 00:28:23 -07:00
David Glasser
08a6fa99fd Don't use _.once or instanceof with uniload
_.once has the problem that if you call the once'd function while it is
still in progress (re-entrantly or in another Fiber), it returns
undefined immediately.  That's bad for uniload! uniload already has a
cache, so just use that.  (In the future, perhaps detect an attempt to
uniload something that's currently in the process of being uniloaded in
another fiber and block until the other fiber is ready.)

Using instanceof with things you've uniloaded is a little sketchy: maybe
two different uniload calls will end up with two different copies of
Package.meteor.Meteor.Error, and it seems kind of hairy to ensure you're
not mixing and matching copies.  However, Meteor.Errors are all tagged
with a string errorType, which fills me with much less fear,
uncertainty, and doubt than instanceof.
2014-08-17 23:37:38 -07:00
David Glasser
acd5e0b04c remove deprecated release option from uniload.load 2014-08-17 23:33:06 -07:00
David Glasser
9427c803e1 fix report-stats test again 2014-08-17 23:12:03 -07:00
David Glasser
3b3e8d7b93 Simplify ServiceConnection.
- ServiceConnection should never try to reconnect. It's already the case
  that we don't hold open ServiceConnections over long periods while
  idle; it makes the class much simpler if it corresponds to a single
  TCP connection. This also means that as soon as we have one connection
  failure (eg you're offline) we can fail instantly instead of retrying
  pointlessly.

- Drop the explicit timeout code in ServiceConnection. There's already
  timeout handling in stream_client, and now that we don't retry, it
  actually takes effect.

- Be more rigorous about uses of Future in ServiceConnection. Ensure
  that each Future is only used once (ie, avoid "Future resolved more
  than once" errors).  Hopefully fixes #2390.

- ServiceConnection constructor now blocks until it's connected (and
  throws if there's a connection failure).  Maybe this introduces a tiny
  bit more latency to the connection, but it makes it much easier to
  handle errors properly.

- In packageClient.handlePackageServerConnectionError, show the error
  message corresponding to the connection failure.

- In Node, the (newish) error passed to the Stream callback is now a
  "DDP.ConnectionError" object. We can detect this in the tool (and we
  don't even need to do some complex uniload/instanceof dance, since
  error classes made with Meteor.makeErrorType label themselves with a
  string errorType).  We also no longer have a special
  ServiceConnection.ConnectionTimeoutError.
2014-08-17 21:34:57 -07:00
David Glasser
8a262adc97 Close stats server connections after using them
Notably, we were leaking a (DDP/https/TCP) connection for every restart
in 'meteor run'.
2014-08-16 16:07:28 -07:00
David Glasser
149fbe942c get old cli tests passing for me 2014-08-16 10:23:35 -07:00
David Glasser
04ba193ee4 oops, re-initialize resolver after refresh
Fixes "TypeError: Cannot call method 'resolve' of null", caught by
cli-test.  Gets cli tests closer to passing.
2014-08-16 10:23:18 -07:00
David Glasser
eb0626a0a7 fix report-stats test from checkout
You'd think that when making a commit with a name like 'fix
reports-stats test from release', this "glasser" fellow would consider
checking to see if he broke the other use case, but that's apparently
too much to ask.
2014-08-16 10:04:00 -07:00
David Glasser
1e384092c3 fix --slow report-stats test (broken by 66f21a6) 2014-08-16 10:03:32 -07:00
David Glasser
45de1ee51b Pass ignoreProjectDeps through one other layer 2014-08-15 21:41:11 -07:00
David Glasser
5dc428a915 Only rebuild npm modules on major/minor Node bumps
This means that we won't have to bump the version number of every
npm-using package every time we do a patch update of Node. (Though we
will have to do it right now, once.)  (That's because the .node_version
file is part of the package's contents... which is semantically
correct.)
2014-08-15 12:11:42 -07:00
ekatek
c3f7688663 oops, process exact constraints correctly in list 2014-08-15 15:01:25 -04:00
ekatek
328ecb4d98 a lot of minor fixes that manifested as weird CS behavior 2014-08-15 14:27:22 -04:00
David Glasser
98b2885e85 Revert "Upgrade Node to 0.10.30. Fix npm bug again."
This reverts commit 56ff54b085.
2014-08-15 07:21:24 -07:00
David Glasser
aa8e237194 remove redundant _recomputeEffectiveLocalPackages
(from initialize)

Also, simplify unbuilt logic and ensure that some more data structures
are cleared on refresh.
2014-08-14 16:38:25 -07:00
David Glasser
5c5c5308de missed one 2014-08-14 16:37:47 -07:00
David Glasser
44bcae916d release metadata is in official only
The point of the other catalogs is to allow local packages to override
server packages. This has nothing to do with releases. So rather than
keep release metadata in memory multiple times and force developers to
wonder "what's the different between catalog.complete.getReleaseTrack
and catalog.official.getReleaseTrack?", now it really just only exists
on catalog.official.
2014-08-14 16:24:16 -07:00
David Glasser
924195b224 app versions bump, grr 2014-08-14 16:17:00 -07:00
David Glasser
29357964dc Comment about nodeModulesDirectories structure 2014-08-14 16:15:23 -07:00
David Glasser
401cee2ef6 Lazily load constraint-solver instead of its mori
This should be a performance win (no need to load constraint-solver
unless you actually need to use it!), and it's what I wanted to do
initially instead of lazily loading mori, but it wasn't feasible with
the old super-recursive catalog.

This fixes an issue where running 'curmeteor rebuild' twice (!) died the
second time with a "Can't load npm module 'mori'" error. This is because
uniload (when run from a checkout) sets up Npm.require to read directly
from PACKAGE/.build.PACKAGE/npm/node_modules, which might get deleted
later in the process!  There are some complex and maybe slow ways to
resolve this general issue (copy the node_modules somewhere else?) but
for now, the easiest way to avoid the issue is just to load Npm modules
immediately inside packages which need to be uniloaded.
2014-08-14 16:12:05 -07:00
David Glasser
cf17ef3bf4 some further catalog/uniload cleanup
- The checkout catalog.uniload now does not uniload a resolver, and
  instead just has a trivial implementation of resolveConstraints.
  (The 'built' catalog.uniload already didn't use the resolver.)

- catalog.complete.resolveConstraints now throws an error if there's
  no resolver; this is OK, because creating the resolver now only
  uses the distinct catalog.uniload, so there's no recursion issue.

- don't record version dependencies in packages during uniload (this
  protects against using release.current before it is initialized)

- PackageLoader should never download packages during uniload (this
  protects against using catalog.uniload.isLocalPackage before it is
  initialized)
2014-08-14 14:29:18 -07:00
David Glasser
987b5dd42d Merge branch 'upgrade-node-fix-npm' into devel 2014-08-14 11:41:01 -07:00
David Glasser
9c1afcf0b9 Unbreak springboarding, oops. 2014-08-14 11:34:27 -07:00
David Glasser
56ff54b085 Upgrade Node to 0.10.30. Fix npm bug again. 2014-08-14 10:15:47 -07:00
David Glasser
e3771dd098 add an XXX about a minor inefficiency 2014-08-13 18:33:32 -07:00
David Glasser
c9488c74d0 versions update 2014-08-13 18:11:46 -07:00
David Glasser
925758603e avoid reentrant complete refreshes 2014-08-13 18:11:46 -07:00
David Glasser
7743a55bba Use official catalog for springboarding
Read it into memory at initialize time
2014-08-13 18:11:46 -07:00
David Glasser
f946ff9054 uniload from checkout uses separate catalog 2014-08-13 18:11:46 -07:00
David Glasser
2755f95bb6 Move uniload package list to uniload.js
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...)
2014-08-13 18:11:46 -07:00
David Glasser
ebab3ec902 don't run git if there's a colon 2014-08-13 18:11:46 -07:00
David Glasser
9e55a23541 replace uniloadDir hack with BuiltUniloadCatalog
this only affects built meteor for now
2014-08-13 18:11:46 -07:00
David Glasser
b6955a3899 Move towards non-singleton catalog.complete
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.
2014-08-13 18:11:46 -07:00
ekatek
9a1cb5d296 maybe filter out old versions in show too 2014-08-13 20:48:28 -04:00
Matthew Arbesfeld
c9476a350f Fix typo in autoupdate and bump autoupdate package version. 2014-08-13 17:36:12 -07:00
ekatek
25328f1298 init options if blank 2014-08-13 19:00:16 -04:00
David Glasser
4ac78a3646 Move DEFAULT_TRACK to catalog module
It's a constant, so no need to have to think "hmm, I wonder if I should
be writing catalog.official.DEFAULT_TRACK or
catalog.complete.DEFAULT_TRACK?"
2014-08-13 15:39:03 -07:00
ekatek
dfd1fbcb22 be more tolerant of unknown keys and some cosmetics 2014-08-13 17:45:27 -04:00
ekatek
f9131da440 some safety cosmetics around meteor create --package 2014-08-13 17:45:27 -04:00
Avital Oliver
aff7dfdb50 Record package usage on meteor bundle
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)
2014-08-13 13:57:08 -07:00
ekatek
889cc75a1d when updating an app that runs from checkout, default to default release track 2014-08-13 16:56:42 -04:00