Commit Graph

4417 Commits

Author SHA1 Message Date
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
Slava Kim
ac15655897 Remove stray if statemet
A leftover from debugging
2015-03-25 18:25:04 -07:00
Slava Kim
9305e9d514 Adapt wipe-all-packages command to Windows layout 2015-03-25 17:16:46 -07:00
Slava Kim
a1fefa9f92 Fix wipe-all-packages test for Windows 2015-03-25 17:16:46 -07:00
Slava Kim
7e03f78b80 Be able to parse absolute and relative paths in meteor.bat 2015-03-25 17:16:46 -07:00
Slava Kim
9b12a33c6b Fix the default release track issue on Windows 2015-03-25 17:16:46 -07:00
Slava Kim
bba6b617a3 Add fake builds in the test 2015-03-25 17:16:46 -07:00
Slava Kim
5337b3b6c6 Fix the test to generate a relative symlink 2015-03-25 17:16:46 -07:00
Slava Kim
d9cc95531b additional checks in tests to ensure that exactly two versions of tool are not removed 2015-03-25 17:16:46 -07:00
Slava Kim
7be6fe4018 Wipe all packages test
Tested on Mac
2015-03-25 17:16:46 -07:00
Sashko Stubailo
0e3e529751 Add command to test wipeAllPackages 2015-03-25 17:16:46 -07:00
Sashko Stubailo
4ff636c7df Merge branch 'master' into release-1.1
Conflicts:
	History.md
2015-03-25 16:07:42 -07:00