6539 Commits

Author SHA1 Message Date
Jordan Justen
2bbbca3126
fix: Add test warns_about_staged_working_directory
Signed-off-by: Jordan Justen <jljusten@gmail.com>
2018-08-21 00:12:30 -07:00
Jordan Justen
6a616cb7c2
fix: Add --allow-staged switch to cargo fix
This change splits out staged changes from dirty changes, and lets the
user know if they should consider using the --allow-staged flag.

Signed-off-by: Jordan Justen <jljusten@gmail.com>
2018-08-21 00:12:30 -07:00
Jordan Justen
4539ff2191
fix: Prepare error message for --allow-staged
Signed-off-by: Jordan Justen <jljusten@gmail.com>
2018-08-21 00:12:30 -07:00
bors
0ec7281b9c 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
2018-08-20 21:18:45 +00:00
bors
677ef847a5 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>
2018-08-20 17:34:45 +00:00
dependabot[bot]
e36ae43400
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>
2018-08-20 05:27:11 +00:00
bors
cc88d01166 Auto merge of #5908 - orium:fix-package-cargo-toml, r=alexcrichton
Fix serialization bug in `edition` field of `TomlProject`.

Fixes #5906.
2018-08-19 17:40:22 +00:00
bors
a78f5aaa84 Auto merge of #5904 - dwijnand:backslash, r=alexcrichton
Remove backslash management in 2 tool_paths tests

With #5851 this is no longer necessary
2018-08-19 16:18:59 +00:00
bors
a06570c2d1 Auto merge of #5907 - dwijnand:collapse-test-cmd-args, r=matklad
Collapse ProcessBuilder::arg calls in tests

Refs #5742
More of #5854
2018-08-19 15:26:34 +00:00
Dale Wijnand
c882b4e02e
Fix 3 corner tests where whitespaces are important 2018-08-19 10:16:08 +01:00
Diogo Sousa
8590a5fba4 Fix serialization bug in edition field of TomlProject.
Fixes #5906.
2018-08-18 23:24:47 +01:00
Dale Wijnand
0152f26405
Move .env/.masquerade_as_nightly_cargo to collapse some more p.cargo calls 2018-08-18 21:34:09 +01:00
Dale Wijnand
511d4bc503
Collapse multiline ProcessBuilder::arg calls in tests
.. by calling this a bunch of times:

    fastmod --multiline '\.cargo\("([^"]+)"\).[ ]+\.arg\("([^"]+)"\)' '.cargo("${1} ${2}")' tests/testsuite/
2018-08-18 15:12:54 +01:00
Dale Wijnand
af4f1392f7
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.
2018-08-18 15:05:45 +01:00
Dale Wijnand
9d9883b26c
Single slash root on Windows 2018-08-18 12:20:00 +01:00
Dale Wijnand
4c9d42e0c7
Remove backslash management in 2 tool_paths tests 2018-08-18 10:19:39 +01:00
bors
8b6f71028f Auto merge of #5901 - dwijnand:1.28-win, r=alexcrichton
Align AppVeyor to use 1.28 for minimal versions

.. like Travis CI's setup.
2018-08-17 15:25:34 +00:00
Dale Wijnand
0ec44d949c
Align AppVeyor to use 1.28 for minimal versions
.. like Travis CI's setup.
2018-08-17 12:05:30 +01:00
bors
7d6d0c3087 Auto merge of #5900 - orium:fix-broken-url, r=alexcrichton
Fix broken url in diagnostic.
2018-08-17 03:20:52 +00:00
Diogo Sousa
6c774e7d17 Fix broken url in diagnostic. 2018-08-16 22:50:10 +01:00
David Kellum
06dcc200d2 Fix a clippy lint 2018-08-16 12:34:37 -07:00
David Kellum
d64c1687d9 Simplify json production and append to archive
Per github review.
2018-08-16 12:33:32 -07:00
bors
a284c3ff96 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.
2018-08-15 17:00:22 +00:00
bors
6cc8320bec 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.
2018-08-15 16:09:58 +00:00
Eh2406
620d5cc9cf stop test on appveyor as requested 2018-08-15 12:09:44 -04:00
Eh2406
637e606b72 bump min rust, and remove nightly check 2018-08-15 10:51:29 -04:00
Eh2406
61d95ec320 DISABLE_CROSS_TESTS for minimal-versions 2018-08-14 17:20:36 -04:00
Eh2406
e969b10e3e fix short_message_format vs nightly 2018-08-14 17:13:41 -04:00
Jacob Finkelman
c4d565fc8f Try serde_json 2018-08-14 10:58:42 -04:00
Eh2406
1eaae61289 get features_are_quoted working with minimal-versions on CI 2018-08-14 10:58:42 -04:00
Eh2406
06d28ebe4d try running tests with minimal-versions on CI 2018-08-14 10:58:42 -04:00
bors
6a7672ef53 Auto merge of #5889 - light4:patch-1, r=alexcrichton
Update transitioning url
2018-08-14 04:02:46 +00:00
Light Ning
5ae43e0086
Update transitioning url 2018-08-14 11:20:12 +08:00
Brian Bowman
48d0708aa6 Handle opening browser with opener crate
Fixes #5701
2018-08-13 21:00:34 -05:00
bors
ebc764e3d3 Auto merge of #5884 - dwijnand:some-clippings, r=alexcrichton
Resolve some clippy lint warnings

None
2018-08-14 01:01:04 +00:00
bors
24888de79f Auto merge of #5887 - Seeker14491:job-fix, r=alexcrichton
Don't kill child processes on normal exit on Windows

Fix for #5598
2018-08-14 00:21:54 +00:00
Brian Bowman
4a7a946cc7 Remove unused imports 2018-08-13 16:47:40 -05:00
Brian Bowman
54d83037f4 Merge remote-tracking branch 'origin/master' into job-fix 2018-08-13 16:05:53 -05:00
Brian Bowman
5a4af4ef19 Don't kill child processes on normal exit on Windows
Fixes #5598
2018-08-13 15:47:20 -05:00
Brian Bowman
5a13061199 Fix typo 2018-08-13 15:36:20 -05:00
David Kellum
ab7877205f Add test package::vcs_file_collision 2018-08-13 10:00:30 -07:00
David Kellum
6b9961a382 Add generated .cargo_vcs_info.json (git hash) file to cargo package 2018-08-13 10:00:30 -07:00
Dale Wijnand
e0b9e43771
Collapse let bindings 2018-08-13 12:00:01 +01:00
Dale Wijnand
0c89a748d1
Resolve a drop_copy lint warning 2018-08-13 11:12:17 +01:00
Dale Wijnand
11922d099b
Resolve a identity_conversion lint warning 2018-08-13 11:11:50 +01:00
Dale Wijnand
972b312a08
Resolve a single_match lint warning 2018-08-13 11:11:04 +01:00
Dale Wijnand
3fdec5a2c6
Resolve a const_static_lifetime lint warning 2018-08-13 11:10:44 +01:00
Dale Wijnand
c9b59deb3a
Resolve 4 unreadable_literal lint warnings 2018-08-13 11:10:03 +01:00
Dale Wijnand
d0624dfcd7
Resolve 2 unneeded_field_pattern lint warnings 2018-08-13 11:09:25 +01:00
Dale Wijnand
b98fd0e8bd
Resolve a redundant_closure lint warning 2018-08-13 11:08:36 +01:00