Commit Graph

43 Commits

Author SHA1 Message Date
David Glasser
5590d194c5 debug-only flag only affects bundler, not compiler 2014-10-07 18:26:21 -07:00
ekatek
e0414f2ed5 allow user to mark packages as debugOnly and not have them bundle in production mode
(still outstanding: changes to package publication workflow)

A package marked debugOnly in the package source is not to be bundled in production.
Moreover, if a package/app depends on a debugOnly package, that entire tree should
not be bundled. (But we should take it into account when figuring out versions!)

Does the following:

- In the catalog, we have a function that takes in a set of versions and a set of original
constraints and traverses it, recursively, to build a subset of versions that we *should*
bundle, and the corresponding subset of versions that we shouldn't (because they are either
debugOnly themselves or pulled in by debugOnly packages). (We do this in the catalog because
it is an addon onto the results of the constraint solver, tied deeply into our representation
of data)

- In the packageLoader, we keep track packages & versions that we should bundle, and also,
packages that we should exclude. We do this in the package-loader because, essentially, that's the
object that we use to keep the results of the constraint-solver, and we already propagate it to all
functions that care about it. (Possibly we should subsequently rename it later).

- In the compiler, when we figure out buildTimeDependencies, we ask if we need to bundle debug
builds. If not, we filter them out (see above). Also, when we actually build together unibuilds,
we don't touch the ones that the packageloader tells us to exclude (which ensures that they don't make
it into the final product).

- In the project, we keep track of whether this project is building in debug mode. That's because the project
is where we keep the state of our curent project that we are building, and if we are ever in the state of
building multiple things, then that's the code that we would need to touch (see also that we make a similar
assumption when solving constraints).

- Adds the option to keepthe project debug-build-free and calls it in commands when approporiate.
2014-10-07 15:55:50 -07:00
Sashko Stubailo
7cd12072ea Rename unipackage to isopack in almost all cases 2014-09-29 16:01:08 -07:00
Sashko Stubailo
b312c1f6e6 Rename Unipackage to Isopack 2014-09-23 19:19:58 -07:00
Sashko Stubailo
4bf93172b6 Rename unipackage.js to isopack.js 2014-09-23 19:17:03 -07:00
Matthew Arbesfeld
d771fdbf2a Fix uniload for packages with plugins 2014-08-20 20:54:58 -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
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
David Glasser
64d939acb2 Add a lot more buildmessage captures
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.
2014-08-11 17:06:28 -04:00
David Glasser
59257989e5 Always download missing packages before compiling 2014-08-07 23:37:01 -07:00
David Glasser
4cd1ea5d1f Pass uniload's ignoreProjectDeps down farther
Fixes test-packages from a clean checkout (sigh)

Basically, uniload should never depend on your current project! It's
building separate JS images!
2014-08-07 17:07:54 -07:00
David Glasser
06a7dc90b5 Add many buildmessage.capture/assertInCapture
Moving towards a world where all things that might invoke buildmessage.error are
encouraged to be in a buildmessage.capture.

This commit is the answer to the question "how many small changes need to be
made to add buildmessage.assertInCapture to PackageCache.loadPackageAtPath?"

Next steps include:
 - Making catalog.resolveConstraints ALWAYS buildmessage.assertInCapture
   (not just when ignoreProjectDeps isn't passed)
 - Then changing resolveConstraints to complain using buildmessage
 - Removing the process.exit(1) in _ensureDepsUpToDate
 - Adding a more structured way to ensure that most commands
   call _ensureDepsUpToDate at an unsurprising location
2014-07-30 22:16:21 -07:00
ekatek
1e1f4b2e8a catalogs talk to each other 2014-07-22 18:40:25 -07:00
David Glasser
a8b9087807 s/catalogs/catalog/ in package-loader 2014-06-23 22:24:44 -07:00
David Glasser
4f3aa0fc53 initial checkpoint for "buildArchitectures"
this is a string like "browser+os"
2014-06-17 17:48:08 -07:00
David Glasser
87eb6977a7 package-loader and package-source 2014-06-17 17:33:56 -07:00
David Glasser
6d3257909d test-bundler-assets passes 2014-06-10 19:13:48 -07:00
ekatek
b97f7c5a76 renamed some catalog variables, more cleanup around catalog 2014-05-27 16:07:43 -07:00
David Glasser
5710fe876c closer to having meteor update work 2014-05-19 21:12:32 -07:00
ekatek
f2d3972857 integration mostly works except for bizarre constraint solver output bug 2014-05-09 15:15:45 -07:00
David Glasser
f9bd956ee9 uniload works in built and git!
we still need a concept of releases in order to actually bundle apps
from a built tool
2014-04-28 19:53:26 -07:00
ekatek
e615d27f0e remove default arches/default builds 2014-04-28 16:02:46 -07:00
ekatek
6276fd9269 adding implies 2014-04-11 01:32:06 -04:00
ekatek
fd6bc5cc35 clean up around generalizing test packages 2014-04-10 14:09:46 -07:00
ekatek
431bed1595 checkpoint: builds and pulls in test package 2014-04-10 13:51:07 -07:00
ekatek
691cc90176 wip 2014-04-10 11:24:05 -07:00
ekatek
2a3b409d57 rebuild all works 2014-04-07 23:37:08 -07:00
ekatek
8a96a1c25a removing test slices; renaming slices to builds 2014-04-07 15:25:30 -07:00
Emily Stark
9c3d6e03f9 Fix mysterious inconsistency in PackageLoader.versions format.
Also fix some indentation.
2014-03-31 21:31:04 -07:00
ekatek
60ffe51f22 meteor --get-ready and some misc cleanup 2014-03-20 12:31:55 -07:00
Emily Stark
180751d7bf Update some comments.
Mostly changing Package -> Unipackage.
2014-03-20 11:21:18 -07:00
ekatek
6ac5296289 add and remove to use handle lack of versions, rewrite .meteor/packages properly 2014-03-18 18:22:13 -07:00
Geoff Schmidt
3465baf8af 'meteor publish' works
even for packages with troposphere dependencies :)
2014-03-17 22:44:51 -07:00
Geoff Schmidt
30dad184b7 'meteor run' works! (if you add 'templating') 2014-03-17 17:57:14 -07:00
ekatek
18af114204 meteor run works, but doesn't actually render 2014-03-17 17:17:13 -07:00
ekatek
4565c2d262 For direct dependencies only plugins affect buid 2014-03-14 17:25:40 -07:00
Geoff Schmidt
6c993f1ea2 first draft of 3-phase local package builder 2014-03-14 01:14:47 -07:00
Geoff Schmidt
985ffea9fa WIP - make package build run the constraint solver.
move constraint solver from a package into the tool.
unipackage loading is broken; next step is to fix that
2014-03-12 19:02:47 -07:00
ekatek
a8788a8084 make package-loader take null version argument for local packages only 2014-03-12 14:56:08 -07:00
ekatek
70b24926f3 better singleton naming 2014-03-12 11:57:08 -07:00
ekatek
3273897a71 PackageCache as singleton. Miscellaneous attempts to clean up 2014-03-11 21:27:13 -07:00
Geoff Schmidt
5f0d1714eb WIP: Break Library into PackageLoader, PackageCache, Catalog 2014-03-11 18:10:28 -07:00