Commit Graph

58 Commits

Author SHA1 Message Date
Sashko Stubailo
e7167e5257 Factor out almost all fs. and path. calls in the tool
This will be useful when we want to be smart with windows file paths later
Also, all of the file calls are asynchronous with fibers now, which comes with
many benefits.

This is a combination of 23 commits. Original messages:
Wrap a large number of fs calls inside files.*

Convert a few more fs calls to files.*

More moving fs.* to files

Implement read/write streams and open/read/close

Get rid of fs from auth.js

Remove fs and unused imports from catalog-local and catalog-remote

Remove unused imports from catalog.js

Replace a whole lot of fs calls

Fix error

Migrate a lot more fs. calls to files.

Add a temporary symlink method

Convert old test to files.*

Use files.pathX instead of path.x everywhere

Replace path.x to files.pathX in tests

Small fixes to files.js and one rename

Make cleanup run in a fiber

Make wrapping functions take function name in case we need it

Add some timeouts and stuff to HCP tests

wrapFsFunc also makes a sync version of the function

Sometimes you just don't want to yield!

Make sure JsImage readFromDisk doesn't yield

Remove unused imports from npm test

Change order of test now that some things don't yield

Fix missing files import, and add a debug error printout
2014-12-15 15:32:06 -08:00
David Glasser
bf00def694 clean up comments and remove dead code
Part of #3006 cleanup.
2014-12-01 01:41:14 -08:00
David Glasser
45cc54fb63 comment and require cleanup 2014-11-25 09:06:20 -08:00
David Glasser
7998389287 Read .meteor/release in ProjectContext 2014-11-25 09:06:16 -08:00
David Glasser
17f16160e5 Remove buildmessage usage by release.js 2014-10-29 19:15:51 -07:00
David Glasser
eb65687f75 "Normalize" most calls to getMeteorReleaseVersion
ie, make it prepend METEOR@ if necessary.

(We DON'T do that in the pre-springboard call in main because that one
might be telling us to springboard to a pre-0.9.0 release!)

Solves a bunch of issues like the previous commit where, if
.meteor/release just says "0.9.4", you get weird behavior.
2014-10-23 19:48:04 -07:00
David Glasser
9c09abaffa Fix run with .meteor/release lacking METEOR@
Otherwise:

  $ meteor
  meteor
  [[[[[ /private/tmp/p107 ]]]]]

  => Started proxy.
  => Started MongoDB.
  => Started your app.

  => App running at: http://localhost:3000/
  Your app has been updated to Meteor 1.0-rc.7 from Meteor 1.0-rc.7.
  Restart meteor to use the new release.
2014-10-23 19:38:18 -07:00
ekatek
f2378ce616 some processing on how we display release name 2014-10-21 17:49:48 -07:00
David Glasser
c1753de1e8 release.latestDownloaded -> latestKnown, errors
Since 0.9.0 it hasn't had anything to do about anything being
downloaded, just metadata, so the new name is better.

And without auto-retry, there's no need for this to have anything to do
with buildmessage.

Add a bit more support for the very unlikely case that you're running
meteor outside an app and the catalog has no information about any
METEOR@ release.
2014-10-17 13:47:20 -07:00
David Glasser
fb21aa42b0 release.load can't throw OfflineError any more
So stop giving tests a way to force-throw it (might break springboard
test; fix this before merging) and stop catching it.

(release.load now just does a single sqlite query!)
2014-10-17 13:47:19 -07:00
David Glasser
cdbaca0b8b release.load no longer needs buildmessage
It used to need buildmessage because catalog.official.getReleaseVersion
used to be capable of rebuilding local packages. Now it can't! Simplify
all call sites.

Note that buildmessage was not actually used to express "no such
release", before or now.
2014-10-17 13:47:19 -07:00
David Glasser
166583845e Fix 'meteor update'
We were accidentally considering this equivalent to 'meteor update
--release LATEST', meaning we could not update to an intermediate
release (and that it could update you backwards).
2014-08-25 16:42:41 -07:00
David Glasser
08b2625082 METEOR-CORE -> METEOR 2014-08-24 18:46:37 -07:00
David Glasser
7743a55bba Use official catalog for springboarding
Read it into memory at initialize time
2014-08-13 18:11:46 -07:00
David Glasser
4ac78a3646 Move DEFAULT_TRACK to catalog module
It's a constant, so no need to have to think "hmm, I wonder if I should
be writing catalog.official.DEFAULT_TRACK or
catalog.complete.DEFAULT_TRACK?"
2014-08-13 15:39:03 -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
d0a81689f3 Use catalog.complete instead of catalog.official
Specifically, in cases (like "load the most recent release we know
about") where we don't always want to incur a sync RPC.

Apparently, there is literally no way to get data from catalog.official
without a sync RPC occuring.

This speeds up 'meteor --version' on built releases by a factor of 10
2014-07-23 17:51:00 -07:00
Emily Stark
ecff10c23e 'springboard' selftest passes. 2014-06-25 22:16:55 -07:00
David Glasser
2e5adc2659 fix autoupdate test
also fixes a bunch of other stuff like:

- parseStack markTop works again (so you get the right line numbers in
  self-test)

- you can (with appropriate env var) run apps with NO PACKAGES at
  all (even ctl)

- more consistently refer to METEOR-CORE@ releases as "Meteor 1.2.3"
2014-06-17 14:26:29 -07:00
ekatek
a710408b1c correct update semantics with release --explicit 2014-06-11 22:40:07 -07:00
David Glasser
f66e357353 allow springboarding to pre-tropohouse releases! 2014-06-11 17:12:43 -07:00
David Glasser
84b2212b06 implement normal small "you can update" banner
oops, a merge issue dropped orderKey support! tee-hee.
2014-06-09 17:29:00 -07:00
David Glasser
febef90803 print a patch banner 2014-06-09 16:58:22 -07:00
David Glasser
7098c68260 print the main banners! 2014-06-09 16:58:22 -07:00
David Glasser
cbf0850ca7 fix 'meteor update' on track with none recommended 2014-06-09 14:04:37 -07:00
David Glasser
20ef85f9c9 fix springboarding 2014-06-09 13:50:34 -07:00
ekatek
5ebbbdbc63 merging packaging into uvf 2014-05-28 13:26:48 -07:00
ekatek
b97f7c5a76 renamed some catalog variables, more cleanup around catalog 2014-05-27 16:07:43 -07:00
ekatek
6f3504a2d3 project refactoring, wip 1 2014-05-21 15:42:12 -07:00
David Glasser
8bdcdbc518 maybe background symlink update works
however, bundling is brokenish

due to buildTimeDeps when building apps not being release-sensitive

(ekate understands what I mean)
2014-05-20 18:58:15 -07:00
David Glasser
84e7342e82 meteor update should keep you on track 2014-05-20 17:08:44 -07:00
David Glasser
135deb16ae release.current.name should include METEOR-CORE@ 2014-05-20 11:14:29 -07:00
David Glasser
5710fe876c closer to having meteor update work 2014-05-19 21:12:32 -07:00
David Glasser
ea5e6d075c add comments, comment stuff out 2014-05-19 20:12:50 -07:00
David Glasser
3d3ce33d32 be more consistent about release track vs name 2014-05-19 19:57:29 -07:00
David Glasser
b2aaf88e92 refresh catalog after syncing serverCatalog 2014-05-19 19:57:28 -07:00
David Glasser
1c866f34bd Switch default release version to use orderKey 2014-05-19 16:49:58 -07:00
David Glasser
35bad76bc5 'meteor admin make-bootstrap-tarballs'
other changes:

- defaultReleaseVersion is not synced using 'collections' any more,
  since it is a singleton and has different merge logic
- publish-release --fromCheckout renamed to --from-checkout
- $METEOR_SAVE_TMPDIRS env var to not delete files.mkdtemp stuff
- release.latestDownloaded() now comes from tropohouse

we recognized that the cross-linking stuff in
Tropohouse.maybeDownloadPackageForArchitectures doesn't quite work so we
changed it to not quite work in a different way (which allows us to
leave downloaded-builds out of the bootstrap tarball and decrease its
size by 50%).  will fix later.
2014-05-14 11:40:43 -07:00
ekatek
4de82af708 save the tool version to the versions file. Not sure about some semantics of this. 2014-05-07 23:53:35 -07:00
David Glasser
9d70ff64c9 springboard almost works
springboarding happens infinitely because of build ids

have to manually bootstrap a tropohouse

fixed some other things:

 - store package server token in correct domain
 - copy files (eg packages pre-publish) with +x flags
 - catalog.getReleaseTrack works
 - don't pass release to uniload (Meteor.release will always
   end up 'UNILOAD')
 - fix building meteor-tool again
 - stop supporting apps without .meteor/release
 - merging unipackages with tools works

springboarding to warehouse releases totally not supported
2014-05-05 19:18:34 -07:00
Geoff Schmidt
949361bae0 Remove the final references to Library and delete it! 2014-03-12 22:18:39 -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
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
Geoff Schmidt
7919804bfd When running from a checkout, Catalog includes checkout packages! 2014-03-07 01:34:58 -08:00
Geoff Schmidt
b4df323875 A Catalog is part of the Release 2014-03-06 22:17:18 -08:00
David Glasser
b75da89d09 continued efforts towards released self-test 2014-02-06 12:18:49 -08:00
David Glasser
7f2eccecda more efforts to get released self-test working 2014-02-06 12:00:49 -08:00
David Glasser
37ccddede2 maybe get self-test working on releases 2014-02-06 11:19:09 -08:00
David Glasser
365db0e8be delete unused Release.compatibleWithRunningVersion 2014-02-05 15:54:08 -08:00