]> git.proxmox.com Git - cargo.git/log
cargo.git
7 years agoAuto merge of #3775 - alexcrichton:version-info, r=alexcrichton
bors [Wed, 1 Mar 2017 03:36:24 +0000 (03:36 +0000)]
Auto merge of #3775 - alexcrichton:version-info, r=alexcrichton

Prefer CARGO_PKG_* in version info

These are always set by Cargo and avoids rustbuild-building-cargo to need to
parse semver

7 years agoAuto merge of #3699 - alexcrichton:sslop, r=brson
bors [Wed, 1 Mar 2017 01:59:31 +0000 (01:59 +0000)]
Auto merge of #3699 - alexcrichton:sslop, r=brson

Add an option to ignore SSL revocation checking

This is apparently required in some Windows setups to get past SSL context
creation in schannel.

7 years agoAuto merge of #3776 - alexcrichton:underscores, r=matklad
bors [Tue, 28 Feb 2017 22:28:06 +0000 (22:28 +0000)]
Auto merge of #3776 - alexcrichton:underscores, r=matklad

Accept more underscore variants in configuration

Preserving more historical behavior of the old TOML parser.

7 years agoAccept more underscore variants in configuration
Alex Crichton [Tue, 28 Feb 2017 19:09:34 +0000 (11:09 -0800)]
Accept more underscore variants in configuration

Preserving more historical behavior of the old TOML parser.

7 years agoPrefer CARGO_PKG_* in version info
Alex Crichton [Tue, 28 Feb 2017 17:45:08 +0000 (09:45 -0800)]
Prefer CARGO_PKG_* in version info

These are always set by Cargo and avoids rustbuild-building-cargo to need to
parse semver

7 years agoAuto merge of #3771 - alexcrichton:read-more, r=matklad
bors [Tue, 28 Feb 2017 14:26:05 +0000 (14:26 +0000)]
Auto merge of #3771 - alexcrichton:read-more, r=matklad

Accept `default_features` for `default-features`

This was accepted by this historical TOML parser, so we'll need to preserve this
ability.

Closes #3768

7 years agoAuto merge of #3770 - jbendig:issue_3762, r=alexcrichton
bors [Mon, 27 Feb 2017 22:04:26 +0000 (22:04 +0000)]
Auto merge of #3770 - jbendig:issue_3762, r=alexcrichton

Fixes #3762

Fixes issue #3762. `cargo test` and `cargo bench` should no longer compile binaries with required features that have not been selected.

7 years agoAccept `default_features` for `default-features`
Alex Crichton [Mon, 27 Feb 2017 22:01:33 +0000 (14:01 -0800)]
Accept `default_features` for `default-features`

This was accepted by this historical TOML parser, so we'll need to preserve this
ability.

Closes #3768

7 years agoFixed compile failing because Resolve::features() no longer returns an Option.
James Bendig [Mon, 27 Feb 2017 21:45:39 +0000 (15:45 -0600)]
Fixed compile failing because Resolve::features() no longer returns an Option.

7 years agoFixed `cargo test` and `cargo bench` compiling binaries with required features that...
James Bendig [Mon, 27 Feb 2017 21:19:34 +0000 (15:19 -0600)]
Fixed `cargo test` and `cargo bench` compiling binaries with required features that have not been selected.

7 years agoAuto merge of #3760 - sanmai-NL:Cargo_new_gitignore_rustfmt_.rs.bk, r=alexcrichton
bors [Mon, 27 Feb 2017 10:44:14 +0000 (10:44 +0000)]
Auto merge of #3760 - sanmai-NL:Cargo_new_gitignore_rustfmt_.rs.bk, r=alexcrichton

Add `src/**/*.rs.bk` to VCS ignore file

See #2409, specifically https://github.com/rust-lang/cargo/pull/2409#issuecomment-281707650.

Also limit `target` exclusion to `target/` (dirs) as expected.

7 years agoAuto merge of #3752 - matklad:always-artifacts, r=alexcrichton
bors [Mon, 27 Feb 2017 05:49:15 +0000 (05:49 +0000)]
Auto merge of #3752 - matklad:always-artifacts, r=alexcrichton

Always produce artifact messages

This changes `artifact` messages in several ways:

* They are produced even for fresh builds

* They used the path after hard linking (@jsgf talked about it in the end of https://github.com/rust-lang/cargo/pull/3319#issuecomment-263975431)

* Don't produce filenames if the compiler has not actually produced the binaries (`-Z-no-trans`).

7 years agoExclude `*.rs.bk` files more liberally
Sander Maijers [Sun, 26 Feb 2017 13:31:55 +0000 (14:31 +0100)]
Exclude `*.rs.bk` files more liberally

This will cover them in different places as well, considering the default
[project layout](https://doc.crates.io/guide.html#project-layout).

7 years agoProduce artifacts JSON messages even for fresh builds
Aleksey Kladov [Wed, 22 Feb 2017 08:36:44 +0000 (11:36 +0300)]
Produce artifacts JSON messages even for fresh builds

7 years agoAuto merge of #3742 - matklad:sets-are-monoid, r=alexcrichton
bors [Sat, 25 Feb 2017 07:32:31 +0000 (07:32 +0000)]
Auto merge of #3742 - matklad:sets-are-monoid, r=alexcrichton

Simplify feature-handling code

A neat (imo :) ) hack to use an empty `&HashSet` instead of `Option<&HashSet>`.

7 years agoAdd `src/**/*.rs.bk` to VCS ignore file
Sander Maijers [Fri, 24 Feb 2017 18:17:46 +0000 (19:17 +0100)]
Add `src/**/*.rs.bk` to VCS ignore file

Limit `target` exclusion to `target/` dirs.

7 years agoAuto merge of #3758 - mbrubeck:docs, r=alexcrichton
bors [Thu, 23 Feb 2017 18:33:54 +0000 (18:33 +0000)]
Auto merge of #3758 - mbrubeck:docs, r=alexcrichton

Document that OUT_DIR is set during compilation for packages with build scripts

None

7 years agoDocument that OUT_DIR is set during compilation for packages with build scripts
Matt Brubeck [Thu, 23 Feb 2017 18:30:49 +0000 (10:30 -0800)]
Document that OUT_DIR is set during compilation for packages with build scripts

7 years agoSimplify feature-handling code
Aleksey Kladov [Tue, 21 Feb 2017 13:54:27 +0000 (16:54 +0300)]
Simplify feature-handling code

7 years agoAdd an option to ignore SSL revocation checking
Alex Crichton [Tue, 14 Feb 2017 15:44:21 +0000 (07:44 -0800)]
Add an option to ignore SSL revocation checking

This is apparently required in some Windows setups to get past SSL context
creation in schannel.

7 years agoAuto merge of #3682 - alexcrichton:serde, r=brson
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!

7 years agoMigrate from rustc-serialize 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!

7 years agoAuto merge of #3733 - llogiq:clippy, r=alexcrichton
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.

7 years agoAuto merge of #3743 - jbendig:required_features_doc, r=alexcrichton
bors [Wed, 22 Feb 2017 01:56:06 +0000 (01:56 +0000)]
Auto merge of #3743 - jbendig:required_features_doc, r=alexcrichton

Improved required-features docs

This should make it more clear about what happens when not all of the required features are selected.

7 years agoAuto merge of #3738 - hiseni:master, r=alexcrichton
bors [Wed, 22 Feb 2017 00:09:07 +0000 (00:09 +0000)]
Auto merge of #3738 - hiseni:master, r=alexcrichton

add help email mention to the policies page

Update policies page to include help email address mention as described here: rust-lang/crates.io#522 :slightly_smiling_face:

7 years agoAuto merge of #3735 - king6cong:clean, r=alexcrichton
bors [Tue, 21 Feb 2017 22:20:12 +0000 (22:20 +0000)]
Auto merge of #3735 - king6cong:clean, r=alexcrichton

make code more readable

7 years agoAuto merge of #3734 - king6cong:typo, r=alexcrichton
bors [Tue, 21 Feb 2017 20:29:29 +0000 (20:29 +0000)]
Auto merge of #3734 - king6cong:typo, r=alexcrichton

typo fix

7 years agoAuto merge of #3731 - alexcrichton:check-all, r=matklad
bors [Tue, 21 Feb 2017 18:12:24 +0000 (18:12 +0000)]
Auto merge of #3731 - alexcrichton:check-all, r=matklad

Add `cargo check --all`

This'll check all `build` targets for all packages in a workspace

7 years agoChanged wording for required-features docs to be more clear that missing features...
James Bendig [Tue, 21 Feb 2017 17:22:32 +0000 (11:22 -0600)]
Changed wording for required-features docs to be more clear that missing features means the target is skipped.

7 years agoAuto merge of #3708 - matklad:assert-tests, r=alexcrichton
bors [Tue, 21 Feb 2017 16:15:07 +0000 (16:15 +0000)]
Auto merge of #3708 - matklad:assert-tests, r=alexcrichton

Assert that we don't build test project twice.

Discussed in https://github.com/rust-lang/cargo/pull/3691#discussion_r100878827.

I've modify the offending tests to be more explicit about recreating projects.

7 years agoAuto merge of #3737 - jbendig:issue_3727, r=alexcrichton
bors [Tue, 21 Feb 2017 14:27:29 +0000 (14:27 +0000)]
Auto merge of #3737 - jbendig:issue_3727, r=alexcrichton

Fixed required-features not working with dependencies' features.

This should fix issue #3727.

@sgrif suggested making the documentation more clear as well. Should I submit a separate pull request or add a commit for that?

7 years agoadd help email mention to the policies page
Bogdan Arabadzhi [Tue, 21 Feb 2017 04:41:14 +0000 (07:41 +0300)]
add help email mention to the policies page

7 years agoimproved formatting for bonus points
Andre Bogus [Sun, 19 Feb 2017 23:45:34 +0000 (00:45 +0100)]
improved formatting for bonus points

7 years agoFixed some lines being over 100 characters.
James Bendig [Mon, 20 Feb 2017 20:51:43 +0000 (14:51 -0600)]
Fixed some lines being over 100 characters.

7 years agoFixed required-features not working with dependencies' features for issue #3727.
James Bendig [Mon, 20 Feb 2017 19:31:03 +0000 (13:31 -0600)]
Fixed required-features not working with dependencies' features for issue #3727.

7 years agomake code more readable
king6cong [Mon, 20 Feb 2017 11:30:15 +0000 (19:30 +0800)]
make code more readable

7 years agotypo fix
king6cong [Mon, 20 Feb 2017 07:24:24 +0000 (15:24 +0800)]
typo fix

7 years agoimproved formatting for bonus points
Andre Bogus [Sun, 19 Feb 2017 23:45:34 +0000 (00:45 +0100)]
improved formatting for bonus points

7 years agosome clippy-suggested improvements
Andre Bogus [Sat, 18 Feb 2017 12:01:10 +0000 (13:01 +0100)]
some clippy-suggested improvements

7 years agoFix recompilation test for mac
Aleksey Kladov [Sat, 18 Feb 2017 06:34:38 +0000 (09:34 +0300)]
Fix recompilation test for mac

On macs, mtime has a seconds granularity, so we need to sleep a bit

7 years agoAuto merge of #3723 - king6cong:doc, r=alexcrichton
bors [Sat, 18 Feb 2017 06:21:39 +0000 (06:21 +0000)]
Auto merge of #3723 - king6cong:doc, r=alexcrichton

remove legacy doc

7 years agoAuto merge of #3730 - froydnj:cargo-version-dash-fix, r=alexcrichton
bors [Sat, 18 Feb 2017 05:06:59 +0000 (05:06 +0000)]
Auto merge of #3730 - froydnj:cargo-version-dash-fix, r=alexcrichton

use space, not dash, in `cargo --version` output

 #3604 inadvertently changed the output format of `cargo --version`:

```
froydnj@hawkeye:~/src/cargo.git$ ./target/x86_64-unknown-linux-gnu/release/cargo --version
cargo-0.17.0-dev (ae4a4d8 2017-01-27)
froydnj@hawkeye:~/src/cargo.git$ cargo --version
cargo 0.16.0-nightly (6e0c18c 2017-01-27)
```

Note the dash between cargo and the version number in the newer version.

Let's put the space back to not break things that might depend on the
`--version` output.

7 years agoAuto merge of #3715 - saghm:master, r=alexcrichton
bors [Fri, 17 Feb 2017 20:56:08 +0000 (20:56 +0000)]
Auto merge of #3715 - saghm:master, r=alexcrichton

Fix typo in code example

7 years agoAdd `cargo check --all`
Alex Crichton [Fri, 17 Feb 2017 17:09:23 +0000 (09:09 -0800)]
Add `cargo check --all`

This'll check all `build` targets for all packages in a workspace

7 years agoAuto merge of #3716 - matklad:multi-tests, r=alexcrichton
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.

7 years agouse space, not dash, in `cargo --version` output
Nathan Froyd [Fri, 17 Feb 2017 16:44:44 +0000 (11:44 -0500)]
use space, not dash, in `cargo --version` output

 #3604 inadvertently changed the output format of `cargo --version`:

```
froydnj@hawkeye:~/src/cargo.git$ ./target/x86_64-unknown-linux-gnu/release/cargo --version
cargo-0.17.0-dev (ae4a4d8 2017-01-27)
froydnj@hawkeye:~/src/cargo.git$ cargo --version
cargo 0.16.0-nightly (6e0c18c 2017-01-27)
```

Note the dash between cargo and the version number in the newer version.

Let's put the space back to not break things that might depend on the
`--version` output.

7 years agoAuto merge of #3729 - alexcrichton:remove-caching, r=alexcrichton
bors [Fri, 17 Feb 2017 16:24:06 +0000 (16:24 +0000)]
Auto merge of #3729 - alexcrichton:remove-caching, r=alexcrichton

Disable caches on AppVeyor/Travis

They just seem to grow without bound and cause problems unfortunately :(

7 years agoDisable caches on AppVeyor/Travis
Alex Crichton [Fri, 17 Feb 2017 16:23:23 +0000 (08:23 -0800)]
Disable caches on AppVeyor/Travis

They just seem to grow without bound and cause problems unfortunately :(

7 years agoDocument that `cargo test` only compiles example
Aleksey Kladov [Fri, 17 Feb 2017 07:04:30 +0000 (10:04 +0300)]
Document that `cargo test` only compiles example

7 years agoremove legacy doc
king6cong [Fri, 17 Feb 2017 03:57:52 +0000 (11:57 +0800)]
remove legacy doc

7 years agoAuto merge of #3717 - king6cong:clean, r=alexcrichton
bors [Thu, 16 Feb 2017 20:08:18 +0000 (20:08 +0000)]
Auto merge of #3717 - king6cong:clean, r=alexcrichton

remove unnecessary code

7 years agoAuto merge of #3719 - alexcrichton:curl-sys, r=alexcrichton
bors [Thu, 16 Feb 2017 17:36:26 +0000 (17:36 +0000)]
Auto merge of #3719 - alexcrichton:curl-sys, r=alexcrichton

Update libz-sys

Try to fix AppVeyor CI

7 years agoUpdate libz-sys to fix AppVeyor CI
Alex Crichton [Thu, 16 Feb 2017 17:35:35 +0000 (09:35 -0800)]
Update libz-sys to fix AppVeyor CI

Needs a fix for msys instead of Windows paths

7 years agoAdd tests for testing several targets
Aleksey Kladov [Thu, 16 Feb 2017 16:46:39 +0000 (19:46 +0300)]
Add tests for testing several targets

7 years agoRevive dependency recompilation test
Aleksey Kladov [Thu, 16 Feb 2017 11:18:55 +0000 (14:18 +0300)]
Revive dependency recompilation test

7 years agoremove unnecessary code
king6cong [Thu, 16 Feb 2017 07:11:51 +0000 (15:11 +0800)]
remove unnecessary code

7 years agoAllow to run several integration tests
Aleksey Kladov [Thu, 16 Feb 2017 10:17:30 +0000 (13:17 +0300)]
Allow to run several integration tests

7 years agoFix typo in code example
Saghm Rossi [Wed, 15 Feb 2017 22:52:25 +0000 (17:52 -0500)]
Fix typo in code example

7 years agoAuto merge of #3714 - alexcrichton:update-git2, r=alexcrichton
bors [Wed, 15 Feb 2017 22:47:05 +0000 (22:47 +0000)]
Auto merge of #3714 - alexcrichton:update-git2, r=alexcrichton

Update libgit2

Pull in a fix for #3610

7 years agoUpdate libgit2
Alex Crichton [Wed, 15 Feb 2017 22:16:12 +0000 (14:16 -0800)]
Update libgit2

Pull in a fix for #3610

7 years agoAssert that we don't build test project twice.
Aleksey Kladov [Wed, 15 Feb 2017 14:16:41 +0000 (17:16 +0300)]
Assert that we don't build test project twice.

That may work on linux and fail on windows, so it's better to proactively verify it.

7 years agoAuto merge of #3710 - seppo0010:one-file-too-many, r=alexcrichton
bors [Wed, 15 Feb 2017 17:43:01 +0000 (17:43 +0000)]
Auto merge of #3710 - seppo0010:one-file-too-many, r=alexcrichton

Fix dupe word in documentation

7 years agoFix dupe word in documentation
Sebastian Waisbrot [Wed, 15 Feb 2017 17:27:58 +0000 (14:27 -0300)]
Fix dupe word in documentation

7 years agoAuto merge of #3707 - king6cong:handle_stderr, r=alexcrichton
bors [Wed, 15 Feb 2017 15:18:36 +0000 (15:18 +0000)]
Auto merge of #3707 - king6cong:handle_stderr, r=alexcrichton

fix arg name

7 years agofix arg name
king6cong [Wed, 15 Feb 2017 10:10:28 +0000 (18:10 +0800)]
fix arg name

7 years agoAuto merge of #3701 - matklad:rel-manifest-path, r=alexcrichton
bors [Tue, 14 Feb 2017 21:50:54 +0000 (21:50 +0000)]
Auto merge of #3701 - matklad:rel-manifest-path, r=alexcrichton

Normalize ws root path

closes #3586

r? @alexcrichton

7 years agoNormalize ws root path
Aleksey Kladov [Tue, 14 Feb 2017 20:04:24 +0000 (23:04 +0300)]
Normalize ws root path

closes #3586

7 years agoAuto merge of #3700 - matklad:faster-test, r=alexcrichton
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.

7 years agoDon't use real serde in tests
Aleksey Kladov [Tue, 14 Feb 2017 19:40:48 +0000 (19:40 +0000)]
Don't use real serde in tests

7 years agoAuto merge of #3692 - malbarbo:test-args, r=alexcrichton
bors [Tue, 14 Feb 2017 03:03:16 +0000 (03:03 +0000)]
Auto merge of #3692 - malbarbo:test-args, r=alexcrichton

Pass multiples --test-args to the tester

Like --cfg, --test-args accept multiple matches, we should use it and
avoid some unexpected behavior joinning the arguments with space.

7 years agoAuto merge of #3691 - matklad:run-pkg, r=alexcrichton
bors [Tue, 14 Feb 2017 01:14:36 +0000 (01:14 +0000)]
Auto merge of #3691 - matklad:run-pkg, r=alexcrichton

cargo run supports --package argument

closes #3529

7 years agoAuto merge of #3689 - ms705:master, r=alexcrichton
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.

7 years agoAuto merge of #3684 - casey:search-copy-pastafication, r=alexcrichton
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)
```

7 years agocargo run supports --package argument
Aleksey Kladov [Mon, 13 Feb 2017 16:02:27 +0000 (19:02 +0300)]
cargo run supports --package argument

closes #3529

7 years agoAuto merge of #3693 - alexcrichton:improve, r=alexcrichton
bors [Mon, 13 Feb 2017 18:48:08 +0000 (18:48 +0000)]
Auto merge of #3693 - alexcrichton:improve, r=alexcrichton

Rework some required-features tests

Don't delete the build dir as this ends up being flaky on Windows.

7 years agoRework some required-features tests
Alex Crichton [Mon, 13 Feb 2017 17:59:36 +0000 (09:59 -0800)]
Rework some required-features tests

Don't delete the build dir as this ends up being flaky on Windows.

7 years agoPass multiples --test-args to the tester
Marco A L Barbosa [Mon, 13 Feb 2017 17:34:29 +0000 (15:34 -0200)]
Pass multiples --test-args to the tester

Like --cfg, --test-args accept multiple matches, we should use it and
avoid some unexpected behavior joinning the arguments with space.

7 years agoFix CARGO_INCREMENTAL semantics to be intuitive
Malte Schwarzkopf [Mon, 13 Feb 2017 00:56:41 +0000 (19:56 -0500)]
Fix CARGO_INCREMENTAL semantics to be intuitive

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).

7 years agoLeave off `^`, since it's the default.
Casey Rodarmor [Sat, 11 Feb 2017 21:56:38 +0000 (13:56 -0800)]
Leave off `^`, since it's the default.

7 years agoAuto merge of #3668 - KalitaAlexey:fix-example-metadata, r=alexcrichton
bors [Sat, 11 Feb 2017 17:20:36 +0000 (17:20 +0000)]
Auto merge of #3668 - KalitaAlexey:fix-example-metadata, r=alexcrichton

Reverted the "kind" field to the previous value.

Added a new field named "crate_types".
Fixes https://github.com/rust-lang/cargo/issues/3654
After this PR `cargo metadata` would output:
```json
{
    "packages": [
        {
            "targets": [
                {
                    "kind": ["lib"],
                    "crate_types": ["lib"]
                },
                {
                    "kind": ["example"],
                    "crate_types": ["staticlib"]
                }
            ]
        }
    ]
}
```

I have added tests.

7 years agoMerge branch 'master' of https://github.com/rust-lang/cargo into fix-example-metadata
Kalita Alexey [Sat, 11 Feb 2017 08:21:50 +0000 (11:21 +0300)]
Merge branch 'master' of https://github.com/rust-lang/cargo into fix-example-metadata

7 years agoFixed a breaking change and added tests for that case.
Kalita Alexey [Sat, 11 Feb 2017 08:21:02 +0000 (11:21 +0300)]
Fixed a breaking change and added tests for that case.

7 years agoIncrease copypastafication of `cargo search`
Casey Rodarmor [Sat, 11 Feb 2017 02:50:17 +0000 (18:50 -0800)]
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.

7 years agoAuto merge of #3667 - jbendig:required_features, r=alexcrichton
bors [Fri, 10 Feb 2017 22:12:37 +0000 (22:12 +0000)]
Auto merge of #3667 - jbendig:required_features, r=alexcrichton

Added required_features for issue #1570.

Based on PR #2056 by @tsurai and PR #2325 by @JanLikar

I tried to fix most everything that was talked about in the previous pull requests. Docs still need to be updated though.

7 years agoAuto merge of #3681 - lukaslueg:master, r=alexcrichton
bors [Fri, 10 Feb 2017 20:20:35 +0000 (20:20 +0000)]
Auto merge of #3681 - lukaslueg:master, r=alexcrichton

Pinpoint hamcrest-dependency in cargotest to 0.1.1

hamcrest 0.1 currently resolves to 0.1.3, which cargotest can't actually build with. Cargo's own dependency on =0.1.1 used to shadow the problem.

7 years agoFixed `cargo install` performing an empty install when all binaries require at least...
James Bendig [Fri, 10 Feb 2017 20:08:23 +0000 (14:08 -0600)]
Fixed `cargo install` performing an empty install when all binaries require at least one feature that's not selected.

7 years agoChanged an .any() call with double negatives into a more readable .all().
James Bendig [Fri, 10 Feb 2017 18:59:39 +0000 (12:59 -0600)]
Changed an .any() call with double negatives into a more readable .all().

7 years agoPinpoint hamcrest-dependency in cargotest to 0.1.1
lukaslueg [Fri, 10 Feb 2017 18:49:58 +0000 (19:49 +0100)]
Pinpoint hamcrest-dependency in cargotest to 0.1.1

hamcrest 0.1 currently resolves to 0.1.3, which cargotest can't actually build with. Cargo's own dependency on =0.1.1 used to shadow the problem.

7 years agoFixed tests
Kalita Alexey [Fri, 10 Feb 2017 09:35:20 +0000 (12:35 +0300)]
Fixed tests

7 years agoFixed tests
Kalita Alexey [Thu, 9 Feb 2017 18:20:56 +0000 (21:20 +0300)]
Fixed tests

7 years agoMerge branch 'master' of https://github.com/rust-lang/cargo into fix-example-metadata
Kalita Alexey [Thu, 9 Feb 2017 17:04:57 +0000 (20:04 +0300)]
Merge branch 'master' of https://github.com/rust-lang/cargo into fix-example-metadata

7 years agoAuto merge of #3671 - z1mvader:master, r=alexcrichton
bors [Thu, 9 Feb 2017 01:22:51 +0000 (01:22 +0000)]
Auto merge of #3671 - z1mvader:master, r=alexcrichton

trying to fix unimplemented flock under linux

It fixes https://github.com/rust-lang/cargo/issues/3666

7 years agoFixed required-features bench tests failing when compiled on stable rust.
James Bendig [Wed, 8 Feb 2017 21:31:55 +0000 (15:31 -0600)]
Fixed required-features bench tests failing when compiled on stable rust.

7 years agoAdded documentation for the target field `required-features`.
James Bendig [Wed, 8 Feb 2017 21:30:24 +0000 (15:30 -0600)]
Added documentation for the target field `required-features`.

7 years agoAuto merge of #3669 - Susurrus:master, r=alexcrichton
bors [Wed, 8 Feb 2017 19:47:28 +0000 (19:47 +0000)]
Auto merge of #3669 - Susurrus:master, r=alexcrichton

Correct capitalization of GitLab

Never realized this is how they spelled it when I added these docs. Equivalent changes are pending for `crates.io` in rust-lang/crates.io#547

7 years agoAuto merge of #3659 - nathanaeljones:master, r=alexcrichton
bors [Wed, 8 Feb 2017 18:20:52 +0000 (18:20 +0000)]
Auto merge of #3659 - nathanaeljones:master, r=alexcrichton

Fix #3658 .cargo/config prevents freshness (sort after HashMap)

The many vectors of BuildOutput are populated from a HashMap in cargo_compile... and later these vectors are hashed.

HashMaps are the bane of Cargo's existence.

But for now, we sort.

7 years agoAdded tests
Kalita Alexey [Wed, 8 Feb 2017 15:28:36 +0000 (18:28 +0300)]
Added tests

7 years agoFixed tests
Kalita Alexey [Wed, 8 Feb 2017 15:15:06 +0000 (18:15 +0300)]
Fixed tests

7 years agoCorrect capitalization of GitLab
Bryant Mairs [Wed, 8 Feb 2017 06:50:50 +0000 (22:50 -0800)]
Correct capitalization of GitLab

7 years agoReverted the "kind" field to the previous value.
Kalita Alexey [Wed, 8 Feb 2017 04:56:28 +0000 (07:56 +0300)]
Reverted the "kind" field to the previous value.
Added a new field named "crate_types".