Commit Graph

70 Commits

Author SHA1 Message Date
Sashko Stubailo
619642b556 Fix reused variable 2015-02-17 09:22:48 -08:00
Sashko Stubailo
d8634e0264 Code style 2015-02-13 20:27:33 -08:00
Sashko Stubailo
68565d4ade Code style on unary ops 2015-02-05 12:04:30 -08:00
Sashko Stubailo
4e2671ec7b Replace debug option with printErrors and add comments 2015-02-05 12:00:17 -08:00
Slava Kim
e2c358dd45 Add the 'admin run-background-updater' command for debugging 2015-01-30 17:18:38 -08:00
Sashko Stubailo
fec2f8eaef Factor out making latest meteor "symlink" 2015-01-20 22:03:21 -08:00
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
d7d51f9dac All downloads use downloadPackagesMissingFromMap
We now can make PackageMaps without a localCatalog, for cases like this
where we really want everything in the map to be downloaded.
2014-12-10 14:42:18 -08:00
David Glasser
050a01dcf2 Move tryRevokeOldTokens to background fiber
And increase the timeout while we're at it.
2014-12-01 18:38:39 -08:00
David Glasser
ab3d6c5bfb Clean up some #3006 comments 2014-12-01 18:29:20 -08:00
David Glasser
d75aba324c use sqlite instead of racy json file for banners 2014-12-01 01:41:13 -08:00
David Glasser
46d31e1ce7 Fix update-related bugs
- don't crash when listing upgraders (2 bugs, introduced on this branch)

- successfully write banners-shown file so that we sometimes print
  shorter banners (introduced with sqlite)

- in self-test tropohouse, keep the sadly necessary symlinks

autoupdate test file now passes!
2014-11-25 09:06:28 -08:00
David Glasser
a9a3411703 checkpoint on 'meteor run' 2014-11-25 09:06:17 -08:00
David Glasser
490511a498 Move catalog refresh off of catalog.complete 2014-11-25 09:06:15 -08:00
David Glasser
63e91e1f54 Remove buildmessage usage in updater.js 2014-10-29 19:04:36 -07:00
David Glasser
e4a10e5f11 Package download no longer can emit buildmessages 2014-10-29 18:51:02 -07:00
Justin SB
cb9b06a9fd Add comment about why we don't just delay the first update cycle 2014-10-17 13:47:22 -07:00
Justin SB
945afe194a During the first background update run, skip the remote catalog refresh
It might obliterate the package resolver cache, and we just did a package sync anyway.

But we don't want to delay it entirely, because we do want the release-version check.
2014-10-17 13:47:22 -07:00
Justin SB
d1c896724c We do need to cache the resolver after all; invalidate it correctly 2014-10-17 13:47:21 -07:00
Justin SB
2324f6f6ef Tolerate catalog refresh throwing 2014-10-17 13:47:19 -07:00
Justin SB
58d35c515a Run updater every 15 minutes to refresh often, but don't log as often 2014-10-17 13:47:18 -07:00
ekatek
c67de0830a merging from sqllite 2014-09-30 16:29:41 -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
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
Justin SB
e9a88b00b9 Fix some fibers vs SQLite issues 2014-09-29 07:57:51 -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
David Glasser
5ab9a66b29 Fix typo. Now I will make this release twice. 2014-08-25 14:32:25 -07:00
David Glasser
ca7217bc18 patch releases need to be recommended
for them to work with update --patch

or for them to be advertised
2014-08-25 14:13:05 -07:00
David Glasser
08b2625082 METEOR-CORE -> METEOR 2014-08-24 18:46:37 -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
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
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
David Glasser
51fc5e62c5 use .meteor instead of .meteor0! 2014-08-05 20:10:00 -07:00
David Glasser
ce2fe073d2 don't be verbose for background downloads! 2014-08-05 19:51:18 -07:00
David Glasser
7d05640ea0 Make buildmessage fiber-aware
Port a simplified version of Meteor.EnvironmentVariable and
Meteor.bindEnvironment to fiber-helpers.js to deal with this.

Identify uses of fiberHelpers.inFiber and switch them to either
fiberHelpers.bindEnvironment (if the callback they are wrapping is
semantically "part of" the context that creates the callback) or
fiberHelpers.inBareFiber (otherwise).

Without this, concurrency was causing the wrong buildmessage message
sets and jobs to be active when builds yielded.
2014-08-04 19:03:05 -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
7d9a2ff6f3 put some try/catch blocks around maybeDownloadPackageForArchitectures. Not sure that this is the best plan? 2014-06-25 22:44:13 -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
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
158357c545 make symlink always point to METEOR-CORE
factor it out into its own function
2014-06-09 14:19:03 -07:00
David Glasser
7e2b8fc33b updating the latest symlink now works 2014-06-03 17:19:28 -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
3e76ad7946 Don't use require('./run-log.js').runLog
If you happen to introduce a circular require into the stack, this
object will be undefined.

Instead, hang on to `require('./run-log.js')`, which is the exports
module which does get filled in later.
2014-03-31 19:52:02 -07:00
Emily Stark
fabd6c6246 Don't print 'undefined' around banner text 2014-02-24 13:42:14 -08:00
Emily Stark
cf2de810ce Remove stray %s in update message. 2014-02-14 18:44:56 -08:00
David Glasser
20a8e679f7 use runLog in updater
Note that this can stomp on, eg, "Starting your app".
2014-02-13 19:37:55 -08:00