bors [Wed, 22 Feb 2017 18:35:39 +0000 (18:35 +0000)]
Auto merge of #3682 - alexcrichton:serde, r=brson
Migrate from rustc-serialize to Serde
This commit migrates Cargo as much as possible from rustc-serialize to
Serde. This not only provides an excellent testing ground for the toml
0.3 release but it also is a big boost to the speed of parsing the JSON
bits of the registry.
This doesn't completely excise the dependency just yet as docopt still
requires it along with handlebars. I'm sure though that in time those
crates will migrate to serde!
Alex Crichton [Fri, 10 Feb 2017 20:01:52 +0000 (12:01 -0800)]
Migrate from rustc-serialize to Serde
This commit migrates Cargo as much as possible from rustc-serialize to
Serde. This not only provides an excellent testing ground for the toml
0.3 release but it also is a big boost to the speed of parsing the JSON
bits of the registry.
This doesn't completely excise the dependency just yet as docopt still
requires it along with handlebars. I'm sure though that in time those
crates will migrate to serde!
bors [Wed, 22 Feb 2017 15:02:02 +0000 (15:02 +0000)]
Auto merge of #3733 - llogiq:clippy, r=alexcrichton
some clippy-suggested improvements
This fixes a number of [clippy](https://github.com/Manishearth/rust-clippy) warnings. It's mostly about readability, though a few changes could affect performance (though probably not measurably).
I've left out things to fix later; I thought I'd just push the first batch to see if you like it.
bors [Fri, 17 Feb 2017 18:38:07 +0000 (18:38 +0000)]
Auto merge of #3716 - matklad:multi-tests, r=alexcrichton
Allow to run several integration tests
It's useful to be able to run several, but not all, test targets at once (especially in the IDE, where you want to select a bunch of files and command "run these!"). This seems to work, but obviously needs some tests. `Options` `struct` already supports several targets.
bors [Tue, 14 Feb 2017 19:46:26 +0000 (19:46 +0000)]
Auto merge of #3700 - matklad:faster-test, r=alexcrichton
Don't use real serde in tests
This test used to take 1.5 minutes on my machine (without significant CPU usage however), now it finishes in a couple of seconds. I don't fully understand what is tested here, but I suppose we don't really need serde.
bors [Mon, 13 Feb 2017 23:23:39 +0000 (23:23 +0000)]
Auto merge of #3689 - ms705:master, r=alexcrichton
More intuitive CARGO_INCREMENTAL semantics
Currently, the mere presence of a `CARGO_INCREMENTAL` variable in the environment causes incremental compilation to be enabled. This has the very counterintuitive effect that `CARGO_INCREMENTAL=0` and even `CARGO_INCREMENTAL=` mean incremental compilation is *on*.
This PR brings the semantics in line with how they are defined in the tests (cf. [tests/build.rs:45](https://github.com/rust-lang/cargo/blob/master/tests/build.rs#L45)), and in [public-facing documentation](https://internals.rust-lang.org/t/incremental-compilation-beta/4721).
See also [rust#39773](https://github.com/rust-lang/rust/issues/39773) for an example of this causing confusion in the wild.
bors [Mon, 13 Feb 2017 21:05:47 +0000 (21:05 +0000)]
Auto merge of #3684 - casey:search-copy-pastafication, r=alexcrichton
Increase copypastafication of `cargo search`
Formats the search results printed by `cargo search` so that they can be
copied directly into a `Cargo.toml` file.
I used `^`, since I like being explicit, although that seems not to be the convention, so I'd be happy to remote it.
I also added a `#` in front of the description, so that that can be copy pastaed as well. I'm not super attached to this idea, but I think it's interesting, since it would serve to document what the various dependencies of a crate are for new contributors.
For example:
```
$ cargo search clap
clap = "^2.20.3" # A simple to use, efficient, and full featured Command Line ArgumentParser
please-clap = "^0.1.0" # Pattern-match against Clap subcommands and arguments.
clapcomp = "^0.1.5" # clap completion generator as command
clap-test = "^0.1.1" # functions and macros to assist in testing clap
structopt = "^0.0.2" # Parse command line argument by defining a struct.
capgun = "^0.1.1" # fire when ready file watcher
structopt-derive = "^0.0.2" # Parse command line argument by defining a struct, derive crate.
cargo-outdated = "^0.3.0" # Cargo subcommand for displaying when dependencies are out of date
wesers = "^0.4.1" # a simple HTTP/HTTPS server in Rust
cargo-arch = "^0.1.0" # Rust Arch Linux package packer
... and 6 crates more (use --limit N to see more)
```
Previously, the mere presence of a CARGO_INCREMENTAL variable in the
environment caused incremental compilation to happen. This has the very
unintuitive effect that `CARGO_INCREMENTAL=0` and even
`CARGO_INCREMENTAL=` mean incremental compilation is *on*.
This change brings the semantics in line with how they are defined in
the tests (cf. tests/build.rs:45), and in public-facing documentation
(https://internals.rust-lang.org/t/incremental-compilation-beta/4721).
bors [Wed, 8 Feb 2017 01:03:17 +0000 (01:03 +0000)]
Auto merge of #3583 - alexcrichton:fix-tags, r=brson
Handle `rev` being a `tag`
Previously if a rev was specified as a tag then we'd trip an assertion because
resetting to that tag would reset to the tag that the commit pointed to, which
would then cause the head id of the repo to be different than what we thought it
was.
Instead, we handle the case where a `rev` specification is a tag explicitly by
using the tag's target id as the revision that we're going to check out, not the
id of the tag itself.
bors [Tue, 7 Feb 2017 22:02:51 +0000 (22:02 +0000)]
Auto merge of #3651 - pkgw:pr-issue-3366, r=alexcrichton
Attempt to solve #3366, regarding spurious shared library search paths.
This drops `native_dirs` entries that are not within the target output when modifying the (DY)LD_LIBRARY_PATH environment variable before running programs.
Peter Williams [Tue, 7 Feb 2017 20:55:36 +0000 (15:55 -0500)]
Attempt to fix the run_with_library_paths test for Windows.
I was just pasting the build directories into Rust string literals, so Windows
paths with backslashes were being interpreted as having unknown string
escapes. Raw string guards should fix this for all but the most pathological
of build directories.
bors [Tue, 7 Feb 2017 20:08:02 +0000 (20:08 +0000)]
Auto merge of #3664 - pwoolcoc:issue-3391, r=alexcrichton
Assume that a `build.rs` file is a build script
If cargo sees a `build.rs` file in the same directory as the current
`Cargo.toml`, it will assume that the `build.rs` file is a build script,
unless there is `build = false` in the `Cargo.toml` file.