Commit Graph

633 Commits

Author SHA1 Message Date
David Glasser
7633de6efd fix another word-wrap self-test 2014-12-18 16:11:23 -08:00
David Glasser
7fb54a952a Fix self-test expecting a removed message 2014-12-18 10:46:22 -08:00
David Glasser
b804b2cd55 Fix wordwrap-related test failures 2014-12-18 10:44:47 -08:00
David Glasser
b492b71b60 Drop browserstack support from built tool
We haven't really been trying to keep 'meteor self-test' passing from
built tool in a while, so why waste the bandwidth?
2014-12-16 21:08:26 -08:00
David Glasser
5924a6a140 Fix pathwatcher fallback tests
- Future.wait does not throw
- any non-empty env var counts as true
2014-12-16 17:11:09 -08:00
Ben Newman
07f6cf41fb Run file watching tests with both pathwatcher.watch and fs.watchFile.
Running the two versions of the test in parallel is safe because they run
in separate processes, and a good idea because it cuts the time taken by
the test in half, from 36sec to 19sec.

Conflicts from devel:
	tools/tests/old.js
2014-12-16 17:10:50 -08:00
David Glasser
79527ccd9c Don't crash on circular dependency
Previously, we would register the circular dependency error properly
with buildmessage, but then try to build the package with a circular
dependency anyway, leading to a crash.

Fixes #3280.
2014-12-11 21:31:41 -08:00
David Glasser
1e5b7437a5 Refresh catalog only on relevant errors
Fixes #2846.  Fixes #2847. Fixes #2979.

Errors in the build process that could be fixed by refreshing the
catalog now cause the catalog to refresh, assuming we have not already
refreshed it recently and that we are not offline.

These commands now don't need to refresh at startup: remove, run, debug,
create, build, bundle, deploy, test-packages, rebuild, and self-test

It should be OK for create to throw SpringboardToLatestRelease even
without refreshing, since release.latestKnown is still something we know
about.
2014-12-10 19:03:05 -08:00
David Glasser
6ea8443f30 Update calls to addFiles, onUse, and onTest 2014-12-09 20:18:31 -08:00
David Glasser
e7bfa5202e Update packages to use Package.registerBuildPlugin 2014-12-09 20:09:34 -08:00
David Glasser
21a34a98b3 Show mongod exit message if it started up OK
Fixes "run with mongo crash" test
2014-12-09 19:52:03 -08:00
David Glasser
118e330cba fix deadlock in mongod startup failure
AppRunner.stop needs to be able to cause any Future which the AppRunner
is waiting on to return, so that it can get back to the top level of its
loop and return. (This is because for some reason it is important that
AppRunner.stop does not return until the app is guaranteed to be
stopped.)  This had not been the place for the injected "wait for mongo
to start up before running the AppProcess" future.

This also means we can't use f.future() any more, because that code
assumes that it is the only code allowed to resolve its future (it
unconditionally resolves the future when the wrapped function returns,
which is an error if it is already resolved).

This is tested by 'run errors' which was failing.  Also, the test should
only expect 2 unexpected exit code messages, not 3, since we don't print
the message the first time which didn't have a kill before it.
2014-12-09 19:38:09 -08:00
ekatek
6bf699d5d9 Fixed some mistypes 2014-12-06 19:13:51 -08:00
ekatek
24a4ed9bdc Automatically line-wrap output
Includes the following changes to Console.js:

- Console.info, Console.warn, Console.debug and Console.error now automatically
  line-wrap the output to 80 characters, or the width of the terminal screen (if
  known). This is in line with our current style guide on how things should be wrapped!

- Sometimes, there are parts of text that we don't want to line-wrap. For example, if we are
  telling the user to run 'meteor long-command --with --options' we don't want to
  have a newline in the middle of that! Wrap those commands in Console.command, like
  this:
     Console.info("something and then run", Console.command(command), "and then");
  This also makes them bold if chalk is on, as a nice bonus. So, if we ever turn
  chalk back on, the bolding of commands will be more consistent.

- Sometimes, there is bulkier output that we don't want to format at all, including
  line-wrapping: log snippets, stack traces, JSON output, etc. In that case, we can use
  Console.rawInfo, Console.rawError, Console.rawWarn and Console.rawDebug. Don't use
  Console.command inside the raw* functions! It won't be processed (at all).

- There are fancier things that we can do, other than just simply wrapping things.
  We can indent:
  "  Start here and then when wrapping
     continue over here".

  We frequently do this for commands, for example. In the past, we did this manually --
  but we can't do this for long messages that might get wrapped, and anyway, it is
  good to codify this instead of counting spaces. Allows us to be better about consistency,
  for example.

- We can also add a bulletPoint, which is a small notice in the beginning that looks like
  this:
  " => Start here and then when wrapping
       continue below the bulletPoint".

  Since it is a elss intuitive option, I have wrapped most of the time that we use a
  bulletPoint into helper functions on the Console.js.

- Some common bulletpoints that we use are:
    ASCII Checkboxes (Console.success)
    ASCII X-s (Console.failWarn and Console.failInfo)
    =>  (Console.arrowError, Console.arrowWarn, Console.arrowInfo)
    WARNING (Console.labelWarn)

  The => are sometimes indented, so they take an optional indent argument, showing how
  many spaces to indent by.

The wrapper interface would be less complicated, if there was a more unified conceit behind our
terminal messages. If there is one, it is not documented. My hope is that, in many cases,
moving these to Console will make it easier for someone with great product sense to
clean up our terminal messages. It will also make it easier to write such messages, since
it will be easier to follow an accepted standard.

In the codebase outside of Console:

- Went through and looked at our use of Console.error/info/etc, replacing with rawError/etc
  whenever approporiate.

- Went through and modified most of 'stdout' and 'stderr' calls to use the new functions.
  I made an exception for stuff that doesn't want a new line at the end, or otherwise does
  weird things (ex: print user logs directly), on the basis that, at this juncture, it is
  better to be safe than to be sorry.

- Long messages no longer need to break the code style guide by ignoring indentation rules.
  Fixed that where approporiate.

- Fixed the tests! A number of our stock messages are actually longer than 80 chars.

- Personal favourite: The Android license agreement is now line wrapped! Much better experience.

- There is some more work to do on:
  - longform help (currently comes with built-in linebreaks, would have to change the entire
    mechanism for how that works)
  - Buildmessage sometimes has headers that start with =>, but they are short. I didn't want to
    pass wrapper options all the way to main.captureOrExit before merging the rest of this and
    making sure that we like it. Since these messages are fairly short, I don't think that's
    likely to be a serious problem.

I hope that this makes life easier for us in the future! No more counting chars, no more breaking
the style guide. Better experience for users with wider terminals (or even shorter terminals!).
Let's give this a try.
2014-12-04 17:56:04 -08:00
David Glasser
ab3d6c5bfb Clean up some #3006 comments 2014-12-01 18:29:20 -08:00
David Glasser
c49a441d3d self-test: prepare apps after createApp
This means that the first command won't need to do a big build (and
print lots of package changed notifications). Similar to what 'meteor
create' does.

Also add --prepare-app command.
2014-12-01 14:43:15 -08:00
David Glasser
dc97864e16 improve some tests 2014-12-01 10:29:33 -08:00
David Glasser
e956a3b237 remove unnecessary use of NO_METEOR_PACKAGE 2014-12-01 01:41:27 -08:00
David Glasser
7d4757b3ac Show package changes and prerelease warnings
This reimplements functionality that had been removed as part of the
`isopack-cache` branch refactoring.

Information about package changes is encapsulated inside a
PackageMapDelta object on the ProjectContext.  It is the responsibility
of the command that prepares the ProjectContext to choose to call
projectContext.packageMapDelta.displayOnConsole at the appropriate time
if it wishes to display changes.

Part of #3006.
2014-12-01 01:26:35 -08:00
David Glasser
1d4c3e7387 comment tweaks 2014-11-25 09:35:34 -08:00
David Glasser
f4e69b9e96 Fix test-bundler-assets some more 2014-11-25 09:06:31 -08:00
David Glasser
d4c7bf2020 tentative steps towards publish tests passing 2014-11-25 09:06:30 -08:00
David Glasser
f5901a74da steps towards making report-stats test pass
It doesn't, though, for reasons that mostly seem to be "talking to the
stats server (and auth) is really slow"
2014-11-25 09:06:30 -08:00
David Glasser
d107d7292d restore 'added cordova plugin' messages 2014-11-25 09:06:30 -08:00
David Glasser
9ea3b92cb4 improve some tests 2014-11-25 09:06:30 -08:00
David Glasser
1a56f3c55d fix test-bundler-npm
remove one subtest that's been super flaky for ages
2014-11-25 09:06:30 -08:00
David Glasser
1ccf81fea0 Call waitSecs instead of setting extraTime 2014-11-25 09:06:29 -08:00
David Glasser
f0ce81aaa2 can't get this one to pass but it is slow 2014-11-25 09:06:29 -08:00
David Glasser
48634b7124 get a test slightly closer to passing and tag slow 2014-11-25 09:06:29 -08:00
David Glasser
c226c652e9 simplify another test and make it pass
drop unnecessary stack trace
2014-11-25 09:06:29 -08:00
David Glasser
b00043e92e simplify a test and make it pass 2014-11-25 09:06:29 -08:00
David Glasser
3e1621cdf6 fix bundler-assets 2014-11-25 09:06:28 -08:00
David Glasser
5622d3384e fix bundler-options 2014-11-25 09:06:28 -08:00
David Glasser
02856bca84 restore some meteor add error-checking
get some parts of package-tests to pass
2014-11-25 09:06:28 -08:00
David Glasser
4a5636b8fd remove more remnants of 'programs' directory 2014-11-25 09:06:28 -08:00
David Glasser
7d856564fa fix releases tests
This mostly consisted of making sure we were building enough packages to
run the skeleton app.  Also, since we currently only know how to make
one tool at a time, dropped all the tests that checked the tool version
with --long-version.  (Before 0.9.0 there were multiple tool versions
here and you could actually tell the difference.)
2014-11-25 09:06:28 -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
a0c05857d9 Fix client refresh bundle failure crash
hot-code-push file passes
2014-11-25 09:06:28 -08:00
David Glasser
cb7a18f89a fix selftest-test 2014-11-25 09:06:27 -08:00
David Glasser
3d8d5ce88c Fix runner restart on package.js scan failure
cordova-plugins now passes
2014-11-25 09:06:27 -08:00
David Glasser
3b7459e62a start on self-test. file 'run' passes 2014-11-25 09:06:27 -08:00
David Glasser
27d67fe379 Remove "deploy legacy app" tests
These tested a transition that occured in February. The tests are very
slow because each test does an uncached download of Meteor 0.7.0.1. We
are unlikely to break the logic that it tests and even if we do, it will
only affect users who haven't touched their apps since February.
2014-11-25 09:06:25 -08:00
David Glasser
8846a7acbd allow self-test to run at all 2014-11-25 09:06:25 -08:00
David Glasser
f0ff76a24b watch local package search dirs 2014-11-25 09:06:18 -08:00
David Glasser
055575a80c Support .meteor/cordova-plugins 2014-11-25 09:06:17 -08:00
David Glasser
438ddad7bc Remove catalog.complete from core code
It's still in unmigrated commands.

Remove tropohouse's catalog.  It was there to stop you from downloading
local packages but downloadPackagesMissingFromMap does that based on the
PackageMap now.
2014-11-25 09:06:16 -08:00
David Glasser
ee649d3bda Move isopack-compiler back to compiler 2014-11-25 09:06:15 -08:00
David Glasser
c3cd93c989 Get rid of a few random spots that refer to .build. 2014-11-25 09:06:08 -08:00
David Glasser
170c0acad7 Rename unibuild everywhere to isopackets 2014-11-07 16:45:58 -08:00
David Glasser
97f6a0236e get rid of catalog.uniload
There is no longer a uniload catalog when running from a release, since
the release contains whole isopackets (programs) not
isopacks (packages).

We only need a uniload-specific catalog when we're actually rebuilding
isopackets (not in order to load them), so we now have it as a local
variable in the two places that build isopackets.

The deleted code in package-loader.js was specific to the prebuilt
uniload package which no longer exists.
2014-11-07 16:45:58 -08:00