bors [Sat, 31 Dec 2016 02:48:35 +0000 (02:48 +0000)]
Auto merge of #3480 - alexcrichton:one-flaky-test, r=brson
Protect against spurious failure in ctrl_c test
A failure was witnessed in the Rust repository [1] which happened right after
this test and was a problem removing a directory. Local testing confirms that if
you kill Cargo then right afterwards it's very unlikely to be able to remove the
build directory, presumably because the child process is still getting torn down
in the background.
This commit fixes the ctrl_c test itself to wait for itself to release the bulid
directory, at which point the test has definitely passed.
Alex Crichton [Sat, 31 Dec 2016 02:40:20 +0000 (18:40 -0800)]
Protect against spurious failure in ctrl_c test
A failure was witnessed in the Rust repository [1] which happened right after
this test and was a problem removing a directory. Local testing confirms that if
you kill Cargo then right afterwards it's very unlikely to be able to remove the
build directory, presumably because the child process is still getting torn down
in the background.
This commit fixes the ctrl_c test itself to wait for itself to release the bulid
directory, at which point the test has definitely passed.
bors [Thu, 29 Dec 2016 20:38:27 +0000 (20:38 +0000)]
Auto merge of #3470 - alexcrichton:no-more-urls, r=steveklabnik
Delete manual installation URLs
These have existed since the beginning of time, but they haven't needed to exist
since long before 1.0. Let's just delete them now that they're out of date
anyway.
Alex Crichton [Thu, 29 Dec 2016 16:06:38 +0000 (08:06 -0800)]
Delete manual installation URLs
These have existed since the beginning of time, but they haven't needed to exist
since long before 1.0. Let's just delete them now that they're out of date
anyway.
bors [Mon, 19 Dec 2016 17:04:04 +0000 (17:04 +0000)]
Auto merge of #3410 - fmdkdd:fix-3390-message-format-parse-stderr, r=alexcrichton
Fix `--message-format JSON` when rustc emits non-JSON warnings
The `--message-format JSON` flag parses all the stderr output of rustc to JSON,
but rustc can emit non-JSON lines to stderr (e.g., for warning about the
unstable `-Z` flag on the stable channel), causing cargo to fail reporting
compilation errors when using `--message-format JSON`.
This commit adds a check to look for lines beginning with `{` to only parse
these lines as JSON. Other lines from rustc are forwarded to the stderr of
cargo.
fmdkdd [Thu, 15 Dec 2016 23:05:58 +0000 (00:05 +0100)]
Fix `--message-format JSON` when rustc emits non-JSON warnings
The `--message-format JSON` flag parses all the stderr output of rustc to JSON,
but rustc can emit non-JSON lines to stderr (e.g., for warning about the
unstable `-Z` flag on the stable channel), causing cargo to fail reporting
compilation errors when using `--message-format JSON`.
This commit adds a check to look for lines beginning with `{` to only parse
these lines as JSON. Other lines from rustc are forwarded to the stderr of
cargo.
bors [Thu, 15 Dec 2016 03:04:20 +0000 (03:04 +0000)]
Auto merge of #3393 - alexcrichton:fix-libz-linkage, r=brson
Bump libz-sys to 1.0.9
This just switches libz to always link statically instead of relying on the
system zlib. For MinGW it seems that linkage may default pull in a DLL, which is
almost never what we want.
Alex Crichton [Tue, 13 Dec 2016 08:22:00 +0000 (00:22 -0800)]
Bump libz-sys to 1.0.9
This just switches libz to always link statically instead of relying on the
system zlib. For MinGW it seems that linkage may default pull in a DLL, which is
almost never what we want.
Also update curl-sys to fix a build issue on MinGW.
bors [Wed, 14 Dec 2016 07:44:02 +0000 (07:44 +0000)]
Auto merge of #3296 - nrc:check, r=alexcrichton
cargo check
~~This is not finished - the big omission is no tests, and it needs some more testing too. It also requires https://github.com/rust-lang/rust/pull/37681.~~
However, this is my first non-trivial Cargo patch, so I'd like to get some early feedback.
r? @alexcrichton
and cc @rust-lang/tools since this adds a new Cargo sub-command (although we have previously discussed and approved the idea in a tools meeting).
bors [Wed, 14 Dec 2016 03:38:52 +0000 (03:38 +0000)]
Auto merge of #3363 - alexcrichton:libcmt, r=alexcrichton
Compile statically against the MSVC CRT
This updates our AppVeyor builds to compile with `-Ctarget-feature=+crt-static`
to help Cargo be a bit more portable and not rely on the MSVC redistributable
artifacts. Over time this may even let us converge on only releasing one build
of Cargo and just pairing that with all Windows toolchains...
bors [Wed, 14 Dec 2016 02:30:46 +0000 (02:30 +0000)]
Auto merge of #3399 - alexcrichton:fix-nightly, r=alexcrichton
Fix compatibility with Rust nightly
These two tests actually shouldn't have ever passed, but nightly Rust is more
principled about "$OUT_DIR" and doesn't leak it where possible, so these two
tests were accidentally compiling due to leaking '$OUT_DIR' for Cargo itself.
bors [Wed, 14 Dec 2016 01:19:37 +0000 (01:19 +0000)]
Auto merge of #3386 - matklad:warn-replace, r=alexcrichton
Warn if replace is not actually used
closes #3324
I've added warnings to `resolve_dependencies` inside `cargo_compile.rs`. Adding them to `resolve_with_previous` does not work because that method is called several times.
Perhaps the best idea is to refactor resolve facade, such that we have only `ops::resolve` and not `ops::resolve_ws`, `ops::resolve_with_previous` and `ops::resolve_dependencies`. IIRC, there were some bugs because of logic mismatch between `compile` and `metadata` commands.
Alex Crichton [Wed, 14 Dec 2016 01:18:32 +0000 (17:18 -0800)]
Fix compatibility with Rust nightly
These two tests actually shouldn't have ever passed, but nightly Rust is more
principled about "$OUT_DIR" and doesn't leak it where possible, so these two
tests were accidentally compiling due to leaking '$OUT_DIR' for Cargo itself.
Alex Crichton [Fri, 2 Dec 2016 22:34:18 +0000 (14:34 -0800)]
Compile statically against the MSVC CRT
This updates our AppVeyor builds to compile with `-Ctarget-feature=+crt-static`
to help Cargo be a bit more portable and not rely on the MSVC redistributable
artifacts. Over time this may even let us converge on only releasing one build
of Cargo and just pairing that with all Windows toolchains...
Nick Cameron [Wed, 16 Nov 2016 01:46:24 +0000 (14:46 +1300)]
cargo check
Adds a new mode - check - which only checks code, rather than generating machine code. It takes into account that proc macros and build scripts will still require generated code.
Implemented by adding a check profile and setting this on each Unit, unless the unit is required to be built (i.e., is a proc macro, build script, or dep of one).
bors [Thu, 8 Dec 2016 23:55:15 +0000 (23:55 +0000)]
Auto merge of #3221 - euclio:test-all, r=alexcrichton
Add `--all` flag to `cargo test`
Work towards #2878.
This flag allows a user to test all members of a workspace by using `cargo test --all`. The command is also supported when using a virtual workspace manifest.
bors [Wed, 7 Dec 2016 08:11:16 +0000 (08:11 +0000)]
Auto merge of #3361 - pwoolcoc:default-build-script, r=alexcrichton
Assume `build.rs` in the same directory as `Cargo.toml` is a build script (unless explicitly told not to)
So, in May I posted a question in the #cargo IRC room: https://botbot.me/mozilla/cargo/2016-05-26/?msg=66770068&page=1
This PR does what was discussed there. If `cargo` sees a `build.rs` in the same directory as the `Cargo.toml`, it will assume `build.rs` is a build script unless `package.build = false`. Just for completeness I also made `build = true` mean the same as `build = "build.rs"` but I'm not sure if that is okay or not.