Commit Graph

3768 Commits

Author SHA1 Message Date
David Glasser
d090f55b4b Fix safe-pathwatcher memory leak 2014-12-17 00:05:50 -08:00
David Glasser
dc24e7b7d7 Implement soft refresh.
Fixes #3213.

Also ameliorates the memory leak of parsedSourceMaps in
files.runJavaScript (because now we don't reload unchanged plugins).
2014-12-16 23:59:59 -08:00
David Glasser
31bd507b11 refactor: move pluginProviderPackageMap in Isopack
This also un-breaks soft refresh for troposphere packages:
previousIsopack was accidentally being set to an
{isopack,pluginProviderPackageMap} object, and so the "can we reuse the
previous one" check was never actually passing.
2014-12-16 23:46:26 -08:00
David Glasser
8f9bb8da17 delete dead fields 2014-12-16 23:36:38 -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
Ben Newman
1307132c25 Create temporary pathwatcher test file in app directory.
Previously we were testing pathwatcher.watch by creating a file in
.meteor/local, but developers using Vagrant VMs often mount .meteor on a
different (non-network) file system, for Mongo's sake.

Writing the file directly in the app directory increases the likelihood
that it will interact with pathwatcher in the same way as other source
files the developer will be editing.

Conflicts from devel:
	tools/safe-pathwatcher.js
2014-12-16 17:09:59 -08:00
Ben Newman
fe8297697b Avoid pathwatcher.watch failures in testDirectory. 2014-12-16 17:07:03 -08:00
David Glasser
bd3e276f33 Move pathwatcher fallback message to debug level 2014-12-15 22:51:30 -08:00
David Glasser
e8bef27a5e Be more specific about how to run meteor update 2014-12-15 18:12:53 -08:00
Ben Newman
651348f6f5 Allow forcing fs.watchFile with an environment variable. 2014-12-15 13:13:16 -08:00
Ben Newman
0f00c9e482 Fall back to fs.watchFile if pathwatcher.watch does not work.
Fixes #3284.
2014-12-15 13:13:15 -08:00
David Glasser
f1c0654e33 "Fix" bizarre memory corruption (?) bug
See #3285.  For some reason, in some mostly-replicatable circumstances,
this is necessary.  Clearly some sort of V8/Node/Fibers bug.
2014-12-12 17:36:29 -08:00
David Glasser
fd79f43f4b Fix app build for Cordova
Caught by a zillion tests, oops.  But not by --prepare-app!
2014-12-12 07:37:57 -08:00
David Glasser
89a441eede publish in app: don't write, display versions
Typically, there is a delta due to adding the test slice of the
published package, but there's no reason to tell the user about this or
save it in .meteor/versions.
2014-12-11 22:36:45 -08:00
David Glasser
809b2b69f5 Don't compile web.cordova unibuilds unless needed
Specifically, we only compile them if there's a cordova platform in the
current project, or if we are publishing the package.

(Ideally, we wouldn't require every published package to have
web.browser and web.cordova unibuilds --- we'd just publish a 'web'
unibuild unless there's actually a difference between the two. But we
are not there yet.)

This adds an extra flag to isopack-buildinfo.json, so that we know to
rebuild all the isopacks when we add the first cordova platform (or
remove the last cordova platform).

The implementation around publish is a little clunky; if you're in a
non-Cordova app and run meteor publish, it will rebuild all the packages
with web.cordova, and the next time you prepare the app it will rebuild
them again without it. It does work though.

Fixes #3274.
2014-12-11 22:26:29 -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
bc53d5f1e4 Use case in buildmessage titles consistently
Job names should not be capitalized (so they look OK in "While xxx"
messages), and are capitalized by the progress bar.

Fixes #3003.
2014-12-11 14:40:16 -08:00
Utkarsh Upadhyay
51b2c7b997 Do not crash when source plugins conflict
Fixes #3015 and #3180.
2014-12-11 14:20:13 -08:00
David Glasser
92dd5e1e71 Don't make unnecessary cordova unibuild for app
Start on #3274.  Since we don't cache app isopacks to disk, we don't
have to worry about invalidating this.
2014-12-11 14:12:51 -08:00
David Glasser
576ad32eb2 Nudge console for every compiled source file
This will refresh the status bar more often and make the build tool more
responsive to signals.

Now that yield uses setImmediate, this has minimal effect on
performance.
2014-12-11 12:48:57 -08:00
David Glasser
141acd4200 Tweaks to StatusPoller
- Lower STATUS_INTERVAL_MS from 500 to 50. Note that we were effectively
  doing 150 or 100 anyway: the _pollFiber was polling every 100, and the
  nudged _throttledStatusPoll was actually throttling at the default of
  150, not 500, because the Throttled constructor was being invoked
  incorrectly (without the named 'interval' option).

- Use the same throttler for _pollFiber and nudge.
2014-12-11 12:41:25 -08:00
David Glasser
16af5c4756 Use setImmediate instead of setTimeout for yields
It's faster and still lets IO and signals through.
2014-12-11 12:40:03 -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
ace8430567 improve downloader UX
When only downloading 1 package, say which one in the progress bar. When
downloading several, say how many.
2014-12-10 15:26:41 -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
44563f13b4 Allow prerelease parts with digits and nondigits
Previously the constraint solver crashed on such things.

Fixes #3147.
2014-12-09 20:33:06 -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
David Glasser
d3ff3954bf PackageMap only has a local (not layered) catalog
No need to introduce the LayeredCatalog anywhere it's not needed.

Simplify some more things about LayeredCatalog:

- remove unused containingCatalog link from localCatalog to
  layeredCatalog

- because of that, simplify LayeredCatalog initialization to occur after
  localCatalog (no more circular references required)

- drop some other dead LayeredCatalog methods
2014-12-09 18:43:25 -08:00
David Glasser
31a43fc019 prune dead code 2014-12-09 18:30:22 -08:00
ekatek
a79e69130f Merge pull request #3232 from meteor/word-wrap-final
Automatically line-wrap output
2014-12-09 12:23:30 -08:00
Ben Newman
ba89b7db60 Automatically attach to and continue debugger when server restarts. 2014-12-09 13:38:28 -05:00
David Glasser
70f257c0e4 Memoize calls to js-analyze 2014-12-08 23:18:15 -08:00
David Glasser
4920ad1724 Use current previousSolution on runner rebuild 2014-12-08 22:02:50 -08:00
ekatek
c8e2c9f9d9 change to the right slash 2014-12-08 18:44:28 -08:00
ekatek
07ff83f2c9 rename Console.directory to Console.path, do not escape spaces
Rename Console.directory to Console.path.

Do not attempt to automatically escape spaces in file paths -- it is
hard to define a function that does this only sometimes, rather than all
the time. This is something that we could change later, once we have a better
idea of when we use it.
2014-12-08 18:37:49 -08:00
ekatek
8d213d0cb0 fix some newline breaks 2014-12-08 18:34:38 -08:00
ekatek
42b0d9247d remove the extra Warning sign 2014-12-08 18:30:52 -08:00
ekatek
9085975913 automatically escape spaces when printing directories
Directories should not wrap, but, also, we should make sure to automatically
escape spaces ("/ab/a\ b.js" vs "/ab/a b.js"). Because we might need to deal with
user input, we don't know if the user has already escaped the spaces before getting
the string. As such, we should only escape spaces that haven't already been escaped.
2014-12-08 14:54:36 -08:00
ekatek
f3e3dc7bca rename doNotWrap to noWrap in console.js' 2014-12-08 14:44:36 -08:00
ekatek
bcf6b200e1 introducing and using Console.directory
I think that this makes the API too complicated, but we might want to treat
directories the same way that we do commands (use some chalk when needed,
do not wrap, etc). This introduces the Console.directory function.

Of course, it is not really clear to me what happens if a directory is inside a command.
(ex: 'cd <directory>'). Right now, there is no difference. It makes sense to me that
we might want to keep the entire command the same style, so I am not wrapping those
in additional Console.directory units for now.
2014-12-08 14:15:54 -08:00
ekatek
f4d9e5bff1 adding extra line breaks to some cordova output
Glasser thinks it looks better with more newlines. I am not sure that's true --
but it looks kind of stern either way, so might as well add them in.
2014-12-08 13:57:24 -08:00
ekatek
714ed749e7 for URLs replace spaces with %20 instead of just taking care to not wrap them 2014-12-08 11:57:36 -08:00
ekatek
6bf699d5d9 Fixed some mistypes 2014-12-06 19:13:51 -08:00
ekatek
0b4cdc6e12 minor cleanup
- renamed an argument from 'opts' to 'options' in the comments as well.
- fixed some forgotten quotes.
2014-12-06 18:42:36 -08:00
ekatek
c9928d9c3a responding to minor fixes on 3232
- Wrapping URLs in Console.url. Making Console.url not word-wrap URLs,
on the off-chance that a URL could be wrapped.

- Creating a doNotWrap function on the Console. Call this on things that
are not commands or URLs, but still should not be wrapped.

- fixing minor mistypes, removing a comment about the dev bundle on the
Windows branch.
2014-12-06 18:32:40 -08:00