8755 Commits

Author SHA1 Message Date
Eh2406
e028b8765c only on nightly 2019-11-04 16:14:46 -05:00
Eh2406
5d35d90223 add rustc-dev 2019-11-04 15:31:20 -05:00
Eh2406
e4d5563ed3 use curl on windows 2019-11-03 10:51:18 -05:00
Eh2406
397dd68b5c use no-self-update 2019-11-02 21:38:55 -04:00
Eh2406
d1de600cd5 update is annoying 2019-11-02 21:33:14 -04:00
Eh2406
b5c5900e7e widows is annoying 2019-11-02 21:33:14 -04:00
Eh2406
5b658ab9ee dont download std-docs on CI 2019-11-02 21:33:14 -04:00
bors
6a7f505a18 Auto merge of #7553 - EverlastingBugstopper:patch-1, r=alexcrichton
Change my-buddy to github-handle

This change has the benefit of being both more descriptive and gender neutral
2019-10-29 20:26:58 +00:00
Avery Harnish
0255a5ee37
Change my-buddy to github-handle
This change has the dual benefit of being both more descriptive and gender neutral
2019-10-29 15:23:34 -05:00
Eric Huss
b65ebc6f02 Tweak/fix metadata resolve docs.
Due to how markdown works there can't be blank lines in the embedded HTML.
2019-10-28 17:23:36 -07:00
Eric Huss
2fb093b8e3 Bump docs for release version. 2019-10-28 16:55:19 -07:00
Eric Huss
a7faecc34f Add kind/platform info to cargo metadata 2019-10-28 16:47:09 -07:00
bors
5da4b4d479 Auto merge of #7376 - ehuss:filter-platform, r=alexcrichton
Add --filter-platform to `cargo metadata`.

This adds the `--filter-platform` flag to `cargo metadata` to give users a way to filter the resolve information based on the target triple.

This is just a prototype to open for feedback.  Some things that need feedback:

- Debate the name of the flag.
- It uses "host" as a special triple to mean the local host.  Does that make sense?  It seemed a little weird.
- Should it also filter the dependencies in the "packages" array?  Right now it only does resolve.  I'm on the fence. It probably should, but that would be an intrusive change to rewrite the Package values.
- Should the filtering be transitive?  That is, if a package is only reachable by a specific platform, should it be removed from the resolve "nodes"?  What about "packages"?  Currently it is included, with the intent that you walk the resolve starting with a root (like a workspace member).  But it might be surprising to see "winapi" when you filter for a unix platform.

This will need documentation before it is merged.
2019-10-28 21:53:41 +00:00
Eric Huss
ca02e038bd Add some documentation for --filter-platform. 2019-10-28 14:51:03 -07:00
Eric Huss
d6b5a6bcda Rewrite target filtering to filter the entire graph.
This also removes the special `host` target.
2019-10-28 14:01:29 -07:00
Eric Huss
5b521f6530 Add --filter-platform to cargo metadata. 2019-10-28 13:54:35 -07:00
bors
a2f49062d8 Auto merge of #7550 - ehuss:fix-color, r=alexcrichton
Fix `cargo fix` not showing colors.

`cargo fix` runs `rustc` a final time after it has finished to:
- Show what happened if the fix failed.
- Show errors with `--broken-code`.
- Show any remaining warnings after a successful fix.

This last run was no longer showing colored diagnostics due to the stabilization of cache-messages. Cargo now unconditionally uses colored JSON messages, and then conditionally strips them after the fact.  "cargo as rustc wrapper" was stripping the JSON flags which allowed Cargo to handle colors.

This fix works by putting the json flags back in for this final pass.
2019-10-28 19:57:57 +00:00
bors
8ac9868554 Auto merge of #7409 - hoborm:patch-1, r=ehuss
Rephrase --manifest-path section

Change the order of the words, for readability.
2019-10-28 19:11:04 +00:00
Eric Huss
da3ac84ecf Rebuild docs for rephrase --manifest-path. 2019-10-28 12:09:26 -07:00
Mihaly Hobor
5438ad9689 Reprhase --manifest-path section
Change the order of the words, for readability.
2019-10-28 12:06:54 -07:00
Eric Huss
91a59e6089 Fix cargo fix not showing colors. 2019-10-28 12:00:09 -07:00
bors
9a935d5f96 Auto merge of #7549 - ehuss:minimal-versions-note, r=alexcrichton
Add a note to discourage the use of -Zminimal-versions.

We've discussed this a few times, that the current implementation isn't working out, so let's be more transparent about it.
2019-10-28 17:20:43 +00:00
Eric Huss
aa0c999226 Add a note to discourage the use of -Zminimal-versions. 2019-10-28 09:26:58 -07:00
Eric Huss
e267b26241 Expand documentation on build scripts. 2019-10-28 09:11:06 -07:00
bors
759431fe98 Auto merge of #7536 - ehuss:profile-override-warning-fix, r=alexcrichton
Fix profile override warning in a workspace.

Profile overrides would erroneously warn about unused packages in a workspace if the package was not being built.  The fix here is to retain the `Resolve` for the entire workspace, and use that to determine the valid set of packages.

I think it would be good for a long-term goal to get rid of the second ("targeted") resolve.  I'm still contemplating how a separate features resolver could achieve that, but it seems feasible long-term.

Closes #7378
2019-10-24 20:33:33 +00:00
bors
dcad4cca5f Auto merge of #7534 - ehuss:fix-windows-nightly, r=alexcrichton
Fix some tests failing on Windows nightly.

- Windows MSVC binaries don't have metadata hash anymore.
- Properly escape backslashes in config TOML.
2019-10-24 20:11:07 +00:00
bors
79bb06ba64 Auto merge of #7535 - ehuss:better-windows-errors, r=alexcrichton
Show better error message for Windows abnormal termination.

This helps display better error messages when there is an abnormal termination on Windows.

If rustc crashes, there was a slight mistake in #6270, where the error code was actually negative, so the message was getting hidden behind the `--verbose` flag.  This changes it show that the abnormal error is always shown if rustc crashes in an unusual way.

This also changes `cargo test` to display a better message if the test crashes.  Previously:

```
running 1 test
error: test failed, to rerun pass '--bin crash'
```

New:

```
running 1 test
error: test failed, to rerun pass '--bin crash'

Caused by:
  process didn't exit successfully: `D:\Temp\crash\target\debug\deps\crash-b3c2389529da3d3e.exe` (exit code: 0xc0000374, STATUS_HEAP_CORRUPTION)
```

I didn't add any tests because testing on this on Windows seems a little precarious.  AFAIK, the exact error message depends on the processor (like x86 vs i686), and Windows version.  I was concerned about chasing down every little nuance, though I'm willing to try if it seems important.

Fixes rust-lang/rust#65692 (I think).
2019-10-24 19:48:28 +00:00
bors
0208708026 Auto merge of #7541 - alexcrichton:try-apt-update, r=alexcrichton
Run `apt update` before `apt install`

Trying to fix recent errors on CI...
2019-10-24 18:25:08 +00:00
Alex Crichton
ac1e031ce6 Run apt update before apt install
Trying to fix recent errors on CI...
2019-10-24 08:04:01 -07:00
Eric Huss
12392f6d99 Fix profile override warning in a workspace. 2019-10-23 11:32:50 -07:00
Eric Huss
78b14005e9 Show better error message for Windows abnormal termination. 2019-10-23 08:24:10 -07:00
Eric Huss
3beb139034 Fix some tests failing on Windows nightly. 2019-10-23 08:14:40 -07:00
bors
3ba5f27170 Auto merge of #7532 - dario23:install-cmd-help-typo, r=alexcrichton
Fix typo in `cargo install --profile` help
2019-10-22 15:05:18 +00:00
Johannes Schilling
6884d6dce8 Fix typo in cargo install --profile help 2019-10-22 16:27:46 +02:00
bors
a2d2b2acc1 Auto merge of #7531 - ehuss:z-flag-parsing, r=alexcrichton
Use stricter -Z flag parsing.

This makes sure that toggle flags don't have any arguments (like `-Zno-index-update=foo`).  It also provides slightly better error messages, like indicating which flag failed.
2019-10-22 14:18:30 +00:00
Eric Huss
50db59e079 Use stricter -Z flag parsing. 2019-10-21 14:49:28 -07:00
bors
04efd9ccd1 Auto merge of #7523 - bruceg:fix-zero-timestamps, r=alexcrichton
Set timestamp on generated files in archive to now

When generating files (Cargo.lock, Cargo.toml, and
.cargo_vcs_info.json), cargo neglected to set any timestamp on the file
in the archive. This results in them being created on disk with a
timestamp of 0 (Jan 1 1970 GMT) which is confusing another tool I use.

This patch alters the behavior to set the mtime to now.

Signed-off-by: Bruce Guenter <bruce@untroubled.org>
2019-10-21 17:59:52 +00:00
bors
02e0c393c8 Auto merge of #7460 - alexcrichton:panic-abort-tests, r=ehuss
Support rustc's `-Z panic-abort-tests` in Cargo

Recently added in rust-lang/rust#64158 the `-Z panic-abort-tests` flag
to the compiler itself will activate a mode in the `test` crate which
enables running tests even if they're compiled with `panic=abort`.  It
effectively runs a test-per-process.

This commit brings the same support to Cargo, adding a `-Z
panic-abort-tests` flag to Cargo which allows building tests in
`panic=abort` mode. While I wanted to be sure to add support for this in
Cargo before we stabilize the flag in `rustc`, I don't actually know how
we're going to stabilize this here. Today Cargo will automatically
switch test targets to `panic=unwind`, and so if we actually were to
stabilize this flag then this configuration would break:

    [profile.dev]
    panic = 'abort'

In that case tests would be compiled with `panic=unwind` (due to how
profiles work today) which would clash with crates also being compiled
with `panic=abort`. I'm hopeful though that we can perhaps either figure
out a solution for this and maybe even integrate it with the ongoing
profiles work.
2019-10-21 16:37:34 +00:00
Alex Crichton
269624f11d Fix broken tests on nightly 2019-10-21 09:37:13 -07:00
Alex Crichton
9cfdf4d8bf Inherit panic settings in test/bench profiles
We've always ignored the `panic` settings configured in test/bench
profiles, so this just continues to ignore them but in a slightly
different way.
2019-10-21 08:53:15 -07:00
Alex Crichton
f37f3aea14 Support rustc's -Z panic-abort-tests in Cargo
Recently added in rust-lang/rust#64158 the `-Z panic-abort-tests` flag
to the compiler itself will activate a mode in the `test` crate which
enables running tests even if they're compiled with `panic=abort`.  It
effectively runs a test-per-process.

This commit brings the same support to Cargo, adding a `-Z
panic-abort-tests` flag to Cargo which allows building tests in
`panic=abort` mode. While I wanted to be sure to add support for this in
Cargo before we stabilize the flag in `rustc`, I don't actually know how
we're going to stabilize this here. Today Cargo will automatically
switch test targets to `panic=unwind`, and so if we actually were to
stabilize this flag then this configuration would break:

    [profile.dev]
    panic = 'abort'

In that case tests would be compiled with `panic=unwind` (due to how
profiles work today) which would clash with crates also being compiled
with `panic=abort`. I'm hopeful though that we can perhaps either figure
out a solution for this and maybe even integrate it with the ongoing
profiles work.
2019-10-21 08:51:01 -07:00
bors
eb12fff356 Auto merge of #7526 - ehuss:rustfmt, r=alexcrichton
rustfmt for nightly changes.

Something in the latest nightly versions of rustfmt has slightly changed the logic here. Fortunately stable ignores the new formatting, and it looks better to me anyways.  I tend to always use nightly, so this helps me with a slight annoyance where this line keeps getting changed.
2019-10-18 22:20:14 +00:00
Eric Huss
d6d15141f8 Wrap some really long lines.
These do not wrap due to https://github.com/rust-lang/rustfmt/issues/3863.
2019-10-18 15:17:59 -07:00
Eric Huss
384c311692 rustfmt for nightly changes. 2019-10-18 14:20:01 -07:00
bors
06ddf35577 Auto merge of #7525 - ehuss:allow-all-features-virtual-ws, r=alexcrichton
Allow --all-features in root of virtual workspace.

Accidentally restricted in #7507, pointed out by @hjmallon, `--all-features` flag is allowed in the root of a virtual workspace.  Added a test to demonstrate its strange behavior.

For anyone that is curious, [this line](3a9abe3f06/src/cargo/ops/resolve.rs (L302)) is the code responsible for this behavior.
2019-10-18 17:07:21 +00:00
Eric Huss
4d524ea57b Allow --all-features in root of virtual workspace. 2019-10-18 09:39:58 -07:00
Bruce Guenter
b33c9e2505 Refactor the common code for generating an archive member
Signed-off-by: Bruce Guenter <bruce@untroubled.org>
2019-10-18 09:39:59 -06:00
Bruce Guenter
27d54a8c9d Set timestamp on generated files in archive to now
When generating files (Cargo.lock, Cargo.toml, and
.cargo_vcs_info.json), cargo neglected to set any timestamp on the file
in the archive. This results in them being created on disk with a
timestamp of 0 (Jan 1 1970 GMT) which is confusing another tool I use.

This patch alters the behavior to set the mtime to now.

Signed-off-by: Bruce Guenter <bruce@untroubled.org>
2019-10-17 15:51:29 -06:00
bors
3a9abe3f06 Auto merge of #7512 - Xyene:patch-1, r=alexcrichton
Fix typo in git index initialization error path

This PR proposes a fix for a small typo I ran into while using `cargo`.
2019-10-15 15:55:35 +00:00
bors
c25db6c875 Auto merge of #7507 - ehuss:virtual-ws-features, r=alexcrichton
Reject feature flags in a virtual workspace.

This generates an error if feature flags are used in the root of a virtual workspace. Previously these flags were completely ignored.  In the interest of avoiding confusion, I think it would be good to be explicit that these don't currently work.  This could alternatively be a warning, but I think it is better to reject it outright.

cc #4753, #3620, #5015, #6195, etc.
2019-10-15 15:26:07 +00:00