Files
meteor/tools
David Glasser cec75e527c constraint edges are by package, not unibuild
Consider the following situation:

  - app uses package P
  - Every version of P contains `api.use('s', 'server')`
  - Every version of S contains `api.use('c', 'client')`
  - There's nothing else around using S or C

When we bundle our app, we will not end up putting any unibuilds from C
into the bundle. That's fine.

The previous version of the constraint solver understood this, and so C
wasn't even part of the constraint solver solution.

HOWEVER, even though C does not contribute any unibuilds to the app
bundle, we still need to compile C in order to compile S. That's because
our current implementation never compiles only part of an isopack, even
if only part of the isopack will be needed for the app.

The structured project initialization done via ProjectContext will thus
decide to not build or load C, which will make it fail to compile S when
it gets around to compiling the client unibuilds in S.

We could make the model more complex by making it possible to compile
only part of S.

Instead, we'll make the Meteor package model simpler.  Constraints, as
far as the constraint solver is concerned, are now at a package level.
So in this case, "C" will actually be part of the project (will end up
in .meteor/versions, etc) even though it will continue to not provide
any part of any of the bundled client or server programs.

This means that nodes in the constraint solver's graph will now just be
package versions, not unibuild versions.  That's already the language
that the constraint solver spoke in as far as its inputs, outputs, and
error messages were concerned!

An example of an app that couldn't be built on the isopack-cache branch
before this commit and can be now is
  https://github.com/glasser/precise-constraints-example
(It can be built with 1.0, but only by compiling a version of `c` that
isn't part of .meteor/versions!)

Note that this also means that .meteor/versions expresses enough to
allow us to implement a simpler constraint check that doesn't need to do
the full tree walk of the constraint solver.  Such a checker would be
implemented as:

  - gather root dependencies and constraints (project constraints,
    release constraints, etc)
  - add the dependencies and constraints from all versions mentioned
    in .meteor/versions
  - see if the choices made in .meteor/versions satisfy these
    dependencies and constraints

This algorithm did NOT work previously, because you couldn't just look
at the constraints coming from `s@0.0.0` and say "they're satifisfied"
because you had to know to "ignore" the constraint on c#web.browser
because s#web.browser is not part of the app, which is not a fact that
actually got recorded in .meteor/versions.

(This commit does not implement this simpler constraint check, though.)
2014-11-22 14:20:39 -08:00
..
2014-09-30 19:25:35 -07:00
2014-03-05 23:33:06 -08:00
2014-11-12 17:13:41 -08:00
2014-11-12 17:13:41 -08:00
2014-11-17 08:42:29 -08:00
2014-11-16 17:50:52 -08:00
2014-08-04 19:03:05 -07:00
2014-11-07 16:45:58 -08:00
2014-09-29 22:50:49 -04:00
2014-11-07 16:45:59 -08:00
2014-06-17 17:33:55 -07:00
2014-06-13 17:14:42 -07:00
2014-11-07 16:45:59 -08:00
2014-11-07 16:45:59 -08:00
2014-10-23 16:15:45 -07:00
2014-11-07 16:45:58 -08:00
2014-11-22 11:17:21 -08:00
2014-11-12 17:13:41 -08:00