]> git.proxmox.com Git - cargo.git/log
cargo.git
4 years agoswitch to DH 12
Fabian Grünbichler [Wed, 25 Mar 2020 08:02:12 +0000 (09:02 +0100)]
switch to DH 12

this moves cargo-doc's documentation content from
/usr/share/doc/cargo-doc to /usr/share/doc/cargo/, otherwise no change
in binary debs.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoremove unicode-xid favicon/logo
Fabian Grünbichler [Wed, 25 Mar 2020 07:07:09 +0000 (08:07 +0100)]
remove unicode-xid favicon/logo

since it's not shipped in the source, removing altogether is easier than pointing to a local copy

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoupdate d/copyright
Fabian Grünbichler [Wed, 25 Mar 2020 06:48:19 +0000 (07:48 +0100)]
update d/copyright

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoupdate patches
Fabian Grünbichler [Tue, 24 Mar 2020 16:15:16 +0000 (17:15 +0100)]
update patches

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoadd version deduplication patch to series file
Fabian Grünbichler [Tue, 24 Mar 2020 16:12:11 +0000 (17:12 +0100)]
add version deduplication patch to series file

this patch cleans up duplications in cargo's Cargo.toml itself

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoUpdate upstream source from tag 'upstream/0.43.0'
Fabian Grünbichler [Wed, 25 Mar 2020 06:28:16 +0000 (07:28 +0100)]
Update upstream source from tag 'upstream/0.43.0'

Update to upstream version '0.43.0'
with Debian dir 8ba73d9ed8f595a566b0cbe4884552794d343d0d

4 years agoNew upstream version 0.43.0
Fabian Grünbichler [Wed, 25 Mar 2020 06:27:48 +0000 (07:27 +0100)]
New upstream version 0.43.0

4 years agoremove duplicate env_logger and humantime
Fabian Grünbichler [Tue, 24 Mar 2020 16:08:49 +0000 (17:08 +0100)]
remove duplicate env_logger and humantime

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agocleanup vendor tarball whitelist
Fabian Grünbichler [Tue, 24 Mar 2020 15:06:09 +0000 (16:06 +0100)]
cleanup vendor tarball whitelist

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoupdate debcargo-conf.patch
Fabian Grünbichler [Tue, 24 Mar 2020 15:05:53 +0000 (16:05 +0100)]
update debcargo-conf.patch

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoAuto merge of #7836 - Mark-Simulacrum:clean-error, r=ehuss
bors [Sun, 26 Jan 2020 18:27:29 +0000 (18:27 +0000)]
Auto merge of #7836 - Mark-Simulacrum:clean-error, r=ehuss

Polish code to clarify meaning

This preserves the same behavior, but the previous code looked like it might
loop, but in fact never did.

4 years agoPolish code to clarify meaning
Mark Rousskov [Sun, 26 Jan 2020 17:16:01 +0000 (12:16 -0500)]
Polish code to clarify meaning

This preserves the same behavior, but the previous code looked like it might
loop, but in fact never did.

4 years agoAuto merge of #7829 - Mark-Simulacrum:fix-progress-panics, r=ehuss
bors [Sun, 26 Jan 2020 01:15:51 +0000 (01:15 +0000)]
Auto merge of #7829 - Mark-Simulacrum:fix-progress-panics, r=ehuss

Store maximum queue length

Previously, the queue length was constantly decreasing as we built crates, which
meant that we were incorrectly displaying the progress bar. In debug builds,
this even led to panics (due to underflow on subtraction).

Not sure if we can add a test case for this. I have made the panic unconditional on release/debug though by explicitly checking that current is less than the maximum for the progress bar.

Fixes https://github.com/rust-lang/cargo/pull/7731#issuecomment-578358824.

4 years agoStore maximum queue length
Mark Rousskov [Sat, 25 Jan 2020 19:20:40 +0000 (14:20 -0500)]
Store maximum queue length

Previously, the queue length was constantly decreasing as we built crates, which
meant that we were incorrectly displaying the progress bar. In debug builds,
this even led to panics (due to underflow on subtraction).

4 years agoAuto merge of #7826 - eddyb:recursion-limit-diagnostic, r=Eh2406
bors [Fri, 24 Jan 2020 18:26:23 +0000 (18:26 +0000)]
Auto merge of #7826 - eddyb:recursion-limit-diagnostic, r=Eh2406

test: allow some flexibility in check::error_from_deep_recursion's expected diagnostic.

This should unblock https://github.com/rust-lang/rust/pull/68407, by loosening the expected output pattern.

As per https://github.com/rust-lang/rust/pull/68407#issuecomment-578189644, this is the change in the diagnostic:
```diff
-recursion limit reached while expanding the macro `m`
+recursion limit reached while expanding `m!`
```

Ideally I would use something like this regex:
```
recursion limit reached while expanding (the macro `m`|`m!`)
```
but AFAIK these tests don't support regexes.

4 years agotest: allow some flexibility in check::error_from_deep_recursion's expected diagnostic.
Eduard-Mihai Burtescu [Fri, 24 Jan 2020 16:40:34 +0000 (18:40 +0200)]
test: allow some flexibility in check::error_from_deep_recursion's expected diagnostic.

4 years agoAuto merge of #7818 - giraffate:add_some_tests, r=alexcrichton
bors [Thu, 23 Jan 2020 15:15:49 +0000 (15:15 +0000)]
Auto merge of #7818 - giraffate:add_some_tests, r=alexcrichton

Add tests for `cargo owner -a/-r` / `cargo yank --undo`

Follow up 5e15286.

There were no tests for `cargo owner -a/-r` and `cargo yank --undo`. However, These commands in tests had empty response. So I also update response handling with reference to https://github.com/rust-lang/cargo/pull/3301/commits/7dd0f932a864d97bef5da26a0e148fca3f06d448.

4 years agoRevert updating a doc
Takayuki Nakata [Thu, 23 Jan 2020 00:13:13 +0000 (09:13 +0900)]
Revert updating a doc

4 years agoAuto merge of #7731 - Mark-Simulacrum:chatty-jobserver, r=alexcrichton
bors [Wed, 22 Jan 2020 22:42:20 +0000 (22:42 +0000)]
Auto merge of #7731 - Mark-Simulacrum:chatty-jobserver, r=alexcrichton

Scalable jobserver for rustc

This refactors the job queue code for support of [per-rustc process jobservers](https://github.com/rust-lang/rust/pull/67398). Furthermore, it also cleans up the code and refactors the main loop to be more amenable to understanding (splitting into methods and such).

Assignment of tokens to either rustc "threads" or processes is dedicated to the main loop, which proceeds in a strict "least recently requested" fashion among both thread and process token requests. Specifically, we will first allocate tokens to all pending process token requests (i.e., high-level units of work), and then (in per-rustc jobserver mode) follow up by assigning any remaining tokens to rustcs, again in the order that requests came into cargo (first request served first).

It's not quite clear that that model is good (no modeling or so has been done). On the other hand this strategy should mean that long-running crates will get more thread tokens once we bottom out in terms of rustc parallelism than short-running crates, which means that crates like syn which start early on but finish pretty late should hopefully get more parallelism nicely (without any more complex heuristics).

One plausible change that may be worth exploring is making the assignment prefer earlier rustc's, globally, rather than first attempting to spawn new crates and only then increasing parallelism for old crates. syn for example frequently gets compiled in the early storm of dozens of crates so is somewhat unlikely to have parallelism, until fairly late in its compilation.

We also currently conflate under this model the rayon threads and codegen threads. Eventually inside rustc those will probably(?) also be just one thing, and the rustc side of this implementation provides no information as to what the token request is for so we can't do better here yet.

4 years agoMove token truncation to just before waiting
Mark Rousskov [Wed, 22 Jan 2020 19:24:43 +0000 (14:24 -0500)]
Move token truncation to just before waiting

This also moves and enhances the message logging the state before blocking.

4 years agoStop threading Client through into the NeedsToken message
Mark Rousskov [Mon, 20 Jan 2020 18:03:05 +0000 (13:03 -0500)]
Stop threading Client through into the NeedsToken message

4 years agoElaborate on some documentation
Mark Rousskov [Mon, 20 Jan 2020 17:53:39 +0000 (12:53 -0500)]
Elaborate on some documentation

4 years agoRefactor to_send_clients to use a BTreeMap
Mark Rousskov [Mon, 20 Jan 2020 17:50:04 +0000 (12:50 -0500)]
Refactor to_send_clients to use a BTreeMap

This is both a performance optimization (avoiding O(n) shifting from the
beginning), and communicates intent in a nicer way overall.

It is plausible that we will eventually want to tie this data structure to
something like the DependencyQueue, i.e., to get more information on which rustc
to give tokens to. An old rustc with a very late dependency edge is less
important than one we'll need sooner, probably.

4 years agoUse an expect instead of directly panicking
Mark Rousskov [Mon, 20 Jan 2020 17:47:56 +0000 (12:47 -0500)]
Use an expect instead of directly panicking

4 years agoRefactor rustc thread granting loop
Mark Rousskov [Mon, 20 Jan 2020 17:39:18 +0000 (12:39 -0500)]
Refactor rustc thread granting loop

4 years agoReintroduce crossbeam threads
Mark Rousskov [Fri, 17 Jan 2020 01:16:36 +0000 (20:16 -0500)]
Reintroduce crossbeam threads

Turns out, these are actually necessary -- we will deadlock otherwise, though
it's not entirely obvious why.

4 years agoPop thread token requests from the front
Mark Rousskov [Thu, 16 Jan 2020 23:28:03 +0000 (18:28 -0500)]
Pop thread token requests from the front

This ensures we have a first come first served ordering for both thread and
process tokens.

4 years agoAdd some commentary
Mark Rousskov [Thu, 16 Jan 2020 23:25:02 +0000 (18:25 -0500)]
Add some commentary

4 years agoMove transient state to separate struct
Mark Rousskov [Thu, 16 Jan 2020 23:01:01 +0000 (18:01 -0500)]
Move transient state to separate struct

4 years agoTake JobQueue by-value in drain_the_queue
Mark Rousskov [Thu, 16 Jan 2020 22:44:50 +0000 (17:44 -0500)]
Take JobQueue by-value in drain_the_queue

4 years agoDocument ordering constraint on providing thread tokens
Mark Rousskov [Thu, 16 Jan 2020 02:02:37 +0000 (21:02 -0500)]
Document ordering constraint on providing thread tokens

4 years agoRefactor rustc_tokens to a HashMap
Mark Rousskov [Thu, 16 Jan 2020 01:45:43 +0000 (20:45 -0500)]
Refactor rustc_tokens to a HashMap

4 years agoDo not send acquired tokens to waiting rustc threads
Mark Rousskov [Thu, 16 Jan 2020 01:35:51 +0000 (20:35 -0500)]
Do not send acquired tokens to waiting rustc threads

This removes the ad-hoc token re-send in the message processing; this sort of
decision should be left up to the main loop which manages tokens.

Notably, the behavior change here is that new tokens will go solely to spawning
new rustc *processes* rather than increasing rustc internal parallelism, unless
we can't spawn new processes.

Otherwise, before this commit, we may be saturating a single rustc with tokens
rather than creating lots of rustcs that can work in parallel. In particular in
the beginning of a build, it's likely that this is worse (i.e., crates are small
and rustc internal parallelism is not at that point all that helpful) since it
severely limits the benefits of pipelining and generally makes the build
nearly serial.

4 years agoSplit waiting for an event out of the primary drainer
Mark Rousskov [Thu, 16 Jan 2020 01:24:05 +0000 (20:24 -0500)]
Split waiting for an event out of the primary drainer

This has the slight behavior change where we won't ask for new dependencies and
so forth if no events have been received but I believe that there's no activity
that can happen if an event hasn't occurred (i.e., no state change has occurred)
so there's no need for us to actually do anything in practice.

To make sure we still record CPU usage and such sufficiently often that is also
moved into the inner "waiting for events" loop.

4 years agoSplit out event handler into separate function
Mark Rousskov [Thu, 16 Jan 2020 01:18:41 +0000 (20:18 -0500)]
Split out event handler into separate function

4 years agoSplit out granting rustc token requests
Mark Rousskov [Thu, 16 Jan 2020 01:10:46 +0000 (20:10 -0500)]
Split out granting rustc token requests

4 years agoSplit out work spawning
Mark Rousskov [Thu, 16 Jan 2020 01:07:17 +0000 (20:07 -0500)]
Split out work spawning

4 years agoMove local variables to struct fields
Mark Rousskov [Thu, 16 Jan 2020 01:03:58 +0000 (20:03 -0500)]
Move local variables to struct fields

This will facilitate splitting drain_the_queue into methods

4 years agoDrop crossbeam scopes from job queue
Mark Rousskov [Wed, 15 Jan 2020 23:17:50 +0000 (18:17 -0500)]
Drop crossbeam scopes from job queue

These were unused for a long time (comment added in April 2019) and add
some complexity to API design.

4 years agoIntroduce newtype wrapping JobId
Mark Rousskov [Wed, 15 Jan 2020 22:22:25 +0000 (17:22 -0500)]
Introduce newtype wrapping JobId

4 years agoGate Cargo changes behind -Zjobserver-per-rustc
Mark Rousskov [Tue, 14 Jan 2020 22:13:48 +0000 (17:13 -0500)]
Gate Cargo changes behind -Zjobserver-per-rustc

4 years agoAdd documentation about the job queue and rustc
Mark Rousskov [Mon, 23 Dec 2019 19:45:33 +0000 (14:45 -0500)]
Add documentation about the job queue and rustc

4 years agoRecord the amount of rustc internal parallelism
Mark Rousskov [Sat, 21 Dec 2019 02:10:31 +0000 (21:10 -0500)]
Record the amount of rustc internal parallelism

4 years agoCommunicate jobserver information with each rustc
Mark Rousskov [Sat, 21 Dec 2019 01:11:10 +0000 (20:11 -0500)]
Communicate jobserver information with each rustc

4 years agoWire up methods for informing job queue of rustc jobserver state
Mark Rousskov [Thu, 19 Dec 2019 18:40:29 +0000 (13:40 -0500)]
Wire up methods for informing job queue of rustc jobserver state

4 years agoAuto merge of #7819 - ehuss:fix-replay-newlines, r=alexcrichton
bors [Wed, 22 Jan 2020 00:59:36 +0000 (00:59 +0000)]
Auto merge of #7819 - ehuss:fix-replay-newlines, r=alexcrichton

Fix cache replay including extra newlines.

The compiler output cache replay was changed in #7737 to use `BufReader::read_line` instead of `str::lines`. `read_line`, unlike `lines`, includes the trailing line ending. The code is written assuming that the line endings are stripped, so make sure they are stripped here, too.

This only happens for non-JSON messages, like `RUSTC_LOG`.

4 years agoRevert fixes of response handling and fix tests
Takayuki Nakata [Wed, 22 Jan 2020 00:19:59 +0000 (09:19 +0900)]
Revert fixes of response handling and fix tests

4 years agoFix cache replay including extra newlines.
Eric Huss [Tue, 21 Jan 2020 20:02:29 +0000 (12:02 -0800)]
Fix cache replay including extra newlines.

4 years agoAuto merge of #7798 - jnbr:dylib_path, r=alexcrichton
bors [Tue, 21 Jan 2020 16:15:39 +0000 (16:15 +0000)]
Auto merge of #7798 - jnbr:dylib_path, r=alexcrichton

Fix wrong directories in host_libdir.

This fixes a regression from #7482 where the sysroot_target_libdir leaks into the host libdir. This can cause problems when the dynamic linker does not ignore the target libraries but tries to load them instead. This happens for example when building on x86_64-musl for aarch64-musl.

4 years agoUpdate response handling to add tests for `cargo yank --undo`
Takayuki Nakata [Tue, 21 Jan 2020 00:09:39 +0000 (09:09 +0900)]
Update response handling to add tests for `cargo yank --undo`

Follow up 5e152863f.

4 years agoUpdate response handling to add tests for `cargo owner -a/-r`
Takayuki Nakata [Mon, 20 Jan 2020 09:11:40 +0000 (18:11 +0900)]
Update response handling to add tests for `cargo owner -a/-r`

Follow up 5e152863f.

4 years agoAuto merge of #7815 - rust-lang:dependabot/cargo/humantime-2.0.0, r=Eh2406
bors [Mon, 20 Jan 2020 20:33:50 +0000 (20:33 +0000)]
Auto merge of #7815 - rust-lang:dependabot/cargo/humantime-2.0.0, r=Eh2406

Update humantime requirement from 1.2.0 to 2.0.0

Updates the requirements on [humantime](https://github.com/tailhook/humantime) to permit the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/tailhook/humantime/commit/d478f8a7878edba8a609a287776e27fc16d7009b"><code>d478f8a</code></a> Version bumped to v2.0.0</li>
<li><a href="https://github.com/tailhook/humantime/commit/49f11fdc2a59746085d2457cb46bce204dec746a"><code>49f11fd</code></a> Another improvement of the error message</li>
<li><a href="https://github.com/tailhook/humantime/commit/8a13b047ca0dc731e0c515b1db544fe1fd75bd7d"><code>8a13b04</code></a> Nicer error message for plain numeric duration</li>
<li><a href="https://github.com/tailhook/humantime/commit/edfa493e8cb8217aa5a0cc638398f60d67648c93"><code>edfa493</code></a> vagga.yaml: upgrade rust to 1.31.0</li>
<li><a href="https://github.com/tailhook/humantime/commit/8b8d748566c85a73b2f940e755dc0160c93f465a"><code>8b8d748</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/tailhook/humantime/issues/13">#13</a> from gh0st42/master</li>
<li><a href="https://github.com/tailhook/humantime/commit/da7723529fa30222b73561fad0ed7ce47d9a15a4"><code>da77235</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/tailhook/humantime/issues/12">#12</a> from koushiro/works</li>
<li><a href="https://github.com/tailhook/humantime/commit/227d7e591dd76bbfbca6a236d2e8661ddfd16d63"><code>227d7e5</code></a> Made crate unsafe free and forbid unsafe</li>
<li><a href="https://github.com/tailhook/humantime/commit/b7da4ab6ad24f68660cf92ede8dc88d7400a39fa"><code>b7da4ab</code></a> Downgrade MSRV to 1.31</li>
<li><a href="https://github.com/tailhook/humantime/commit/4a406825951039c6c3414b76c855dc38384d874d"><code>4a40682</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/tailhook/humantime/issues/11">#11</a> from koushiro/apply-rustfmt-and-clippy</li>
<li><a href="https://github.com/tailhook/humantime/commit/f00dbbae37ac281c919fbf0d56caf5900f1e0085"><code>f00dbba</code></a> Apply suggestions</li>
<li>Additional commits viewable in <a href="https://github.com/tailhook/humantime/compare/v1.2.0...v2.0.0">compare view</a></li>
</ul>
</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`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<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 recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor 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)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

</details>

4 years agoAuto merge of #7817 - ehuss:fix-doc-target-test, r=Eh2406
bors [Mon, 20 Jan 2020 20:12:59 +0000 (20:12 +0000)]
Auto merge of #7817 - ehuss:fix-doc-target-test, r=Eh2406

Fix doc_target test which no longer works on stable/beta.

https://github.com/rust-lang/rust/pull/67989 changed it so that `#![feature]` requires nightly.

4 years agoFix doc_target test which no longer works on stable/beta.
Eric Huss [Mon, 20 Jan 2020 19:16:53 +0000 (11:16 -0800)]
Fix doc_target test which no longer works on stable/beta.

4 years agoUpdate humantime requirement from 1.2.0 to 2.0.0
dependabot-preview[bot] [Mon, 20 Jan 2020 05:27:58 +0000 (05:27 +0000)]
Update humantime requirement from 1.2.0 to 2.0.0

Updates the requirements on [humantime](https://github.com/tailhook/humantime) to permit the latest version.
- [Release notes](https://github.com/tailhook/humantime/releases)
- [Commits](https://github.com/tailhook/humantime/compare/v1.2.0...v2.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
4 years agoAuto merge of #7814 - ehuss:fix-em-dash, r=Eh2406
bors [Sat, 18 Jan 2020 20:25:48 +0000 (20:25 +0000)]
Auto merge of #7814 - ehuss:fix-em-dash, r=Eh2406

Fix some erroneous em-dashes in man pages.

Unfortunately asciidoctor has a built-in substitution pass that cannot be disabled.

Fixes #7807.

4 years agoAuto merge of #7808 - matthiaskrgr:clippy_v10, r=ehuss
bors [Sat, 18 Jan 2020 19:14:12 +0000 (19:14 +0000)]
Auto merge of #7808 - matthiaskrgr:clippy_v10, r=ehuss

fix some clippy warnings

4 years agoFix some erroneous em-dashes in man pages.
Eric Huss [Sat, 18 Jan 2020 19:02:18 +0000 (11:02 -0800)]
Fix some erroneous em-dashes in man pages.

4 years agofix some clippy warnings
Matthias Krüger [Fri, 17 Jan 2020 11:19:12 +0000 (12:19 +0100)]
fix some clippy warnings

4 years agoAuto merge of #7803 - alexcrichton:less-overflow, r=Eh2406
bors [Wed, 15 Jan 2020 15:34:14 +0000 (15:34 +0000)]
Auto merge of #7803 - alexcrichton:less-overflow, r=Eh2406

Don't assume iowait always increases on Linux

According to [documentation] looks like this value is documented as it
can decrease, so let's handle that without overflowing.

[documentation]: http://man7.org/linux/man-pages/man5/proc.5.html

4 years agoAuto merge of #7800 - ehuss:random-doc-comments, r=Eh2406
bors [Wed, 15 Jan 2020 15:14:37 +0000 (15:14 +0000)]
Auto merge of #7800 - ehuss:random-doc-comments, r=Eh2406

Add and update some doc comments.

Just some random things that I felt could use clarification.

4 years agoDon't assume iowait always increases on Linux
Alex Crichton [Wed, 15 Jan 2020 15:06:45 +0000 (07:06 -0800)]
Don't assume iowait always increases on Linux

According to [documentation] looks like this value is documented as it
can decrease, so let's handle that without overflowing.

[documentation]: http://man7.org/linux/man-pages/man5/proc.5.html

4 years agoAuto merge of #7799 - ehuss:consistent-dash, r=alexcrichton
bors [Wed, 15 Jan 2020 14:55:13 +0000 (14:55 +0000)]
Auto merge of #7799 - ehuss:consistent-dash, r=alexcrichton

Consistently use em-dash in environment documentation page.

4 years agoAdd and update some doc comments.
Eric Huss [Wed, 15 Jan 2020 02:07:08 +0000 (18:07 -0800)]
Add and update some doc comments.

Just some random things that I felt could use clarification.

4 years agoConsistently use em-dash in environment documentation page.
Eric Huss [Wed, 15 Jan 2020 01:59:55 +0000 (17:59 -0800)]
Consistently use em-dash in environment documentation page.

4 years agoAuto merge of #7774 - giraffate:update_credentials, r=ehuss
bors [Wed, 15 Jan 2020 00:31:05 +0000 (00:31 +0000)]
Auto merge of #7774 - giraffate:update_credentials, r=ehuss

Load credentials only when needed

Credentials are always loaded, even if these are not used. If
access to confidential files such as credentials is not given,
`cargo build` fails despite not using credentials.

Fixes #7624.

4 years agoFix wrong directories in host_libdir.
Johannes Brechtmann [Tue, 14 Jan 2020 21:57:23 +0000 (22:57 +0100)]
Fix wrong directories in host_libdir.

This fixes a regression from #7475 where the sysroot_target_libdir leaks into
the host libdir. This can cause problems when the dynamic linker does
not ignore the target libraries but tries to load them instead. This
happens for example when building on x86_64-musl for aarch64-musl.

4 years agoRefactoring to use `Vacant`/`Occupied` instead of remove/insert
Takayuki Nakata [Tue, 14 Jan 2020 13:11:16 +0000 (22:11 +0900)]
Refactoring to use `Vacant`/`Occupied` instead of remove/insert

4 years agoRefactoring of creating files in tests
Takayuki Nakata [Tue, 14 Jan 2020 07:15:29 +0000 (16:15 +0900)]
Refactoring of creating files in tests

Use `mkdir_p` and `fs::write`.

4 years agoAuto merge of #7750 - ehuss:named-config-profiles, r=alexcrichton
bors [Mon, 13 Jan 2020 21:37:15 +0000 (21:37 +0000)]
Auto merge of #7750 - ehuss:named-config-profiles, r=alexcrichton

Add named config profiles.

This adds support for named config profiles. Previously, only `dev` and `release` were allowed in config files, it now supports all profile names. I think it would be strange to have arbitrarily named profiles in `Cargo.toml`, but not allow them in config. This is a deviation from the RFC, but RFC 2282 was written before named profiles which I think changes the landscape.

This diff is a little large due to some refactoring to make it work well. Overview of the changes:
- Removed `ProfileKind` and only use an `InternedString` to track the name of the profile. I didn't feel like the enum carried its cognitive weight, and it seems to simplify some things.
- `Profiles` is no longer stored in the manifest. There was no need to do a bunch of processing for each manifest. `Manifest` now only retains the low-level `TomlProfiles`. A single `Profiles` now lives in `BuildContext`.
- The profile name requested by the user is no longer passed around. It is given to `Profiles::new` and retained inside `Profiles`.
- `Profiles::get_profile` no longer follows the priority stack and inheritance each time a profile is requested. Instead, the profile is computed once (in `Profile::new`) and merged into a single profile. This simplifies getting a profile, and makes it easier to deal with getting the config values in one place.
- I switched profile names to be `InternedString` instead of `String`. There's not a strong reason to do this, other than it seemed a little strange to be creating lots of `String`s.
    - I also added `PartialEq<str>` for `InternedString`. It has come up a few times in the past, and it seems useful. I'm not sure if it was excluded intentionally?
- The validation that the profile exists is now done in one place (`Profiles::new`).
- I removed the back-compatibility for the `overrides` key (which was renamed to `package` back in October).

Notes:
- Some of the error messages aren't as good as before, because they don't tell you where the error is located (`Cargo.toml` or `.cargo/config`). This is because the location data is lost by the time validation is done. Hopefully it will be obvious from the profile name and error message. I tried to improve error messages wherever I could.
- There are more calls to `clone()` than I would like, but they are kinda hard to avoid. Should be fewer than before.
- I noticed a bug with `-Zpanic-abort-tests` not supporting named profiles. I'll fix that separately.
- I think this fixes some bugs where package overrides in config weren't merging properly with package overrides defined in `Cargo.toml`.

4 years agoUpdate tests for formatting changes due to `anyhow` changes.
Eric Huss [Mon, 13 Jan 2020 21:36:20 +0000 (13:36 -0800)]
Update tests for formatting changes due to `anyhow` changes.

4 years agoAdd named config profiles.
Eric Huss [Fri, 27 Dec 2019 03:59:19 +0000 (19:59 -0800)]
Add named config profiles.

4 years agoAuto merge of #7755 - lu-zero:rustc-crate-type, r=alexcrichton
bors [Mon, 13 Jan 2020 15:16:11 +0000 (15:16 +0000)]
Auto merge of #7755 - lu-zero:rustc-crate-type, r=alexcrichton

Make cargo-rustc crate-type-aware

This fixes #7339 and makes the usage of `cargo rustc` less surprising overall.

4 years agoAuto merge of #7791 - ehuss:rename-kind, r=alexcrichton
bors [Mon, 13 Jan 2020 14:56:46 +0000 (14:56 +0000)]
Auto merge of #7791 - ehuss:rename-kind, r=alexcrichton

Rename `Kind`

Rename `dependency::Kind` → `dependency::DepKind`
Rename `source_id::Kind` → `source_id::SourceKind`

I struggle when there are multiple types with the same name in the same code base. I think this makes it a little clearer what the type is.

I was tempted to also rename `registry::Kind`, but I could not think of a good name. That file is particularly hard for me to understand (locked vs normal sources, abstract trait, etc.), so I don't feel comfortable changing it. It's also localized in one file, so not as important.

4 years agoHave a mean to override the root package in a workspace
Luca Barbato [Sun, 29 Dec 2019 17:17:51 +0000 (18:17 +0100)]
Have a mean to override the root package in a workspace

4 years agoRename `Kind`
Eric Huss [Sat, 11 Jan 2020 19:04:13 +0000 (11:04 -0800)]
Rename `Kind`

4 years agoAuto merge of #7789 - gentoo90:bashcomp, r=alexcrichton
bors [Fri, 10 Jan 2020 22:52:41 +0000 (22:52 +0000)]
Auto merge of #7789 - gentoo90:bashcomp, r=alexcrichton

Update bash completion

Get rid of the removed options and add the new ones.

4 years agoUpdate options in bash completion
gentoo90 [Fri, 10 Jan 2020 21:59:46 +0000 (23:59 +0200)]
Update options in bash completion

4 years agoRemove duplicate options from bash completion
gentoo90 [Fri, 10 Jan 2020 19:28:30 +0000 (21:28 +0200)]
Remove duplicate options from bash completion

4 years agoAuto merge of #7788 - alexcrichton:retry-another, r=ehuss
bors [Fri, 10 Jan 2020 16:55:21 +0000 (16:55 +0000)]
Auto merge of #7788 - alexcrichton:retry-another, r=ehuss

Add another curl spurious network error

Witnessed in a [recent build][1] looks like this is another error that
should be safe to retry.

[1]: https://github.com/bytecodealliance/wasmtime/pull/788/checks?check_run_id=383658098#step:7:16

4 years agoAuto merge of #7783 - alexcrichton:error-tweaks, r=Eh2406
bors [Fri, 10 Jan 2020 16:29:14 +0000 (16:29 +0000)]
Auto merge of #7783 - alexcrichton:error-tweaks, r=Eh2406

Some small tweaks around error in configuration

Some minor changes I found when investigating https://github.com/rust-lang/cargo/issues/7780

4 years agoAdd another curl spurious network error
Alex Crichton [Fri, 10 Jan 2020 16:11:06 +0000 (08:11 -0800)]
Add another curl spurious network error

Witnessed in a [recent build][1] looks like this is another error that
should be safe to retry.

[1]: https://github.com/bytecodealliance/wasmtime/pull/788/checks?check_run_id=383658098#step:7:16

4 years agoAuto merge of #7787 - alexcrichton:fix-tests, r=alexcrichton
bors [Fri, 10 Jan 2020 16:01:26 +0000 (16:01 +0000)]
Auto merge of #7787 - alexcrichton:fix-tests, r=alexcrichton

Fix tests with `url` crate update

Works around servo/rust-url#577

4 years agoFix tests with `url` crate update
Alex Crichton [Fri, 10 Jan 2020 16:00:35 +0000 (08:00 -0800)]
Fix tests with `url` crate update

Works around servo/rust-url#577

4 years agoRefactoring to loop over the key/values instead of hard-coding
Takayuki Nakata [Fri, 10 Jan 2020 04:44:00 +0000 (13:44 +0900)]
Refactoring to loop over the key/values instead of hard-coding

4 years agoUse `context` to create a chain of errors
Alex Crichton [Wed, 8 Jan 2020 22:51:49 +0000 (14:51 -0800)]
Use `context` to create a chain of errors

There's an existing bug (#7782) in Cargo which exacerbates the issue
here but in general having a stack of errors is a bit easier to read and
work with than having a big long error message.

4 years agoLoad credentials and add tests for `yank` and `owner` commands
Takayuki Nakata [Thu, 9 Jan 2020 13:18:45 +0000 (22:18 +0900)]
Load credentials and add tests for `yank` and `owner` commands

4 years agoRemove an unnecessary call to `from`
Alex Crichton [Wed, 8 Jan 2020 22:51:38 +0000 (14:51 -0800)]
Remove an unnecessary call to `from`

4 years agoAuto merge of #7779 - ehuss:fix-cargo-lock-ignore, r=alexcrichton
bors [Wed, 8 Jan 2020 22:28:54 +0000 (22:28 +0000)]
Auto merge of #7779 - ehuss:fix-cargo-lock-ignore, r=alexcrichton

Fix .gitignore of Cargo.lock in a subdirectory.

The code for checking if `Cargo.lock` is ignored was erroneously assuming it was at the root of the git repo.  This would cause a problem if `Cargo.lock` is in `.gitignore` in a subdirectory.

Fixes issue noted in https://github.com/rust-lang/cargo/issues/7705#issuecomment-572027382

4 years agoFix .gitignore of Cargo.lock in a subdirectory.
Eric Huss [Wed, 8 Jan 2020 18:40:17 +0000 (10:40 -0800)]
Fix .gitignore of Cargo.lock in a subdirectory.

4 years agoAuto merge of #7778 - ehuss:bump-crates-io, r=alexcrichton
bors [Wed, 8 Jan 2020 18:26:02 +0000 (18:26 +0000)]
Auto merge of #7778 - ehuss:bump-crates-io, r=alexcrichton

Bump crates-io

Needed for #7776.

4 years agoBump crates-io
Eric Huss [Wed, 8 Jan 2020 18:05:35 +0000 (10:05 -0800)]
Bump crates-io

4 years agoAuto merge of #7776 - alexcrichton:anyhow, r=ehuss
bors [Wed, 8 Jan 2020 17:50:44 +0000 (17:50 +0000)]
Auto merge of #7776 - alexcrichton:anyhow, r=ehuss

Migrate from the `failure` crate to `anyhow`

The `anyhow` crate interoperates with the `std::error::Error` trait
rather than a custom `Fail` trait, and this is the general trend of
error handling in Rust as well.

Note that this is mostly mechanical (sed) and intended to get the test
suite passing. As usual there's still more idiomatic cleanup that can
happen, but that's left to later commits.

4 years agobump version for test build
Fabian Grünbichler [Tue, 7 Jan 2020 15:40:55 +0000 (16:40 +0100)]
bump version for test build

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agodrop patches applied upstream or in debcargo-conf
Fabian Grünbichler [Tue, 7 Jan 2020 15:41:43 +0000 (16:41 +0100)]
drop patches applied upstream or in debcargo-conf

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoRun rustfmt
Alex Crichton [Wed, 8 Jan 2020 03:58:45 +0000 (19:58 -0800)]
Run rustfmt

4 years agoMigrate from the `failure` crate to `anyhow`
Alex Crichton [Tue, 7 Jan 2020 22:30:15 +0000 (14:30 -0800)]
Migrate from the `failure` crate to `anyhow`

The `anyhow` crate interoperates with the `std::error::Error` trait
rather than a custom `Fail` trait, and this is the general trend of
error handling in Rust as well.

Note that this is mostly mechanical (sed) and intended to get the test
suite passing. As usual there's still more idiomatic cleanup that can
happen, but that's left to later commits.

4 years agoUpdate upstream source from tag 'upstream/0.41.0'
Fabian Grünbichler [Tue, 7 Jan 2020 15:39:44 +0000 (16:39 +0100)]
Update upstream source from tag 'upstream/0.41.0'

Update to upstream version '0.41.0'
with Debian dir 92332b45217dae3935f3ddad2125db63795b5974

4 years agoNew upstream version 0.41.0
Fabian Grünbichler [Tue, 7 Jan 2020 15:39:17 +0000 (16:39 +0100)]
New upstream version 0.41.0

4 years agoupdate debcargo-conf.patch and vendor whitelist
Fabian Grünbichler [Tue, 7 Jan 2020 14:49:12 +0000 (15:49 +0100)]
update debcargo-conf.patch and vendor whitelist

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>