Commit Graph

5040 Commits

Author SHA1 Message Date
David Glasser
53a844770f version bump for rc11 2014-08-21 18:45:08 -07:00
David Glasser
ceb8be5776 Remove distracting #web.browser from CS errors
You can get them back with $METEOR_SHOW_UNIBUILDS.
2014-08-21 17:53:37 -07:00
David Glasser
5295907f99 Make unknown package failure better
We throw a better (eg, constraintSolverError-tagged) "package not found"
at the appropriate spot later.
2014-08-21 17:47:00 -07:00
David Glasser
628be93f61 fix tests that tested lies! 2014-08-21 17:09:23 -07:00
David Glasser
5d5d1876da De-dup package name/constraint parsing code
Now we can all any of them from even before uniload is ready in the tool

I <3 symlinks
2014-08-21 17:00:21 -07:00
David Glasser
5bc415c51a Improve package name/version parsing errors
We now throw more specific errors, consistent between both tools and
package-version-parser (copy-and-pasted code, sadly, but we really do
have to make this check before uniload-from-checkout).
2014-08-21 16:21:12 -07:00
Justin SB
625a87fe19 Avoid passing empty options, and defend against it if we do 2014-08-21 12:01:23 -07:00
David Glasser
c926cf01f0 Cache minimal constraint versions 2014-08-21 11:39:01 -07:00
David Glasser
aa53f0bfd2 Simplify ConstraintsList data structure
It now no longer has N nested 2-element hashmaps; the 2-element split
happens at the top level in the JS object.  And a nested hash_map is now
just a set (it's great that we can rely on the interned-ness of
constraints!)

8% benchmark speedup and less code.
2014-08-21 11:31:27 -07:00
David Glasser
05b6277c97 delete unused field 2014-08-21 10:52:05 -07:00
David Glasser
ff3d3d0e82 delete unused methods 2014-08-21 10:51:00 -07:00
David Glasser
13f82bb09d Keep alternatives sorted
Instead of recalculating the "edge versions", just keep the list of
alternatives for each dep sorted and look at the first and last.

Provides another 25% speedup to the benchmark, deletes a lot of
code, *AND* removes the one part of the constraint solver that tries to
have a deep understanding of the different constraint types other than
the "is this constraint satisfied" function (ie, makes it easier to add
more constraint types later).
2014-08-21 10:45:44 -07:00
David Glasser
374c1cda45 Simplify "make trivial easy choices immediately"
Instead of having two different spots where we do special checks to see
if a piece of the state might have only one alternative, we just ensure
that the ResolverState itself always eagerly converts one-alternative
dependencies into choices.
2014-08-21 02:40:02 -07:00
David Glasser
75fcdf5d3e Refactor ConstraintSolver.Resolver
Factor out the "state" into its own class, ResolverState.  The big
difference from the previous state object: it actually explicitly tracks
the set of potential UnitVersions for every active dependency.  This
essentially replaces the DependencyList class.

Because we always know exactly how many options there are for a given
dependency, we can both generalize and simplify the "propagate
transitive exact deps" optimization.  That optimization only worked on
"foo@=1.2.3" dependencies, which meant it didn't apply in any other
situation where there was only one possible package to choose. But there
are a whole lot of other situations like that: local packages, packages
that just don't have many versions, packages that already have a lot of
constraints applied to them, etc.  By tracking the set of potential
alternatives, we can just make sure to always expand 1-alternative units
first. We also maintain the aspect of the optimization where we don't
need to call the cost function until we've actually gotten to a state
with multiple neighbors.

This keeps #2410 fixed as well.

I've removed the constraintAncestor support as part of this refactoring,
so some error messages may be worse than they were before. But this
should set me up pretty well to improve error messages tomorrow.
2014-08-21 01:28:55 -07:00
David Glasser
6e325247d5 Prefer to explore local packages first
(Or other packages where there is literally one version in existence.)
2014-08-20 23:21:30 -07:00
David Glasser
e98cd49b3b A more specific error for nonexistent package
This helps with #2410 though that particular case doesn't work since
paths are explored in a bad order.
2014-08-20 23:21:30 -07:00
David Glasser
eb101e90b8 Also use mori for choices
Now there's no _.clone in resolver.js!
2014-08-20 23:21:30 -07:00
David Glasser
8d72be167b track ancestry as chain, not just root
switch constraintAncestor to be a nested mori.hash_map/mori.list
2014-08-20 23:21:30 -07:00
David Glasser
080f6f60dd Lower version numbers of some third-party packages
We haven't yet decided how we want to do versioning for packages that
mostly just wrap non-Meteor code that has its own version numbers. We
might stick to totally-unrelated version numbers (and maybe add a
"wrapped version" field that gets displayed in the upgrade/downgrade
messages?), or change to matching upstream versions (with techniques for
dealing with changes to packaging, a la debian_revision), or something
different.

But since changing to match upstream versions is a possibility, let's
make sure that that operation won't be viewed as a "downgrade" by
updating the wrapped packages whose upstream versions are 0.*.
2014-08-20 17:14:57 -07:00
David Glasser
0bc445e8d2 Make slow operations more bearable with Patience
Introduces a "Patience" class which lets CPU-bound operations like the
constraint solver yield every so often, and print messages if an
operation (CPU-bound or not) are taken or not.
2014-08-20 15:49:58 -07:00
Emily Stark
4ce2888596 Change meetup /members URL.
Apparently secure.meetup.com doesn't work anymore.
2014-08-20 11:53:03 -07:00
David Glasser
2866a2018f version bump for rc10 2014-08-19 17:31:18 -07:00
David Glasser
fceacf2885 Use 15-second timeout for service connections
This should reduce failures to send package stats.
2014-08-19 12:41:00 -07:00
David Greenspan
63f984c5e5 Fix stack trace fix after testing in Safari 2014-08-19 11:08:13 -07:00
David Greenspan
187c86b3e5 Improve Deps error reporting for Cordova
In Chrome, the built-in, non-standard property `e.stack` starts with `“Error: ”+e.message`.  So we said `(e.stack || e.message)`.  However, in Cordova, e.stack does not include e.message.  So detect whether e.stack includes e.message or not and act accordingly (to avoid losing the message or printing it twice).

Also add some comments and stop printing “Exception from Deps afterFlush function function”.
2014-08-19 10:56:19 -07:00
David Glasser
d8ff20103d version bumps (pre rc10)
We'll make rc10 tomorrow, but I want to build a release just to play
with built releases again.
2014-08-18 20:48:43 -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
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
87b3748ec5 node ddp client: send errors to disconnect event
this includes the timeout one
2014-08-17 20:30:34 -07:00
David Glasser
b4039173a6 Status shouldn't be "waiting" unless we will retry 2014-08-17 20:19:57 -07:00
David Glasser
2115eed79a Revert "include a backtrace for "got open from inactive""
This reverts commit 4378d9f5d0.

The previous commit switches to a version of Faye which fixes the bug
that causes this error to be thrown.
2014-08-17 20:16:54 -07:00
David Glasser
6aae5086e5 Switch to a fork of faye fixing close-before-start
This should stop all the "Got open from inactive client" errors.
2014-08-17 20:15:32 -07:00
David Greenspan
e897539adb Work-around for Safari JIT bug 2014-08-16 20:39:24 -07:00
David Greenspan
b5715a9621 Stop trying to fetch an MP4 file in tests
We test event capturing using the <video> “play” event, because it is a non-bubbling event native to modern browsers.  We previously had the src URL be a video on the Internet, but even if the video could not be accessed, the test still seemed to work.

So now set the “src” to “”.  Seems to work in IE 9, Firefox, Safari, Chrome.
2014-08-16 11:21:45 -07:00
David Greenspan
7981f17af1 Make “same input.value” test work in IE 8 2014-08-16 11:04:43 -07:00
David Greenspan
0c9d5337aa Improve test driver progress bar CSS
Keep the label from moving with the progress bar in Firefox
2014-08-16 11:04:43 -07:00
David Glasser
56f96cc6df First try locking all previousSolution versions.
This is how some of us thought previousSolution already worked.
2014-08-15 22:42:09 -07:00
David Glasser
f39a820d96 Don't parse '@>=' ranges by default
They are still used internally by the constraint solver (to implement
update --breaking) but cannot be externally specified.

Also, stop supporting "@none", whatever that was.
2014-08-15 22:12:04 -07:00
David Glasser
e06c091652 Fix constraint solver tests 2014-08-15 21:46:13 -07:00
David Glasser
66ea15a9f3 Fix c.upsert with no callback from the client
Fixes #2413.
2014-08-15 17:53:07 -07:00
David Greenspan
7e44526ab9 Test for Avi’s fix to input elements (c2cf671)
Needs IE 8 version of test
2014-08-15 17:12:46 -07:00
Matthew Arbesfeld
67aee54c6a Remove the refreshable fields from autoupdate docs because they are no longer used 2014-08-15 16:30:56 -07:00
Matthew Arbesfeld
da08cc421e Fix autoupdate to ship autoupdateVersion to the client 2014-08-15 15:59:14 -07:00
David Glasser
bc6239dfc1 vbump for rc9
Hopefully we won't have to do "bump for all the npm modules" again after
this
2014-08-15 12:34:47 -07:00
Avital Oliver
c2cf67179f Blaze: Don't update input elements if their value doesn't need updating
This resolves #2403. Specifically, if you implement some form of
two-way databinding, and you modify an input field in some way
other than adding characters to the end, the insertion point
jumps to the end.

Still need to write a test for this.
2014-08-15 11:50:31 -07:00
ekatek
328ecb4d98 a lot of minor fixes that manifested as weird CS behavior 2014-08-15 14:27:22 -04: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
a9db15a9e6 vbump for 0.9.0-rc8 2014-08-14 12:02:08 -07:00
David Glasser
2a598ef56c vbump rc7 2014-08-13 18:15:47 -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