Commit Graph

4428 Commits

Author SHA1 Message Date
David Glasser
453981214d Increase buffer size for netstat -ano on Windows
Fixes #4125 (hopefully).
2015-04-14 13:55:29 -07:00
David Greenspan
0b803b1aa9 Take glasser's suggestions on 4106e8c 2015-04-13 19:51:51 -07:00
David Greenspan
4106e8cade Allow space instead of @ in .meteor/versions
This change allows the tool to *read* .meteor/versions whether it uses
"@" or " " as a package/version separator.  It does not change how
.meteor/versions is written out.

Background:
The convention in the new Version Solver is that "foo@1.2.3" means a
constraint, which is satisfied by "foo 1.2.4" but not "foo 1.2.2", which
are specific versions of a package.  This convention avoids the same
confusion of .meteor/packages being a list of constraints while
.meteor/versions is conceptually a list of (package,version) pairs, even
though both look like package@version.

We'd like to replace "@" by " " in .meteor/versions from now on.
Unfortunately, even if the new tool can read old .meteor/versions files,
the old tool wouldn't be able to read the new style.  If in some release
of Meteor, we start writing .meteor/versions that use spaces, you won't
be able to switch between newer and older releases of Meteor without
getting a hard error about a malformed versions file in your app.

What we can do, at least, is start letting the tool read the better
format now, and maybe in the future we can switch.

This change also makes parsePackageAtVersion stand alone, instead of
being defined in terms of parsePackageConstraint, which is nice.
2015-04-12 16:30:26 -07:00
Avital Oliver
5781110def Correct remove references to WINDOWS-PREVIEW 2015-04-10 10:51:04 -07:00
Avital Oliver
3d33192d77 Revert "Remove reference to WINDOWS-PREVIEW"
This reverts commit 415c179310.

This commit was wrong. Instead of removing the `if` block
we should always be running the contents. Thanks @glasser
for noticing.
2015-04-10 10:49:10 -07:00
Avital Oliver
415c179310 Remove reference to WINDOWS-PREVIEW 2015-04-09 21:56:44 -07:00
David Glasser
2815e0ed32 run-mongo: Only use pgrep on OS X
The fix to #3999 didn't work on newer Linux systems whose pgrep contains
the backwards-incompatible change
f12277c74d
to not include arguments.

Since the inspiration to use pgrep instead of 'ps ax' was to work around
an OS X bug, just avoid pgrep on Linux in the first place.

Fixes #4115.
2015-04-03 14:26:50 -04:00
David Glasser
779f942aa3 Improvements to hot-code-push test
This test had been somewhat flaky.  It seems to be less flaky now.
Changes include:

- Trying to not send the client->server logging RPC if the client is
  about to reload due to autoupdate
- Making sure that the client doesn't send anything at all until a
  little bit after starting, in order to make the ordering of messages
  between tool-printed and server-printed messages more predictable

Also updated from standard-app-packages to meteor-tool.
2015-04-02 16:45:39 -04:00
David Glasser
2eb2f426e5 Fix self-test broken by bb271987e
Note that this test has been flaky in the past, but this was just a full
breakage.
2015-04-02 16:45:39 -04:00
Ben Newman
8a578e954b Fix race condition where shell listens too early.
Fixes #4109.
2015-04-02 15:28:46 -04:00
Robert Lowe
0496359025 Fixes typos in cordova commands
Fixes typos in cordova commands
2015-04-02 13:03:07 -04:00
David Glasser
a1e002a250 meteor run sees changes to .meteor/versions
`meteor run` doesn't always write changes to `.meteor/versions`: it only
does so if its release (or checkout-ness) matches `.meteor/release`.  So
it preferred to just remember the value of `.meteor/versions` from
rebuild to rebuild rather than forgetting what it knew and re-reading
the possibly-not-updated file.

However, if some other process changes `.meteor/versions`, it would
ignore that change.  With this fix, if `.meteor/versions` changes then
that is considered to be the previous versions list, not the last
version list from the same process.  For example, this would commonly
happen due to using `meteor update` to update packages (without changing
the tool, which would cause the runner to stop).

Fixes #3582.
2015-04-01 14:39:46 -04:00
David Glasser
0371c4ff26 Allow bare files on the server
This restriction was originally in place because we did not know of a
use case for bare files on the server.  The main use case for bare files
is putting pre-existing files in your app which expect top-level `var`s
to be "exported", which is common in browsers but not in Node.

However, there is a use case for this on the server: putting
pre-existing files that were originally written with clients in mind but
which function fine on the server into your server code. So we'll relax
the restriction.

Fixes #3681.
2015-04-01 12:36:42 -04:00
David Greenspan
8557d054dc Merge branch 'master' into devel 2015-03-31 16:36:15 -07:00
David Glasser
fcebaf2c9f findMongoPids: use pgrep where available
ps corrupts some non-ASCII characters on OS X.  pgrep doesn't, but isn't
available everywhere.

Fixes #3999.
2015-03-31 12:35:53 -07:00
sashko
5fbdfce664 Throw a nice error when you are trying to run an old release 2015-03-31 11:16:10 -07:00
Sashko Stubailo
3b225904c3 Throw error on Windows if you try to springboard to a super old release 2015-03-31 10:51:50 -07:00
Sashko Stubailo
eea9e21895 Rename test to more accurately reflect what it does now 2015-03-31 10:51:50 -07:00
David Glasser
9401572041 Remove broken do-not-update-to-rcs test
It was broken because fake-warehouse and test-package-server were
incompatible.  In order to actually use the published packages, we had
to sync test-package-server into the local warehouse.  But as soon as we
did that, the latest release became some other random release.

In any case, the semantics tested here have changed twice since 0.9.0!
In 0.9.0.1 we changed it from "ask for any RC means get any RC" to
"don't get any RCs that aren't explicitly anticipated".  And in 1.1
we're changing it to "minimize unanticipated RCs".

Manually running through the equivalent of this test, most of it works
except for the last line; `meteor update` will not take you from one RC
to the next, due to minimizing unanticipated RCs.  That's probably fine
though.

While we're at it, make it much more clear that warehouse and
test-package-server don't work together.
2015-03-31 13:08:53 -04:00
sashko
168a39adae Fix fake mongo test on Windows 2015-03-31 08:12:03 -07:00
David Glasser
89c22bf634 Fix crash on duplicate files in a package
Adding the same file twice in the same package is now an
error. Previously, this could either lead to the file being included
multiple times (eg, JS), or to a build time crash (eg, client-side
assets).
2015-03-31 10:52:43 -04:00
David Glasser
a17fcf253c Fix useMyCaller
Before:

   While reading package from
   `/private/tmp/meteor-duplicate-path-error/packages/dupe`:

   /Users/glasser/.meteor/packages/meteor-tool/.1.0.45.1y6cwq8++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/package-api.js:22:5:
   Invalid 'where' argument: '[object Object]'
   at Array.forEach (native)
   at Function._.each._.forEach
   (/Users/glasser/.meteor/packages/meteor-tool/.1.0.45.1y6cwq8++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
   at toArchArray
   (/Users/glasser/.meteor/packages/meteor-tool/.1.0.45.1y6cwq8++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/package-api.js:22:5)
   at PackageAPI._.extend.addFiles
   (/Users/glasser/.meteor/packages/meteor-tool/.1.0.45.1y6cwq8++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/package-api.js:287:12)
   at package.js:2:7

After:

   While reading package from
   `/private/tmp/meteor-duplicate-path-error/packages/dupe`:
   package.js:2:7: Invalid 'where' argument: '[object Object]'

The major problem here was that numeric useMyCaller never quite worked,
since useMyCaller was only used to calculate the file/line/etc for the
error, and not to convince formatMessages to not print the rest of the
stack.

The other issue is that `_.each` adds two levels of stack over just
using a `for` loop, whereas 8bcbd6534 only added 1 to the useMyCaller
argument.
2015-03-31 10:52:42 -04:00
David Glasser
f14464b59a findMongoPids: use pgrep where available
ps corrupts some non-ASCII characters on OS X.  pgrep doesn't, but isn't
available everywhere.

Fixes #3999.
2015-03-31 00:53:22 -04:00
Slava Kim
6d7279373e Fix trailing whitespace for empty lines, in unwrapped mode 2015-03-30 21:53:18 -07:00
Slava Kim
ae398ede87 Don't expect a wrapped path in self-tests for meteor show 2015-03-30 21:51:54 -07:00
Slava Kim
7e7005cc9d Reimplement indent for non-wrapped text 2015-03-30 21:35:33 -07:00
Slava Kim
9bd5b22a85 Indent in unwrapped mode 2015-03-30 21:31:05 -07:00
Slava Kim
bfadacbe8c Revert the broken pattern reporting 2015-03-30 21:11:59 -07:00
Slava Kim
479a14af1d Don't expect the directory line to be wrapped 2015-03-30 21:10:22 -07:00
Slava Kim
742fdca951 Don't wrap the tests and patterns 2015-03-30 21:06:47 -07:00
Slava Kim
56a8ec7556 Use a more specific METEOR_NO_WRAP 2015-03-30 20:55:05 -07:00
Sashko Stubailo
93fe5eb9f1 Also don't crash when cleaning up temp dirs at the end of app run 2015-03-30 20:49:07 -07:00
Slava Kim
613f879abd Don't wrap text in self-test mode 2015-03-30 20:47:24 -07:00
Slava Kim
9abdf1eef1 Fixes to old cli tests 2015-03-30 20:15:36 -07:00
Sashko Stubailo
19a3e31353 Make deploy use mkdtemp 2015-03-30 19:56:35 -07:00
Sashko Stubailo
557f65970d Don't crash on failed temp dir cleanup 2015-03-30 19:55:44 -07:00
David Greenspan
b99c9a42c4 Fix remaining 'publish' self-test failures on OS X 2015-03-30 19:41:41 -07:00
David Greenspan
3bc172dc20 Support --allow-incompatible-update in meteor list
Undocumented flag.  This is one of those cases that is rare but may
come up, because `meteor list` runs the version solver (and writes
.meteor/versions).  For example, it may come up if you run `meteor 
list` with PACKAGE_DIRS and then without (or vice versa).  You'll
get a message that says to pass --allow-incompatible-update, so we
must support it.
2015-03-30 18:04:40 -07:00
David Greenspan
a4bda98fa8 Fix self-test 'add package with no builds' 2015-03-30 17:01:16 -07:00
David Greenspan
4a4680b5d2 Exclude published package from previousSolution
When you `meteor publish` a package (not from an app), a
ProjectContext is created that gets the Version Solver
"previousSolution" from the .versions file in the project directory.
From the point of view of the Version Solver, the package itself is
a root dependency, so if the version changes from last time, you
may be asked to pass --allow-incompatible-update!  That isn't right.
However, the ProjectContext created by `meteor publish` doesn't know
it is created for a particular package.  But it does have the package
marked as "explicitly added."  So for now, the simplest thing to do
is to alter the input to the Version Solver based on the value of
explicitlyAddedLocalPackageDirs.

Oh, another wrinkle here is that we don't actually know the name of
the package we're publishing when we create the PackageContext, so it
can't be an option.

Example of a failing self-test that now passes:
'packages with organizations'
2015-03-30 16:58:47 -07:00
Slava Kim
56e1e08292 Rewrite part of the old/cli-test.sh test to selftest 2015-03-30 16:35:32 -07:00
David Glasser
df90b56287 Add XXX note about #3854 2015-03-27 23:13:59 -07:00
Avital Oliver
358d797373 Improve error on publish-for-arch with colons
It's unfortunate that this change is in `compiler.compile`. It's
actually unfortunate that we only catch this during publish-for-arch.
But it seems too much to disallow all packages published with colons
even if they don't have binary dependencies since a lot of old
packages were created with our command-line tool that created
filenames with colons in them.
2015-03-26 18:46:12 -07:00
David Glasser
d79ca97398 Be clearer that you need to publish for this arch
Fixes #3961.
2015-03-26 17:32:37 -07:00
David Glasser
43b1c30bab Be clearer that you need to publish for this arch
Fixes #3961.
2015-03-26 17:19:31 -07:00
Avital Oliver
120febbf8a Fix meteor reset on Windows
We were incorrectly always assuming that Meteor is running
by not actually trying to connect to the port that the
MONGO-PORT file reports Mongo is listening to.

The problem is that that file isn't cleared when Meteor
quits or crashes.

Fixes https://github.com/meteor/windows-preview/issues/138
2015-03-26 17:11:17 -07:00
Slava Kim
2b2b721ff4 Reformat the warnings 2015-03-26 17:07:00 -07:00
Slava Kim
0a7cf60294 Add a warning about proxy env variables when a connection in tool fails 2015-03-26 16:58:41 -07:00
David Glasser
da87051f34 meteor shell should preserve global _
2443d832 (in 1.0.4) ensures that the repl doesn't overwrite `_`, but it
replaces the server's global `_` with shell-server's `_`.  This changes
appears to preserve it.

Fixes #4010.
2015-03-26 14:53:47 -07:00
David Glasser
d226fd18af Plugins register extensions, not filenames
This particular piece of code (introduced in #1407) would decide that
Plugin.registerSourceHandler('foo.bar') would match a file named
'foo.bar', but that was not the intention. In an app, the (correct) code
in getSourcesFunc does expect the leading period to exist, so you end up
with an odd situation where this code allows equal matches, but it only
gets to see the file if it's in a package (not app) or if there's
another plugin registering for 'bar'.

Fixes #3985.
2015-03-26 13:56:29 -07:00