]> git.proxmox.com Git - cargo.git/log
cargo.git
6 years agoList URL in HTTP download failures
Alex Crichton [Wed, 22 Aug 2018 16:18:58 +0000 (09:18 -0700)]
List URL in HTTP download failures

Hopefully will help diagnose issues like #5924

6 years agoAuto merge of #5902 - little-arhat:feature-add-required-features-to-metadata-output...
bors [Tue, 21 Aug 2018 20:51:26 +0000 (20:51 +0000)]
Auto merge of #5902 - little-arhat:feature-add-required-features-to-metadata-output, r=alexcrichton

Add `required-features` to `SerializedTarget`

This will add it to `cargo metadata` output and will make it
possible to enable features needed to build specific target.

6 years agoAuto merge of #5914 - alexcrichton:system-git, r=dwijnand
bors [Tue, 21 Aug 2018 19:55:15 +0000 (19:55 +0000)]
Auto merge of #5914 - alexcrichton:system-git, r=dwijnand

Add a configuration option to fetch with git-the-CLI

Currently Cargo always uses `libgit2` to perform all fetches of git
repositories, but sometimes this is not sufficient. The `libgit2` library
doesn't support all authentication schemes that `git` does and it isn't always
quite at feature parity with `git` itself, especially in terms of network
configuration.

This commit adds a configuration option to Cargo for fetching git repositories
with the `git` CLI tool rather than the internal `libgit2`. While this exposes
us to changes over time in the `git` CLI it's hopefully a very targeted use case
that doesn't change much. The internal `libgit2` library should be sufficient
for all other forms of git repository management. (and using `git` for only
fetches shouldn't slow us down much)

The new configuration option in `.cargo/config` is:

    [net]
    git-fetch-with-cli = true

which can also be specified with `CARGO_NET_GIT_FETCH_WITH_CLI=true` via an
environment variable.

Closes #5903

6 years agoAdd a configuration option to fetch with git-the-CLI
Alex Crichton [Mon, 20 Aug 2018 17:01:16 +0000 (10:01 -0700)]
Add a configuration option to fetch with git-the-CLI

Currently Cargo always uses `libgit2` to perform all fetches of git
repositories, but sometimes this is not sufficient. The `libgit2` library
doesn't support all authentication schemes that `git` does and it isn't always
quite at feature parity with `git` itself, especially in terms of network
configuration.

This commit adds a configuration option to Cargo for fetching git repositories
with the `git` CLI tool rather than the internal `libgit2`. While this exposes
us to changes over time in the `git` CLI it's hopefully a very targeted use case
that doesn't change much. The internal `libgit2` library should be sufficient
for all other forms of git repository management. (and using `git` for only
fetches shouldn't slow us down much)

The new configuration option in `.cargo/config` is:

    [net]
    git-fetch-with-cli = true

which can also be specified with `CARGO_NET_GIT_FETCH_WITH_CLI=true` via an
environment variable.

Closes #5903

6 years agoAuto merge of #5886 - dekellum:record-package-git-head-3, r=alexcrichton
bors [Mon, 20 Aug 2018 21:18:45 +0000 (21:18 +0000)]
Auto merge of #5886 - dekellum:record-package-git-head-3, r=alexcrichton

Generate .cargo_vcs_info.json and include in `cargo package` (take 2)

Implements #5629 and supersedes #5786, with the following improvements:

* With an upstream git2-rs fix (tracked #5823, validated and min version update in: #5858), no longer requires windows/unix split tests.

* Per review in #5786, drops file system output and locks for .cargo_vcs_info.json.

* Now uses serde `json!` macro for json production with appropriate escaping.

* Now includes a test of the output json format.

Possible followup:

* Per discussion in #5786, we could improve reliability of both the VCS dirty check and the git head sha1 recording by preferring (and/or warning otherwise) the local repository bytes of each source file, at the same head commit. This makes the process more appropriately like an atomic snapshot, with no sentry file or other locking required.  However given my lack of a window's license and dev setup, as exhibited by troubles of #5823, this feel intuitively like too much to attempt to change in one iteration here.  I accept the "best effort" concept of this feature as suggested in #5786, and think it acceptable progress if merged in this form.

@alexcrichton r?
@joshtriplett cc

6 years agoSerialize required_dependencies as 'require-dependencies'
Roma Sokolov [Mon, 20 Aug 2018 18:54:45 +0000 (20:54 +0200)]
Serialize required_dependencies as 'require-dependencies'

6 years agoAuto merge of #5912 - rust-lang:dependabot/cargo/opener-0.3.0, r=alexcrichton
bors [Mon, 20 Aug 2018 17:34:45 +0000 (17:34 +0000)]
Auto merge of #5912 - rust-lang:dependabot/cargo/opener-0.3.0, r=alexcrichton

Update opener requirement from 0.2.0 to 0.3.0

Updates the requirements on [opener](https://github.com/Seeker14491/opener) to permit the latest version.
<details>
<summary>Changelog</summary>

*Sourced from [opener's changelog](https://github.com/Seeker14491/opener/blob/master/CHANGELOG.md).*

> ## [0.3.0] - 2018-08-18
> ### Added
> - `stderr` field to `OpenError::ExitStatus` variant, which captures anything the failed process wrote to stderr.
>
> ## [0.2.0] - 2018-08-08
> ### Removed
> - The `open_sys` function, which was erroneously pub on non-Windows builds.
>
> ## [0.1.0] - 2018-08-08
> - Initial release.
</details>
<details>
<summary>Commits</summary>

- See full diff in [compare view](https://github.com/Seeker14491/opener/commits/v0.3.0)
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>

6 years agoUpdate opener requirement from 0.2.0 to 0.3.0
dependabot[bot] [Mon, 20 Aug 2018 05:27:11 +0000 (05:27 +0000)]
Update opener requirement from 0.2.0 to 0.3.0

Updates the requirements on [opener](https://github.com/Seeker14491/opener) to permit the latest version.
- [Release notes](https://github.com/Seeker14491/opener/releases)
- [Changelog](https://github.com/Seeker14491/opener/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Seeker14491/opener/commits/v0.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
6 years agoAuto merge of #5908 - orium:fix-package-cargo-toml, r=alexcrichton
bors [Sun, 19 Aug 2018 17:40:22 +0000 (17:40 +0000)]
Auto merge of #5908 - orium:fix-package-cargo-toml, r=alexcrichton

Fix serialization bug in `edition` field of `TomlProject`.

Fixes #5906.

6 years agoAuto merge of #5904 - dwijnand:backslash, r=alexcrichton
bors [Sun, 19 Aug 2018 16:18:59 +0000 (16:18 +0000)]
Auto merge of #5904 - dwijnand:backslash, r=alexcrichton

Remove backslash management in 2 tool_paths tests

With #5851 this is no longer necessary

6 years agoAuto merge of #5907 - dwijnand:collapse-test-cmd-args, r=matklad
bors [Sun, 19 Aug 2018 15:26:34 +0000 (15:26 +0000)]
Auto merge of #5907 - dwijnand:collapse-test-cmd-args, r=matklad

Collapse ProcessBuilder::arg calls in tests

Refs #5742
More of #5854

6 years agoFix 3 corner tests where whitespaces are important
Dale Wijnand [Sun, 19 Aug 2018 09:16:08 +0000 (10:16 +0100)]
Fix 3 corner tests where whitespaces are important

6 years agoFix serialization bug in `edition` field of `TomlProject`.
Diogo Sousa [Sat, 18 Aug 2018 22:21:01 +0000 (23:21 +0100)]
Fix serialization bug in `edition` field of `TomlProject`.

Fixes #5906.

6 years agoMove .env/.masquerade_as_nightly_cargo to collapse some more p.cargo calls
Dale Wijnand [Sat, 18 Aug 2018 20:34:09 +0000 (21:34 +0100)]
Move .env/.masquerade_as_nightly_cargo to collapse some more p.cargo calls

6 years agoCollapse multiline ProcessBuilder::arg calls in tests
Dale Wijnand [Sat, 18 Aug 2018 14:12:15 +0000 (15:12 +0100)]
Collapse multiline ProcessBuilder::arg calls in tests

.. by calling this a bunch of times:

    fastmod --multiline '\.cargo\("([^"]+)"\).[ ]+\.arg\("([^"]+)"\)' '.cargo("${1} ${2}")' tests/testsuite/

6 years agoCollapse ProcessBuilder::arg calls in tests
Dale Wijnand [Sat, 18 Aug 2018 14:05:45 +0000 (15:05 +0100)]
Collapse ProcessBuilder::arg calls in tests

.. with mutliple calls of:

    fastmod --accept-all '\.cargo\("([^"]+)"\)\.arg\("([^"]+)"\)' '.cargo("${1} ${2}")' tests/testsuite/

until no changes are left.

6 years agoSingle slash root on Windows
Dale Wijnand [Sat, 18 Aug 2018 11:20:00 +0000 (12:20 +0100)]
Single slash root on Windows

6 years agoRemove backslash management in 2 tool_paths tests
Dale Wijnand [Sat, 18 Aug 2018 09:19:39 +0000 (10:19 +0100)]
Remove backslash management in 2 tool_paths tests

6 years agoAdd `required-features` to `SerializedTarget`
Roma Sokolov [Fri, 17 Aug 2018 22:40:06 +0000 (00:40 +0200)]
Add `required-features` to `SerializedTarget`

This will add it to `cargo metadata` output and will make it
possible to enable features needed to build specific target.

6 years agoAuto merge of #5901 - dwijnand:1.28-win, r=alexcrichton
bors [Fri, 17 Aug 2018 15:25:34 +0000 (15:25 +0000)]
Auto merge of #5901 - dwijnand:1.28-win, r=alexcrichton

Align AppVeyor to use 1.28 for minimal versions

.. like Travis CI's setup.

6 years agoAlign AppVeyor to use 1.28 for minimal versions
Dale Wijnand [Fri, 17 Aug 2018 11:05:30 +0000 (12:05 +0100)]
Align AppVeyor to use 1.28 for minimal versions

.. like Travis CI's setup.

6 years agoAuto merge of #5900 - orium:fix-broken-url, r=alexcrichton
bors [Fri, 17 Aug 2018 03:20:52 +0000 (03:20 +0000)]
Auto merge of #5900 - orium:fix-broken-url, r=alexcrichton

Fix broken url in diagnostic.

6 years agoFix broken url in diagnostic.
Diogo Sousa [Thu, 16 Aug 2018 21:50:10 +0000 (22:50 +0100)]
Fix broken url in diagnostic.

6 years agoFix a clippy lint
David Kellum [Thu, 16 Aug 2018 19:34:37 +0000 (12:34 -0700)]
Fix a clippy lint

6 years agoSimplify json production and append to archive
David Kellum [Thu, 16 Aug 2018 19:33:32 +0000 (12:33 -0700)]
Simplify json production and append to archive

Per github review.

6 years agoAuto merge of #5856 - Eh2406:min-test, r=alexcrichton
bors [Wed, 15 Aug 2018 17:00:22 +0000 (17:00 +0000)]
Auto merge of #5856 - Eh2406:min-test, r=alexcrichton

run some tests with minimal-versions on CI

In #5757 we discovered that sum test don't pass with minimal-versions, and so only added CI for `cargo check`. This PR is to see if that is still needed, and if it is then which test rely on upstream bugfix.

6 years agoAuto merge of #5888 - Seeker14491:opener, r=alexcrichton
bors [Wed, 15 Aug 2018 16:09:58 +0000 (16:09 +0000)]
Auto merge of #5888 - Seeker14491:opener, r=alexcrichton

Handle opening browser with `opener` crate

Fixes #5701

A note about behavior on Linux:
When looking for a browser to open the docs with, Cargo currently tries the `$BROWSER` environment variable, `xdg-open`, `gnome-open`, and finally `kde-open`, in that order. With this commit, this behavior changes; the `opener` crate always uses the `xdg-open` script, which is included in the `opener` crate. The `xdg-open` script takes care of finding a suitable browser.

6 years agostop test on appveyor as requested
Eh2406 [Wed, 15 Aug 2018 16:09:44 +0000 (12:09 -0400)]
stop test on appveyor as requested

6 years agobump min rust, and remove nightly check
Eh2406 [Wed, 15 Aug 2018 14:08:39 +0000 (10:08 -0400)]
bump min rust, and remove nightly check

6 years agoDISABLE_CROSS_TESTS for minimal-versions
Eh2406 [Tue, 14 Aug 2018 21:16:41 +0000 (17:16 -0400)]
DISABLE_CROSS_TESTS for minimal-versions

6 years agofix short_message_format vs nightly
Eh2406 [Tue, 14 Aug 2018 21:13:41 +0000 (17:13 -0400)]
fix short_message_format vs nightly

6 years agoTry serde_json
Jacob Finkelman [Fri, 3 Aug 2018 00:05:46 +0000 (20:05 -0400)]
Try serde_json

6 years agoget `features_are_quoted` working with minimal-versions on CI
Eh2406 [Thu, 2 Aug 2018 20:15:11 +0000 (16:15 -0400)]
get `features_are_quoted` working with minimal-versions on CI

6 years agotry running tests with minimal-versions on CI
Eh2406 [Thu, 2 Aug 2018 19:14:53 +0000 (15:14 -0400)]
try running tests with minimal-versions on CI

6 years agoAuto merge of #5889 - light4:patch-1, r=alexcrichton
bors [Tue, 14 Aug 2018 04:02:46 +0000 (04:02 +0000)]
Auto merge of #5889 - light4:patch-1, r=alexcrichton

Update transitioning url

6 years agoUpdate transitioning url
Light Ning [Tue, 14 Aug 2018 03:20:12 +0000 (11:20 +0800)]
Update transitioning url

6 years agoHandle opening browser with `opener` crate
Brian Bowman [Thu, 9 Aug 2018 04:37:56 +0000 (23:37 -0500)]
Handle opening browser with `opener` crate

Fixes #5701

6 years agoAuto merge of #5884 - dwijnand:some-clippings, r=alexcrichton
bors [Tue, 14 Aug 2018 01:01:04 +0000 (01:01 +0000)]
Auto merge of #5884 - dwijnand:some-clippings, r=alexcrichton

Resolve some clippy lint warnings

None

6 years agoAuto merge of #5887 - Seeker14491:job-fix, r=alexcrichton
bors [Tue, 14 Aug 2018 00:21:54 +0000 (00:21 +0000)]
Auto merge of #5887 - Seeker14491:job-fix, r=alexcrichton

 Don't kill child processes on normal exit on Windows

Fix for #5598

6 years agoRemove unused imports
Brian Bowman [Mon, 13 Aug 2018 21:47:40 +0000 (16:47 -0500)]
Remove unused imports

6 years agoMerge remote-tracking branch 'origin/master' into job-fix
Brian Bowman [Mon, 13 Aug 2018 21:05:53 +0000 (16:05 -0500)]
Merge remote-tracking branch 'origin/master' into job-fix

6 years agoDon't kill child processes on normal exit on Windows
Brian Bowman [Mon, 13 Aug 2018 20:47:20 +0000 (15:47 -0500)]
Don't kill child processes on normal exit on Windows

Fixes #5598

6 years agoFix typo
Brian Bowman [Mon, 13 Aug 2018 20:36:20 +0000 (15:36 -0500)]
Fix typo

6 years agoAdd test package::vcs_file_collision
David Kellum [Tue, 24 Jul 2018 21:53:30 +0000 (14:53 -0700)]
Add test package::vcs_file_collision

6 years agoAdd generated .cargo_vcs_info.json (git hash) file to `cargo package`
David Kellum [Mon, 23 Jul 2018 23:55:06 +0000 (16:55 -0700)]
Add generated .cargo_vcs_info.json (git hash) file to `cargo package`

6 years agoCollapse let bindings
Dale Wijnand [Mon, 13 Aug 2018 10:48:50 +0000 (11:48 +0100)]
Collapse let bindings

6 years agoResolve a drop_copy lint warning
Dale Wijnand [Mon, 13 Aug 2018 09:41:19 +0000 (10:41 +0100)]
Resolve a drop_copy lint warning

6 years agoResolve a identity_conversion lint warning
Dale Wijnand [Mon, 13 Aug 2018 09:40:53 +0000 (10:40 +0100)]
Resolve a identity_conversion lint warning

6 years agoResolve a single_match lint warning
Dale Wijnand [Mon, 13 Aug 2018 09:41:27 +0000 (10:41 +0100)]
Resolve a single_match lint warning

6 years agoResolve a const_static_lifetime lint warning
Dale Wijnand [Mon, 13 Aug 2018 09:41:10 +0000 (10:41 +0100)]
Resolve a const_static_lifetime lint warning

6 years agoResolve 4 unreadable_literal lint warnings
Dale Wijnand [Mon, 13 Aug 2018 09:41:03 +0000 (10:41 +0100)]
Resolve 4 unreadable_literal lint warnings

6 years agoResolve 2 unneeded_field_pattern lint warnings
Dale Wijnand [Mon, 13 Aug 2018 09:41:37 +0000 (10:41 +0100)]
Resolve 2 unneeded_field_pattern lint warnings

6 years agoResolve a redundant_closure lint warning
Dale Wijnand [Mon, 13 Aug 2018 09:40:40 +0000 (10:40 +0100)]
Resolve a redundant_closure lint warning

6 years agoResolve a unit_arg lint warning
Dale Wijnand [Mon, 13 Aug 2018 09:40:24 +0000 (10:40 +0100)]
Resolve a unit_arg lint warning

6 years agoResolve 2 redundant_field_names lint warnings
Dale Wijnand [Mon, 13 Aug 2018 09:40:08 +0000 (10:40 +0100)]
Resolve 2 redundant_field_names lint warnings

6 years agoAuto merge of #5876 - matthiaskrgr:clippy_2, r=alexcrichton
bors [Sun, 12 Aug 2018 22:42:53 +0000 (22:42 +0000)]
Auto merge of #5876 - matthiaskrgr:clippy_2, r=alexcrichton

fix a bunch of clippy warnings

 (invocation: cargo clippy --all-targets --all-features -- --cap-lints warn )

6 years agoAuto merge of #5879 - dwijnand:short-errors, r=alexcrichton
bors [Sun, 12 Aug 2018 15:00:55 +0000 (15:00 +0000)]
Auto merge of #5879 - dwijnand:short-errors, r=alexcrichton

Add support for rustc's --error-format short

Running a local build of this branch on some broken code shows this kind of output:

    18:42:29 $ dcargo check --message-format=short --tests
        Checking bufstream v0.1.3
        Checking cargo v0.30.0 (file:///d/cargo)
    tests/testsuite/config.rs:298:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:307:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:363:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:367:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:371:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:375:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:382:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:386:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:400:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:428:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:479:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:491:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:496:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:501:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:506:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:512:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:582:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:660:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:666:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:672:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:678:9: error[E0308]: mismatched types
    error: aborting due to 21 previous errors
    error: Could not compile `cargo`.
    warning: build failed, waiting for other jobs to finish...
    error: build failed

Rehash of @QuietMisdreavus' #4720 now that `--short-message` is stable (thanks for the ping @pickfire!).

Feedback welcome.

6 years agofix a bunch of clippy warnings (invocation: cargo clippy --all-targets --all-features...
Matthias Krüger [Wed, 8 Aug 2018 22:57:20 +0000 (00:57 +0200)]
fix a bunch of clippy warnings (invocation: cargo clippy --all-targets --all-features -- --cap-lints warn )

Special thanks to dwijnand for helping me with this! :)

6 years agoAdd a test for "cargo doc --message-format=short"
Dale Wijnand [Fri, 10 Aug 2018 07:44:36 +0000 (08:44 +0100)]
Add a test for "cargo doc --message-format=short"

6 years agoExtract & reuse add_error_format for rustdoc too
Dale Wijnand [Fri, 10 Aug 2018 07:27:49 +0000 (08:27 +0100)]
Extract & reuse add_error_format for rustdoc too

6 years agoAdd a test for "cargo check --message-format=short"
Dale Wijnand [Thu, 9 Aug 2018 20:13:42 +0000 (21:13 +0100)]
Add a test for "cargo check --message-format=short"

6 years agoAdd support for rustc's --error-format short
Dale Wijnand [Thu, 9 Aug 2018 17:54:19 +0000 (18:54 +0100)]
Add support for rustc's --error-format short

Running a local build of this branch on some broken code shows this kind of output:

    18:42:29 $ dcargo check --message-format=short --tests
        Checking bufstream v0.1.3
        Checking cargo v0.30.0 (file:///d/cargo)
    tests/testsuite/config.rs:298:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:307:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:363:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:367:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:371:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:375:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:382:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:386:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:400:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:428:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:479:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:491:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:496:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:501:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:506:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:512:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:582:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:660:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:666:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:672:9: error[E0308]: mismatched types
    tests/testsuite/config.rs:678:9: error[E0308]: mismatched types
    error: aborting due to 21 previous errors
    error: Could not compile `cargo`.
    warning: build failed, waiting for other jobs to finish...
    error: build failed

6 years agoAuto merge of #5878 - ehuss:rustdoc-json, r=alexcrichton
bors [Fri, 10 Aug 2018 03:14:33 +0000 (03:14 +0000)]
Auto merge of #5878 - ehuss:rustdoc-json, r=alexcrichton

Support JSON with rustdoc.

This allows `cargo doc --message-format=json` to actually work.

Note that this explicitly does not attempt to support it for doctests for
several reasons:
- `rustdoc --test --error-format=json` does not work for some reason.
- Since the lib is usually compiled before running rustdoc, warnings/errors
  will be emitted correctly by rustc.
- I'm unaware of any errors/warnings `rustdoc --test` is capable of producing
  assuming the code passed `rustc`.
- The compilation of the tests themselves do not support JSON.
- libtest does not output json, so it's utility is limited.

6 years agoAuto merge of #5880 - dwijnand:fix-rustfmt-instructions, r=alexcrichton
bors [Fri, 10 Aug 2018 00:57:49 +0000 (00:57 +0000)]
Auto merge of #5880 - dwijnand:fix-rustfmt-instructions, r=alexcrichton

Fix rustfmt instructions in CONTRIBUTING.md

rustfmt's --skip-children is now behind --unstable-features
(rust-lang-nursery/rustfmt#2796) which only works on nightly rustfmt, so
change the install instructions too.

6 years agoUpdate for review comments.
Eric Huss [Thu, 9 Aug 2018 22:43:34 +0000 (15:43 -0700)]
Update for review comments.

6 years agoFix rustfmt instructions in CONTRIBUTING.md
Dale Wijnand [Thu, 9 Aug 2018 20:21:13 +0000 (21:21 +0100)]
Fix rustfmt instructions in CONTRIBUTING.md

rustfmt's --skip-children is now behind --unstable-features
(rust-lang-nursery/rustfmt#2796) which only works on nightly rustfmt, so
change the install instructions too.

6 years agoSupport JSON with rustdoc.
Eric Huss [Thu, 9 Aug 2018 06:52:05 +0000 (23:52 -0700)]
Support JSON with rustdoc.

This allows `cargo doc --message-format=json` to actually work.

Note that this explicitly does not attempt to support it for doctests for
several reasons:
- `rustdoc --test --error-format=json` does not work for some reason.
- Since the lib is usually compiled before running rustdoc, warnings/errors
  will be emitted correctly by rustc.
- I'm unaware of any errors/warnings `rustdoc --test` is capable of producing
  assuming the code passed `rustc`.
- The compilation of the tests themselves do not support JSON.
- libtest does not output json, so it's utility is limited.

6 years agoAuto merge of #5877 - ehuss:ws-run, r=alexcrichton
bors [Thu, 9 Aug 2018 04:46:23 +0000 (04:46 +0000)]
Auto merge of #5877 - ehuss:ws-run, r=alexcrichton

Allow `cargo run` in workspaces.

Closes #3713

6 years agoAllow `cargo run` in workspaces.
Eric Huss [Thu, 9 Aug 2018 00:38:04 +0000 (17:38 -0700)]
Allow `cargo run` in workspaces.

6 years agoAuto merge of #5873 - ehuss:ws-filters, r=alexcrichton
bors [Tue, 7 Aug 2018 22:57:38 +0000 (22:57 +0000)]
Auto merge of #5873 - ehuss:ws-filters, r=alexcrichton

Change target filters in workspaces.

This changes it so that filters like `--bin`, `--test`, `--example`,
`--bench`, `--lib` will work in a workspace.  Today, these filters
require that they match *every* package in a workspace which makes
them not very useful.  This change makes it so that they only must
match at least one package.

Closes #5819.

6 years agoAuto merge of #5858 - dekellum:git-check-logging-and-test, r=alexcrichton
bors [Tue, 7 Aug 2018 22:19:54 +0000 (22:19 +0000)]
Auto merge of #5858 - dekellum:git-check-logging-and-test, r=alexcrichton

Improve verbose console and log for finding git repo in package check

Third attempt to resolve #5823 by improving logging and tests. This exposes the issue to testing,  via verbose console output and is dependent on alexcrichton/git2-rs#341 as just released in git2 0.7.5 crate. Thus tests *should* now pass on all platforms, incl. windows, but I also intend to bump the minimal git2 release dependency (in a subsequently added commit).

cc: @Eh2406 thanks for your fix and help!

6 years agoAuto merge of #5871 - matklad:meta-rename, r=alexcrichton
bors [Tue, 7 Aug 2018 20:48:07 +0000 (20:48 +0000)]
Auto merge of #5871 - matklad:meta-rename, r=alexcrichton

Meta rename

Some work towards https://github.com/rust-lang/cargo/issues/5583

Previously, `cargo metadata` exposed dependencies info as a graph of
package id without any additional information on edges.

However, we do want to add some data to edges, including for example,
package renames and `cfg` info.

Internally, the edges info is represented as a `Vec<Dependnecy>`. We
could have exposed that directly, but that risks exposing and
ossifying an implementation details.

So instead we collapse a `Vec<Dependnecy>` to a single JSON object,
which at the moment contains `id` and `rename` info only. It should be
possible to add additional fields to that object backwards compatibly.
Such representation does not correspond directly to any internal Cargo
data structure, but hopefully it shouldn't be to hard to maintain.

This representation also does not quite correspond to the "real
world", where dependencies are between crate (cargo targets), and not
packages. However, because each dep edge is a JSON object, adding a
target filter should be possible, which would handle dev-, build-, and
potential future bin-specific dependencies backwards-compatibly.

6 years agoChange target filters in workspaces.
Eric Huss [Tue, 7 Aug 2018 20:05:22 +0000 (13:05 -0700)]
Change target filters in workspaces.

This changes it so that filters like `--bin`, `--test`, `--example`,
`--bench`, `--lib` will work in a workspace.  Today, these filters
require that they match *every* package in a workspace which makes
them not very useful.  This change makes it so that they only must
match at least one package.

6 years agoAdd rename info to Cargo metadata
Aleksey Kladov [Tue, 7 Aug 2018 09:37:29 +0000 (12:37 +0300)]
Add rename info to Cargo metadata

Previously, `cargo metadata` exposed dependencies info as a graph of
package id without any additional information on edges.

However, we do want to add some data to edges, including for example,
package renames and `cfg` info.

Internally, the edges info is represented as a `Vec<Dependnecy>`. We
could have exposed that directly, but that risks exposing and
ossifying an implementation details.

So instead we collapse a `Vec<Dependnecy>` to a single JSON object,
which at the moment contains `id` and `rename` info only. It should be
possible to add additional fields to that object backwards compatibly.
Such representation does not correspond directly to any internal Cargo
data structure, but hopefully it shouldn't be to hard to maintain.

This representation also does not quite correspond to the "real
world", where dependencies are between crate (cargo targets), and not
packages. However, because each dep edge is a JSON object, adding a
target filter should be possible, which would handle dev-, build-, and
potential future bin-specific dependencies backwards-compatibly.

6 years agoMove extern_crate_name to Resolve
Aleksey Kladov [Tue, 7 Aug 2018 09:11:10 +0000 (12:11 +0300)]
Move extern_crate_name to Resolve

6 years agoAuto merge of #5870 - bmwill:fix-fetch-target-tests, r=alexcrichton
bors [Mon, 6 Aug 2018 17:31:07 +0000 (17:31 +0000)]
Auto merge of #5870 - bmwill:fix-fetch-target-tests, r=alexcrichton

fetch: skip target tests when cross_compile is disabled

It was reported in #5864 that the fetch-by-target tests fail when run on a non-x86 platform.  This is due to the cross_compile module being disabled when running on non-x86 platforms.  Fix this by skipping the two fetch tests which rely on the cross_compile module, when cross_compile has been disabled.

Signed-off-by: Brandon Williams <bmwill@google.com>
6 years agofetch: skip target tests when cross_compile is disabled
Brandon Williams [Mon, 6 Aug 2018 17:04:53 +0000 (10:04 -0700)]
fetch: skip target tests when cross_compile is disabled

Signed-off-by: Brandon Williams <bmwill@google.com>
6 years agoAuto merge of #5862 - kennytm:capture-rustc-output, r=alexcrichton
bors [Mon, 6 Aug 2018 15:12:01 +0000 (15:12 +0000)]
Auto merge of #5862 - kennytm:capture-rustc-output, r=alexcrichton

Fully capture rustc and rustdoc output when -Zcompile-progress is passed

Fixes #5764 and #5695.

On Windows, we will parse the ANSI escape code into console commands via my `fwdansi` package, based on @ishitatsuyuki's idea in https://github.com/rust-lang/cargo/issues/5695#issuecomment-406300234. Outside of Windows the content is forwarded as-is.

6 years agoAuto merge of #5867 - ehuss:test-example-help, r=alexcrichton
bors [Sun, 5 Aug 2018 16:58:27 +0000 (16:58 +0000)]
Auto merge of #5867 - ehuss:test-example-help, r=alexcrichton

Fix test --example docs.

As part of #5464 I forgot to update the help text.

Closes #5177

6 years agoFix test --example docs.
Eric Huss [Sun, 5 Aug 2018 15:47:55 +0000 (08:47 -0700)]
Fix test --example docs.

As part of #5464 I forgot to update the help text.

Closes #5177

6 years agoAuto merge of #5865 - alexcrichton:vendor-openssl, r=matklad
bors [Sun, 5 Aug 2018 09:26:06 +0000 (09:26 +0000)]
Auto merge of #5865 - alexcrichton:vendor-openssl, r=matklad

Add a feature to build a vendored OpenSSL

This will be enabled through rust-lang/rust to ensure that for dist builds we
can build a Cargo with a vendored OpenSSL

6 years agoAdd a feature to build a vendored OpenSSL
Alex Crichton [Sun, 5 Aug 2018 06:02:57 +0000 (23:02 -0700)]
Add a feature to build a vendored OpenSSL

This will be enabled through rust-lang/rust to ensure that for dist builds we
can build a Cargo with a vendored OpenSSL

6 years agoAuto merge of #5861 - alexcrichton:build-script-edition, r=ehuss
bors [Sat, 4 Aug 2018 18:15:43 +0000 (18:15 +0000)]
Auto merge of #5861 - alexcrichton:build-script-edition, r=ehuss

Fix the edition build scripts are compiled with

Previously build scripts were accidentally and unconditionally compiled with the
2015 edition, but they should instead use the edition of the `[package]` itself.

Closes #5860

6 years agoFix the edition build scripts are compiled with
Alex Crichton [Sat, 4 Aug 2018 15:44:16 +0000 (08:44 -0700)]
Fix the edition build scripts are compiled with

Previously build scripts were accidentally and unconditionally compiled with the
2015 edition, but they should instead use the edition of the `[package]` itself.

Closes #5860

6 years agoCapture output from rustc and rustdoc.
kennytm [Thu, 2 Aug 2018 14:18:43 +0000 (22:18 +0800)]
Capture output from rustc and rustdoc.

6 years agoAuto merge of #5852 - dwijnand:exit-code-0, r=alexcrichton
bors [Fri, 3 Aug 2018 15:42:54 +0000 (15:42 +0000)]
Auto merge of #5852 - dwijnand:exit-code-0, r=alexcrichton

Default test support's Execs to exit code 0

Refs #5742

6 years agoAuto merge of #5859 - jeizsm:master, r=alexcrichton
bors [Fri, 3 Aug 2018 13:40:12 +0000 (13:40 +0000)]
Auto merge of #5859 - jeizsm:master, r=alexcrichton

check target env in test when use targets

Hello. It also should check for target vendor but it's still unstable for some reason https://github.com/rust-lang/rust/issues/29718

6 years agoDrop niche Execs::with_no_expected_status
Dale Wijnand [Thu, 2 Aug 2018 13:57:19 +0000 (14:57 +0100)]
Drop niche Execs::with_no_expected_status

.. by gating the nightly-only tests.

6 years agoFix tests that have no stable expected exit code
Dale Wijnand [Thu, 2 Aug 2018 12:51:00 +0000 (13:51 +0100)]
Fix tests that have no stable expected exit code

6 years agoFix tests that have failing commands w/o specifying the exit code
Dale Wijnand [Thu, 2 Aug 2018 11:48:37 +0000 (12:48 +0100)]
Fix tests that have failing commands w/o specifying the exit code

6 years agoDefault test support's Execs to exit code 0
Dale Wijnand [Thu, 2 Aug 2018 10:29:39 +0000 (11:29 +0100)]
Default test support's Execs to exit code 0

6 years agocheck target env in test when use targets
Marat Safin [Fri, 3 Aug 2018 04:39:34 +0000 (07:39 +0300)]
check target env in test when use targets

6 years agoUpdate git2 minimal version to 0.7.5 for a fix
David Kellum [Thu, 2 Aug 2018 22:46:19 +0000 (15:46 -0700)]
Update git2 minimal version to 0.7.5 for a fix

6 years agoMerge branch 'master' into git-check-logging-and-test
David Kellum [Thu, 2 Aug 2018 22:42:50 +0000 (15:42 -0700)]
Merge branch 'master' into git-check-logging-and-test

6 years agoImprove verbose console and logging for finding git repo in package check
David Kellum [Sat, 28 Jul 2018 14:20:33 +0000 (07:20 -0700)]
Improve verbose console and logging for finding git repo in package check

6 years agoAuto merge of #5854 - dwijnand:args-split_whitespace, r=alexcrichton
bors [Thu, 2 Aug 2018 22:12:33 +0000 (22:12 +0000)]
Auto merge of #5854 - dwijnand:args-split_whitespace, r=alexcrichton

Cleanup tests by using single string commands, split on whitespaces

Refs #5742

6 years agoAuto merge of #5857 - matthiaskrgr:borrowck_mut, r=alexcrichton
bors [Thu, 2 Aug 2018 20:55:07 +0000 (20:55 +0000)]
Auto merge of #5857 - matthiaskrgr:borrowck_mut, r=alexcrichton

fix borrowck-migrate unused mut warnings.

6 years agofix borrowck-migrate unused mut warnings.
Matthias Krüger [Thu, 2 Aug 2018 20:34:55 +0000 (22:34 +0200)]
fix borrowck-migrate unused mut warnings.

6 years agoFix install_empty_argument by passing an empty arg
Dale Wijnand [Thu, 2 Aug 2018 16:57:24 +0000 (17:57 +0100)]
Fix install_empty_argument by passing an empty arg

6 years agoIntroduce git_process too
Dale Wijnand [Thu, 2 Aug 2018 14:27:06 +0000 (15:27 +0100)]
Introduce git_process too