Commit Graph

5099 Commits

Author SHA1 Message Date
David Greenspan
02fccd56d8 Merge remote-tracking branch 'origin/devel' into blaze-templates
Conflicts:
	docs/.meteor/versions
2014-08-26 12:34:36 -07:00
David Greenspan
6945e82d4a Fix originally intended use of _skipNodes 2014-08-26 12:33:03 -07:00
Matthew Arbesfeld
118ba8c01a Fix for autoupdate refresh not firing on initial document
If you have an old version of the app loaded, startup won't
pick up the new version.
2014-08-26 11:53:52 -07:00
David Glasser
24b468fe88 autoupdate_client improvements
- use observe instead of observeChanges so that assets is there even if
  not changing

- protect against nonexistence doc.assets
2014-08-26 10:10:59 -07:00
David Glasser
2732de966d Merge branch 'master' into devel
Conflicts:
	History.md
2014-08-26 08:09:22 -07:00
David Glasser
6cf7addcdc rc22 2014-08-25 22:50:33 -07:00
David Glasser
0030c3a1d7 rc21 2014-08-25 21:23:49 -07:00
David Glasser
5c5092eeae Test for bfb8359
This only tests the resolver part of the change, not the change that
gets the right data from "meteor add" into the solver.
2014-08-25 21:05:12 -07:00
David Glasser
bfb8359499 Only choose prerelease package versions if asked
Make sure 'meteor add foo' gives the same constraint to the solver as
'foo' from .meteor/packages: namely, '>=0.0.0' not
'unconstrained' (since the first rules out rcs and the second doesn't)
2014-08-25 19:57:28 -07:00
David Glasser
521f724e16 bump, rc20 2014-08-25 17:39:39 -07:00
David Glasser
23a57a9648 bump tool version again 2014-08-25 17:27:07 -07:00
David Glasser
96e606ab89 bump tool version 2014-08-25 16:47:37 -07:00
David Glasser
4e017c5938 rc18 2014-08-25 14:33:52 -07:00
David Glasser
f0890205ae rc16 2014-08-25 14:17:56 -07:00
David Glasser
6c7a29683c rc15! 2014-08-25 14:06:50 -07:00
Mitar
a7f5f0fa15 Typo. 2014-08-25 00:16:25 -07:00
David Glasser
a51212d75f Merge branch 'release-0.9.0' into devel 2014-08-25 00:15:25 -07:00
David Glasser
0542a3a9ea 0.9.0-rc13, now on METEOR@ 2014-08-24 21:21:09 -07:00
David Glasser
058f7e3a70 Merge branch 'release-0.9.0' into devel 2014-08-24 18:29:49 -07:00
David Glasser
e07aedb0fa Don't pin packages we're trying to upgrade
Now meteor update will actually upgrade the packages it's trying to
upgrade
2014-08-23 15:05:59 -07:00
David Glasser
75310c9493 vbump for rc12 2014-08-22 19:07:01 -07:00
David Glasser
f9744e5d93 Reduce size of less module by 60% 2014-08-22 18:32:00 -07:00
Mitar
5853f2aefd Allow OAuth1 callback to specify query string parameters.
They are then parsed and provided to underlying HTTP package. We have to
parse them so that signing of requests works properly. In addition,
nonce used in the request is stored in the response so that user can
verify JWT payloads returned from the server.
2014-08-22 08:55:32 -07:00
David Glasser
ff63e4fdb6 Revert "Lower version numbers of some third-party packages"
This reverts commit 080f6f60dd.

Unfortunately, this broke all packages that were published with
`api.versionsFrom('METEOR-CORE@0.9.0-atm')` that used one of these
packages.
2014-08-22 02:15:03 -07:00
David Glasser
55d1901729 Remove dormant "no-downgrade constraint" code
Also removes 'update --minor' and 'add --force'.

In the constraint solver, previousSolution (ie, .meteor/versions) was
intended to be used for three purposes:

  (a) The *heuristic* used in the state graph walk to decide what state
      to look at next:
       - VERY STRONGLY prefers not to downgrade *root* dependencies or
         change them to incompatible newer versions
       - Kinda Strongly prefers not to upgrade root dependencies far
       - mildy prefers not to change transitive dependencies (in any
         direction)

  (b) Actual *constraints* are added to the set of constraints we are
      trying to solve, which state that *root* dependencies are not
      to be downgraded.  Additionally, in most invocation contexts,
      constraints are added that say that *root* dependencies are
      not to be upgraded to incompatible versions (1.3.0 -> 2.0.0).
      The only contexts that lack the secondary constraints are
      part of 'update --minor', and 'add --force'.

  (c) A more recent change (past few weeks): When running the constraint
      solver, we actually run the core constraint solving algorithm
      twice. The first time, we add *equality* constraints for all
      of the previous versions.  If that succeeds, great!  We're not
      changing any versions (we may add packages that we didn't have
      before or drop packages that are no longer needed, though).

      Otherwise, we run the constraint solver again without the equality
      constraints.

However, due to a bug introduced in May in 0760ffbc36, (b) actually
*never happened*.  The commit was the one that intended to make the
(b) constraints only be for root dependencies. But the line:

     if (! _.contains(dependencies, uv.name))

is comparing 'uv.name' (something like 'foo#web.browser') to
'dependencies' (a list of things like 'foo'). So in fact, it thinks that
no dependencies are root and doesn't apply the constraints.

That's actually good, because this code is used in many more places than
just 'meteor update', and applying these things as strong constraints
would actually be problematic; eg, it would break 'meteor --release
slightlyolderrelease'!

In addition, the `update --minor` flag was actually not implemented (it
was not in the command declaration).

So for now, we're removing this dead code.  We may reintroduce 'update
--minor' or 'add --force' later.  We trust that the heuristic will do a
decent job of preventing unnecessary downgrades or incompatible upgrades
while still allowing you to run updates to an older version, eg.

(And in the future, we may change 'meteor update' to use the constraint
solver to figure out which release to update to, rather than going for
the latest one that there exists any solution for.)
2014-08-21 23:20:17 -07:00
David Glasser
f986056d0c Merge branch 'release-0.9.0' into devel 2014-08-21 19:26:29 -07:00
David Glasser
53a844770f version bump for rc11 2014-08-21 18:45:08 -07:00
David Glasser
990e0fd21b Merge branch 'release-0.9.0' into devel 2014-08-21 17:57:47 -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
Justin SB
13aab9244c Cleanup xUnit output
We weren't properly detecting exceptions from tests
2014-08-21 16:41:53 -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