Commit Graph

145 Commits

Author SHA1 Message Date
Emily Stark
d1ee2043f9 Don't say "removed cordova:blah" if it wasn't in the project. 2014-10-08 17:28:08 -07:00
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
Slava Kim
4279394d3e Whitespace 2014-10-01 14:48:18 -07:00
Sashko Stubailo
4d8e54fe4f Small fixes 2014-09-30 19:25:35 -07:00
Sashko Stubailo
07987a009d Merge branch 'devel' into platform-list
Conflicts:
	tools/commands-cordova.js
	tools/tests/cordova-platforms.js
2014-09-30 19:02:42 -07:00
Sashko Stubailo
7e4848d939 Merge branch 'isopack' into release-0.9.4
Conflicts:
	tools/uniload.js
2014-09-29 20:08:02 -07:00
Sashko Stubailo
8bd7a14993 Merge branch 'release-0.9.4' into isopack 2014-09-29 17:57:15 -07:00
David Greenspan
98eff9059e Capitalize buildmessages 2014-09-29 16:18:38 -07:00
Sashko Stubailo
7cd12072ea Rename unipackage to isopack in almost all cases 2014-09-29 16:01:08 -07:00
Sashko Stubailo
81dee7f526 Working on generalizing platforms, need to worry about backcompat still 2014-09-29 15:35:29 -07:00
ekatek
3c9d7e26d0 push does not work like that 2014-09-19 22:36:30 -07:00
ekatek
5d8fb6d05b release constraints are weak and also increment 2014-09-19 22:34:39 -07:00
ekatek
35513fd745 fixed a bug in a more final way 2014-09-19 22:24:01 -07:00
ekatek
c8f4152f04 fix running from release to work 2014-09-19 21:47:05 -07:00
Justin SB
9963a8bcf3 Progress bars and output formatting 2014-09-19 16:56:25 -07:00
ekatek
9c99638c7f be more consistent about using utils.parseConstraint in the tool; test for either-version 2014-09-19 16:56:24 -07:00
Justin SB
30f4fa2cbe Progress bars and output formatting 2014-09-19 15:52:23 -07:00
ekatek
bc8010514d be more consistent about using utils.parseConstraint in the tool; test for either-version 2014-09-18 23:48:21 -07:00
ekatek
d8377487dc support multiple major versions in meteor 0.9.3 and above. A little hacky in the tool around keeping old interfaces, but it works 2014-09-18 00:12:30 -07:00
ekatek
3e64bd78cd keep track of old dependencies while restarting in runner 2014-09-11 16:41:59 -07:00
ekatek
ce4a3359fe show breaking changes when adding or updating 2014-09-10 22:39:39 -07:00
David Glasser
97481ebf64 fix .meteor/versions in meteor create --release X
Previously, we would not write the versions file in this case because
project._recordVersions thought we were doing "run with a different
release temporarily"
2014-09-10 12:04:01 -07:00
Matthew Arbesfeld
75427d70ce Merge branch 'devel' into cordova-hcp
Conflicts:
	docs/client/docs.js
	examples/leaderboard/.meteor/versions
	meteor
	packages/backbone/package.js
	packages/constraint-solver/package.js
	packages/meetup/package.js
	packages/meteor-tool/package.js
	packages/showdown/package.js
	packages/stylus/package.js
	scripts/admin/meteor-release-experimental.json
	tools/commands-packages.js
	tools/commands.js
	tools/project.js
	tools/tests/old/app-with-private/.meteor/versions
	tools/tests/old/app-with-public/.meteor/versions
	tools/tests/old/empty-app/.meteor/versions
2014-08-27 13:38:57 -07:00
David Glasser
3564c3ac4e Fix 'meteor add x@version' over x@other
Before, we were running the constraint solver with both the new and the
old constraint, which would fail if they were not simultaneously
satisfiable. (We were writing the right thing to disk if it succeeded,
at least.)
2014-08-26 23:04:29 -07:00
David Glasser
43e01c09eb Improve treatment of prerelease (dashed) packages
Drop the "at-least" constraint type entirely. It was not user-accessible
and was only used in the form ">=0.0.0" to represent a constraint with
no version constraint at all. This type of constraint is now called
"any-reasonable".

The definition of "any-reasonable" is:

  - Any version that is not a pre-release (has no dash)
  - Or a pre-release version that is explicitly mentioned in a TOP-LEVEL
    constraint passed to the constraint solver

For example, constraints from .meteor/packages, constraints from the
release, and constraints from the command line of "meteor add" end up
being top-level.

Why only top-level-constrained pre-release versions, and not versions we
find explicitly desired by some other desired version while walking the
graph?

The constraint solver assumes that adding a constraint to the resolver
state can't make previously impossible choices now possible.  If
pre-releases mentioned anywhere worked, then applying the constraints
"any reasonable" followed by "1.2.3-rc1" would result in "1.2.3-rc1"
ruled first impossible and then possible again. That's no good, so we
have to fix the meaning based on something at the start.  (We could try
to apply our prerelease-avoidance tactics solely in the cost functions,
but then it becomes a much less strict rule.)

At the very least, this change should allow you to run meteor on a
preview branch like cordova-hcp without getting a conflict between the
prerelease package on the branch/release and the lack of an explicit
constraint in .meteor/packages on that package, because we are
reintepreting the .meteor/packages constraint as meaning "anything
reasonable" and the in-the-release version counts as reasonable.
2014-08-26 21:54:48 -07:00
David Glasser
0562466ad4 Rename upgraders file to .finished-upgraders
The idea is that dotfiles in .meteor (like .id and .finished-upgraders)
aren't intended to be human-editable, whereas packages, release,
and versions are (although there are commands to edit them too).
2014-08-25 21:21:43 -07:00
David Glasser
08f0a3bab0 Fixes to unforced update to not-quite-last release
Make sure that project._ensureDepsUpToDate does not get run mid-update,
since it might decide that various things are not compatible with the
packages in the current release. When the update command runs the
constraint solver explicitly, it passes ignoreProjectDeps, but implicit
calls can lead to an unhappy process.exit.
2014-08-25 17:25:08 -07:00
David Glasser
5b92dfd85f "better" error handling for compiler constraints
This before was just an uncaught exception. Now it's exit(1), which is
bad too.  This should just use buildmessage, but for some reason that
doesn't work here.
2014-08-25 11:17:57 -07:00
David Glasser
d4280a22eb make "no compatibile build" error not bracketed
this function needs to be rewritten, but not today
2014-08-24 20:18:43 -07:00
David Glasser
a8e8995c91 Support comments in .meteor/.id file
Make project.rootDir be absolute in 'meteor create'
2014-08-22 18:04:24 -07:00
David Glasser
412033f7c4 Support comments in .meteor/.id 2014-08-22 17:54:44 -07:00
David Glasser
c4948d8dff rename .meteor/identifier -> .meteor/.id 2014-08-22 17:31:21 -07:00
David Glasser
f1a50bbc93 show stack if error is unexpected 2014-08-21 10:48:20 -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
Matthew Arbesfeld
922af65765 Merge branch 'devel' into cordova-hcp
Conflicts:
	meteor
	scripts/generate-dev-bundle.sh
	tools/bundler.js
	tools/unipackage.js
2014-08-20 19:48:26 -07:00
Matthew Arbesfeld
524363e38c Refactor some arch code, and use it for deploy 2014-08-20 11:08:48 -07:00
ekatek
b29a4cc439 more detaled wip on name coming from package.js 2014-08-19 12:32:16 -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
Matthew Arbesfeld
e9b9132a04 Merge branch 'devel' into cordova-hcp
Conflicts:
	meteor
	tools/catalog.js
	tools/commands-packages.js
	tools/commands.js
2014-08-13 15:07:42 -07:00
David Glasser
66f21a64a2 add newline to identifier file 2014-08-12 14:57:36 -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
Slava Kim
85a1233a87 Better error messages around adding platforms/plugins 2014-08-08 15:03:52 -07:00
David Glasser
6dd5dc84f5 project._ensurePackagesExistOnDisk -> trophouse
Now called downloadMissingPackages. The function did not actually do
anything project-related.
2014-08-07 22:57:49 -07:00
David Glasser
671c82e618 Print package downloads except background updater
Before, there were some random contexts (like 'test-packages') which
didn't print downloads. Now, the default is printing, and the exception
is the automatic background updater.

(Some of these bulk contexts should probably set silent and print their
own progress bar.  And maybe even do paralellism...)

Generally clean up the tropohouse.maybeDownloadPackageForArchitectures
interface. Change it to take options, remove the vestigial return
value (though really, there needs to be better error handling...)
2014-08-07 16:27:23 -07:00
Slava Kim
bfd1c25fb4 Platforms/plugins management 2014-08-06 17:50:25 -07:00
Slava Kim
f1f21fcb61 Check the platforms on meteor run <platform> 2014-08-06 17:18:14 -07:00
Slava Kim
b8179787f0 Project functions for managing platfroms 2014-08-06 14:58:49 -07:00
Matthew Arbesfeld
9f2ee36e60 Merge branch 'packaging' into cordova-hcp
Conflicts:
	packages/constraint-solver/constraint-solver-tests.js
	packages/constraint-solver/constraint-solver.js
	packages/less/plugin/compile-less.js
	packages/meteor/plugin/basic-file-types.js
	packages/star-translate/translator.js
	packages/stylus/plugin/compile-stylus.js
	packages/templating/plugin/compile-templates.js
	packages/webapp/webapp_server.js
	tools/bundler.js
	tools/commands.js
	tools/compiler.js
	tools/package-source.js
	tools/run-app.js
	tools/selftest.js
	tools/tests/old/test-bundler-assets.js
	tools/tests/old/test-bundler-options.js
	tools/unipackage.js
2014-08-06 13:43:56 -07:00
ekatek
bcf85a42b9 don't print out add messages when no versions file present 2014-08-05 13:10:56 -07:00