]> git.proxmox.com Git - cargo.git/log
cargo.git
3 years agoMinor cleanup.
Eric Huss [Fri, 23 Oct 2020 23:12:10 +0000 (16:12 -0700)]
Minor cleanup.

3 years agoSome minor cleanup.
Eric Huss [Thu, 22 Oct 2020 16:54:48 +0000 (09:54 -0700)]
Some minor cleanup.

3 years agoExpose implicit features in `cargo metadata`.
Eric Huss [Thu, 22 Oct 2020 16:48:45 +0000 (09:48 -0700)]
Expose implicit features in `cargo metadata`.

3 years agoNew namespaced features implementation.
Eric Huss [Tue, 20 Oct 2020 18:15:48 +0000 (11:15 -0700)]
New namespaced features implementation.

3 years agoSlightly rewrite how conflicting activation errors are processed.
Eric Huss [Tue, 20 Oct 2020 00:23:31 +0000 (17:23 -0700)]
Slightly rewrite how conflicting activation errors are processed.

I'm not sure why the original code partitioned the errors in the way
that it did. I think it is better to exhaustively match all the reasons,
so that when new reasons are added, it will be clear that this code
needs to be updated. I also think it simplifies the code a little.

3 years agoRename features() to unstable_features().
Eric Huss [Mon, 19 Oct 2020 23:54:45 +0000 (16:54 -0700)]
Rename features() to unstable_features().

To avoid confusion with the...other thing called "features".

3 years agoMove namespaced features tests to a separate file.
Eric Huss [Mon, 19 Oct 2020 23:51:02 +0000 (16:51 -0700)]
Move namespaced features tests to a separate file.

3 years agoAuto merge of #8804 - ehuss:clippy-fixes, r=alexcrichton
bors [Fri, 23 Oct 2020 16:58:04 +0000 (16:58 +0000)]
Auto merge of #8804 - ehuss:clippy-fixes, r=alexcrichton

Some minor clippy fixes.

3 years agoSome minor clippy fixes.
Eric Huss [Thu, 22 Oct 2020 17:40:16 +0000 (10:40 -0700)]
Some minor clippy fixes.

3 years agoAuto merge of #8803 - ehuss:toml-links, r=alexcrichton
bors [Wed, 21 Oct 2020 19:39:06 +0000 (19:39 +0000)]
Auto merge of #8803 - ehuss:toml-links, r=alexcrichton

Update TOML website links.

Update the links to the new, fancy TOML website.  Also added a few more links.

Closes #8800

3 years agoUpdate TOML website links.
Eric Huss [Wed, 21 Oct 2020 19:10:39 +0000 (12:10 -0700)]
Update TOML website links.

3 years agoAuto merge of #8752 - weihanglo:feat/glob-pattern, r=ehuss
bors [Tue, 20 Oct 2020 19:31:26 +0000 (19:31 +0000)]
Auto merge of #8752 - weihanglo:feat/glob-pattern, r=ehuss

Support glob patterns for package/target selection

Resolves #8582

## What

Commands that supports glob patterns on package/target selection:

- `build`
- `test`
- `bench`
- `doc`
- `check`
- `fix` (run `check` underneath the hood)
- `tree` (no target selection functionalit as same as before)

Commands that supports glob patterns on target selection only:

- `rustdoc` (can only build one package via `-p/--package` option)
- `rustc`  (can only build one package via `-p/--package` option)

Command that _does not_ support any glob patterns for package/target selection:

- `run` (you can only run at most one executable)

## How

By using existing [`glob`](https://crates.io/crates/glob) crate to

1. check whether a target filter is a glob pattern, and then
1. compare if the target matches the filter.

Also, I loosed some shell-style restriction in cargo-test-support (by adding simple quote arguments support).

## Breaking Changes

Suppose no.

- No public API introduced.
- All valid glob pattern chars (`*`, `?`, `[`, `]`) characters [are restricted by Cargo](https://github.com/rust-lang/cargo/blob/75615f8e69f748d7ef0df7bc0b064a9b1f5c78b2/src/cargo/util/restricted_names.rs#L70-L82 ) due to not containing in`XID_Continue` character set in [UAX#31](https://docs.rs/unicode-xid/0.2.1/unicode_xid/trait.UnicodeXID.html) and are also restricted

## Performance Regression

Definitely gets some.

However, assumed no one would pass lots of package/target selection with glob patterns, so the extra overhead for ordinary use cases are glob pattern existence checks on each target filter. The current implementation is somewhat naive, so if you have any better algorithm, please help me improve it.

## Documentation

I have done my best effort to write the documentation, but as a non-native English speaker I need helps to polish these sentences. Besides, I am not quite sure should we mention glob pattern in CLI help text, which is a bit lengthy at the moment....

3 years agoAuto merge of #8795 - rust-lang:dependabot/cargo/env_logger-0.8.1, r=alexcrichton
bors [Mon, 19 Oct 2020 17:54:52 +0000 (17:54 +0000)]
Auto merge of #8795 - rust-lang:dependabot/cargo/env_logger-0.8.1, r=alexcrichton

Update env_logger requirement from 0.7.0 to 0.8.1

Updates the requirements on [env_logger](https://github.com/env-logger-rs/env_logger) to permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/env-logger-rs/env_logger/releases">env_logger's releases</a>.</em></p>
<blockquote>
<h2>0.8.1</h2>
<p>Update links in the documentation that were pointing to the old repository location.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/26e821b94f0b0b9fd3536c0ba7095c1b6c7a3ffe"><code>26e821b</code></a> Update repository links and release 0.8.1</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/9ffe00de4ff1429ccd004c42f82034b56a41a957"><code>9ffe00d</code></a> Release version 0.8.0</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/2b33c97117355cdc599aa29fb1a64b8016ee3f68"><code>2b33c97</code></a> Fix rustc &amp; clippy lints</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/b8c3754a1de50ac720657d2f328ea98148e1d80d"><code>b8c3754</code></a> chore(examples): add syslog friendly format (<a href="https://github-redirect.dependabot.com/env-logger-rs/env_logger/issues/174">#174</a>)</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/a5a7ddc34ee82fe043eed8c3f89f5f83058f6a6f"><code>a5a7ddc</code></a> ci(docs): remove ci crate (<a href="https://github-redirect.dependabot.com/env-logger-rs/env_logger/issues/173">#173</a>)</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/3a331e46362bd96c042af9558de3a638c841d448"><code>3a331e4</code></a> chore(readme): fix badge links</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/eeedfa99be9b9619e84154de8592ce24c0f4daf5"><code>eeedfa9</code></a> ci(docs): add manual run trigger (<a href="https://github-redirect.dependabot.com/env-logger-rs/env_logger/issues/171">#171</a>)</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/2793bb5696c7740ced5c82ad27d4a9a7cd093a44"><code>2793bb5</code></a> ci(workflow): add documentation workflow (<a href="https://github-redirect.dependabot.com/env-logger-rs/env_logger/issues/170">#170</a>)</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/0ef5cffa29a45c9b0c572f470581d617fc7e50b0"><code>0ef5cff</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/env-logger-rs/env_logger/issues/168">#168</a> from KodrAus/chore/build-fn-cleanup</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/b24920eb7afaaa95edca0dd36f50caaca2b95ccf"><code>b24920e</code></a> deprecate env_logger::from_env and clean up examples</li>
<li>Additional commits viewable in <a href="https://github.com/env-logger-rs/env_logger/compare/v0.7.0...v0.8.1">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>

3 years agoUpdate env_logger requirement from 0.7.0 to 0.8.1
dependabot-preview[bot] [Mon, 19 Oct 2020 05:17:38 +0000 (05:17 +0000)]
Update env_logger requirement from 0.7.0 to 0.8.1

Updates the requirements on [env_logger](https://github.com/env-logger-rs/env_logger) to permit the latest version.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases)
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.7.0...v0.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
3 years agoMerge branch 'master' into feat/glob-pattern
Weihang Lo [Sun, 18 Oct 2020 00:48:30 +0000 (08:48 +0800)]
Merge branch 'master' into feat/glob-pattern

3 years agoAuto merge of #8793 - ehuss:fix-man-links, r=alexcrichton
bors [Sat, 17 Oct 2020 20:19:30 +0000 (20:19 +0000)]
Auto merge of #8793 - ehuss:fix-man-links, r=alexcrichton

Fix man page links inside `option` blocks.

Links inside `{{#option}}` blocks were erroneously being converted to absolute links when emitting the `md` format because they were being rendered as HTML.  This wasn't intended and caused some links to fail. It also causes problems for offline viewing (since the links are to an external website).

Also, man-page links like `{{man "cargo-foo" 1}}` were linking to `.md` extension, but since they are processed as markdown into HTML, mdbook's `.md` to `.html` translation wasn't getting applied. The simple fix is to always use `.html`.

This revealed a legitimate error in a link in `cargo-publish.md` which had the wrong anchor link (`#registrydefault`).

This also revealed that the CI check that the man pages are in sync wasn't working quite right (it was not checking the `etc/man` directory for changes).

3 years agoFix man page links inside `option` blocks.
Eric Huss [Sat, 17 Oct 2020 18:49:15 +0000 (11:49 -0700)]
Fix man page links inside `option` blocks.

3 years agoFix man CI validation.
Eric Huss [Sat, 17 Oct 2020 18:47:18 +0000 (11:47 -0700)]
Fix man CI validation.

The check that generated files are in sync wasn't correctly checking
the etc/man directory.

3 years agoAuto merge of #8784 - jyn514:broken-docs, r=ehuss
bors [Thu, 15 Oct 2020 14:41:21 +0000 (14:41 +0000)]
Auto merge of #8784 - jyn514:broken-docs, r=ehuss

Fix broken link in reference docs

Found in https://github.com/rust-lang/rust/pull/77971.

3 years agoFix broken link in reference docs
Joshua Nelson [Thu, 15 Oct 2020 14:06:22 +0000 (10:06 -0400)]
Fix broken link in reference docs

3 years agoAuto merge of #8758 - ebroto:cargo_primary_package, r=ehuss
bors [Wed, 14 Oct 2020 23:07:45 +0000 (23:07 +0000)]
Auto merge of #8758 - ebroto:cargo_primary_package, r=ehuss

Reinstate CARGO_PRIMARY_PACKAGE (take 2)

As discussed in [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/RUSTC_WORKSPACE_WRAPPER/near/212461098)

r? `@ehuss`

3 years agoRework tests to avoid using -vv
Eduardo Broto [Wed, 14 Oct 2020 22:44:04 +0000 (00:44 +0200)]
Rework tests to avoid using -vv

Environment variables are represented differently in differents OSes in
the output.

Add tests checking if the variable is set instead.

3 years agoAdd tests for CARGO_PRIMARY_PACKAGE (workspaces)
Eduardo Broto [Mon, 12 Oct 2020 14:01:49 +0000 (16:01 +0200)]
Add tests for CARGO_PRIMARY_PACKAGE (workspaces)

3 years agoAdd test for CARGO_PRIMARY_PACKAGE
Eduardo Broto [Mon, 12 Oct 2020 13:26:40 +0000 (15:26 +0200)]
Add test for CARGO_PRIMARY_PACKAGE

3 years agoAdd documentation for CARGO_PRIMARY_PACKAGE
Eduardo Broto [Mon, 12 Oct 2020 13:25:33 +0000 (15:25 +0200)]
Add documentation for CARGO_PRIMARY_PACKAGE

3 years agoReinstate CARGO_PRIMARY_PACKAGE
Eduardo Broto [Tue, 6 Oct 2020 21:06:44 +0000 (23:06 +0200)]
Reinstate CARGO_PRIMARY_PACKAGE

3 years agoAuto merge of #8773 - pickfire:patch-1, r=ehuss
bors [Wed, 14 Oct 2020 16:57:12 +0000 (16:57 +0000)]
Auto merge of #8773 - pickfire:patch-1, r=ehuss

Add actionable help message for --features

Fix #8770

3 years agoAuto merge of #8777 - ehuss:fix-doc-itarget, r=alexcrichton
bors [Wed, 14 Oct 2020 16:33:46 +0000 (16:33 +0000)]
Auto merge of #8777 - ehuss:fix-doc-itarget, r=alexcrichton

Fix panic in `cargo doc` with -Zfeatures=itarget

There are some situations where `cargo doc -Zfeatures=itarget` can panic where an optional shared dependency is part of an inactive target. The issue is that the filtering logic in `compute_deps` should have been shared with `compute_deps_doc`.  I moved the common filtering into `State` to try to share the code.

Fixes #8774

3 years agoFix help message in features.rs test
Ivan Tham [Wed, 14 Oct 2020 02:21:37 +0000 (10:21 +0800)]
Fix help message in features.rs test

3 years agoAuto merge of #8778 - ehuss:update-git2, r=alexcrichton
bors [Wed, 14 Oct 2020 02:04:31 +0000 (02:04 +0000)]
Auto merge of #8778 - ehuss:update-git2, r=alexcrichton

Update git2.

Closes #8517
Closes #8588
Closes #8352
Closes #4777
Closes #8746

I only added a test for one of these. I can add for the others if you want.

3 years agoAdd help to substitute macros
Ivan Tham [Wed, 14 Oct 2020 02:01:12 +0000 (10:01 +0800)]
Add help to substitute macros

3 years agoSuggest manifest for --features help
Ivan Tham [Wed, 14 Oct 2020 02:00:02 +0000 (10:00 +0800)]
Suggest manifest for --features help

Suggested by ehuss

3 years agoUpdate git2.
Eric Huss [Wed, 14 Oct 2020 01:13:25 +0000 (18:13 -0700)]
Update git2.

3 years agoFix panic in `cargo doc` with -Zfeatures=itarget
Eric Huss [Tue, 13 Oct 2020 22:39:46 +0000 (15:39 -0700)]
Fix panic in `cargo doc` with -Zfeatures=itarget

3 years agoFix test for package_features for help
Ivan Tham [Tue, 13 Oct 2020 17:06:16 +0000 (01:06 +0800)]
Fix test for package_features for help

3 years agoAuto merge of #8767 - MonliH:master, r=ehuss
bors [Tue, 13 Oct 2020 16:48:32 +0000 (16:48 +0000)]
Auto merge of #8767 - MonliH:master, r=ehuss

Document RUSTFMT environment variable

This PR documents the `RUSTFMT` enviorment variable, as specified in [rust-lang/rustfmt/4426](https://github.com/rust-lang/rustfmt/issues/4426) and [rust-lang/rustfmt/4419](https://github.com/rust-lang/rustfmt/pull/4419).

3 years agoAdd actionable help message for --features
Ivan Tham [Tue, 13 Oct 2020 16:45:31 +0000 (00:45 +0800)]
Add actionable help message for --features

Fix #8770

3 years agoAuto merge of #8769 - rust-lang:dependabot/cargo/crossbeam-utils-0.8, r=alexcrichton
bors [Mon, 12 Oct 2020 21:26:33 +0000 (21:26 +0000)]
Auto merge of #8769 - rust-lang:dependabot/cargo/crossbeam-utils-0.8, r=alexcrichton

Update crossbeam-utils requirement from 0.7 to 0.8

Updates the requirements on [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) to permit the latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md">crossbeam-utils's changelog</a>.</em></p>
<blockquote>
<h1>Version 0.8.0</h1>
<ul>
<li>Bump the minimum supported Rust version to 1.36.</li>
<li>Bump <code>crossbeam-channel</code> to <code>0.5</code>.</li>
<li>Bump <code>crossbeam-deque</code> to <code>0.8</code>.</li>
<li>Bump <code>crossbeam-epoch</code> to <code>0.9</code>.</li>
<li>Bump <code>crossbeam-queue</code> to <code>0.3</code>.</li>
<li>Bump <code>crossbeam-utils</code> to <code>0.8</code>.</li>
</ul>
<h1>Version 0.7.3</h1>
<ul>
<li>Fix breakage with nightly feature due to <a href="https://github-redirect.dependabot.com/rust-lang/rust/issues/65214">rust-lang/rust#65214</a>.</li>
<li>Bump <code>crossbeam-channel</code> to <code>0.4</code>.</li>
<li>Bump <code>crossbeam-epoch</code> to <code>0.8</code>.</li>
<li>Bump <code>crossbeam-queue</code> to <code>0.2</code>.</li>
<li>Bump <code>crossbeam-utils</code> to <code>0.7</code>.</li>
</ul>
<h1>Version 0.7.2</h1>
<ul>
<li>Bump <code>crossbeam-channel</code> to <code>0.3.9</code>.</li>
<li>Bump <code>crossbeam-epoch</code> to <code>0.7.2</code>.</li>
<li>Bump <code>crossbeam-utils</code> to <code>0.6.6</code>.</li>
</ul>
<h1>Version 0.7.1</h1>
<ul>
<li>Bump <code>crossbeam-utils</code> to <code>0.6.5</code>.</li>
</ul>
<h1>Version 0.7.0</h1>
<ul>
<li>Remove <code>ArcCell</code>, <code>MsQueue</code>, and <code>TreiberStack</code>.</li>
<li>Change the interface of <code>ShardedLock</code> to match <code>RwLock</code>.</li>
<li>Add <code>SegQueue::len()</code>.</li>
<li>Rename <code>SegQueue::try_pop()</code> to <code>SegQueue::pop()</code>.</li>
<li>Change the return type of <code>SegQueue::pop()</code> to <code>Result</code>.</li>
<li>Introduce <code>ArrayQueue</code>.</li>
<li>Update dependencies.</li>
</ul>
<h1>Version 0.6.0</h1>
<ul>
<li>Update dependencies.</li>
</ul>
<h1>Version 0.5.0</h1>
<ul>
<li>Update <code>crossbeam-channel</code> to 0.3.</li>
<li>Update <code>crossbeam-utils</code> to 0.6.</li>
<li>Add <code>AtomicCell</code>, <code>SharedLock</code>, and <code>WaitGroup</code>.</li>
</ul>
<h1>Version 0.4.1</h1>
<ul>
<li>Fix a double-free bug in <code>MsQueue</code> and <code>SegQueue</code>.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/crossbeam-rs/crossbeam/commit/d9dfc9e1ffabcb3c01addad14878f16c2795c371"><code>d9dfc9e</code></a> Merge <a href="https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/581">#581</a></li>
<li><a href="https://github.com/crossbeam-rs/crossbeam/commit/2a3d84b8dbaa9554c6705d5318fab76005ac2a44"><code>2a3d84b</code></a> Prepare for the next release</li>
<li><a href="https://github.com/crossbeam-rs/crossbeam/commit/5ea6e705eadefe4cb454a14c723ffe77b15cd89a"><code>5ea6e70</code></a> Merge <a href="https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/580">#580</a></li>
<li><a href="https://github.com/crossbeam-rs/crossbeam/commit/b363b3dcd72e9caee55f4daafd47f9385984e20a"><code>b363b3d</code></a> Fix UB in destroy_array test</li>
<li><a href="https://github.com/crossbeam-rs/crossbeam/commit/e08b21cc086fc42af0e9927a68bc3120bee87af5"><code>e08b21c</code></a> Merge <a href="https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/577">#577</a></li>
<li><a href="https://github.com/crossbeam-rs/crossbeam/commit/6217abf4a97b85c22b8dbae247503779af182741"><code>6217abf</code></a> Ignore clippy::match_like_matches_macro lint</li>
<li><a href="https://github.com/crossbeam-rs/crossbeam/commit/9cbfae7380c902dd29cf83c812cf1d721f970c96"><code>9cbfae7</code></a> Update cfg-if to 1</li>
<li><a href="https://github.com/crossbeam-rs/crossbeam/commit/24447495c9e3f0cf2d98606263273e2f9b427d9b"><code>2444749</code></a> Merge <a href="https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/574">#574</a></li>
<li><a href="https://github.com/crossbeam-rs/crossbeam/commit/619f7db2dfae7bd683d6ebb7e9aeb062409c54ed"><code>619f7db</code></a> Fixed a few typos</li>
<li><a href="https://github.com/crossbeam-rs/crossbeam/commit/7cc83772635bab80b28daadfd0a3d911554884be"><code>7cc8377</code></a> Better plot.py with Python 3 &amp; remove hard code (<a href="https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/569">#569</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.7.0...crossbeam-utils-0.8.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>

3 years agoAuto merge of #8772 - ehuss:update-toml, r=alexcrichton
bors [Mon, 12 Oct 2020 18:49:55 +0000 (18:49 +0000)]
Auto merge of #8772 - ehuss:update-toml, r=alexcrichton

Update toml dependency

3 years agoUpdate toml dependency
Eric Huss [Mon, 12 Oct 2020 18:22:45 +0000 (11:22 -0700)]
Update toml dependency

3 years agoUpdate crossbeam-utils requirement from 0.7 to 0.8
dependabot-preview[bot] [Mon, 12 Oct 2020 05:17:52 +0000 (05:17 +0000)]
Update crossbeam-utils requirement from 0.7 to 0.8

Updates the requirements on [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) to permit the latest version.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.7.0...crossbeam-utils-0.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
3 years agoAuto merge of #8765 - l4l:proc-macro-suffix, r=alexcrichton
bors [Sun, 11 Oct 2020 17:20:05 +0000 (17:20 +0000)]
Auto merge of #8765 - l4l:proc-macro-suffix, r=alexcrichton

Mark proc-macro crates

Resolves #8107

3 years agoRevise docs
Jonathan Li [Sun, 11 Oct 2020 17:14:31 +0000 (13:14 -0400)]
Revise docs

3 years agoAuto merge of #8766 - weihanglo:cmd/tree-all-targets, r=ehuss
bors [Sat, 10 Oct 2020 20:39:52 +0000 (20:39 +0000)]
Auto merge of #8766 - weihanglo:cmd/tree-all-targets, r=ehuss

cargo-tree: mention special target `all` in CLI help text

Fixes #8567

Actually, `cargo help tree` has already got a [description about `--target=all`](https://github.com/rust-lang/cargo/blob/3045228ee139f970ccc892aa5c34c0f3cb70ee06/src/doc/man/cargo-tree.md#tree-options) in tree options:

```console
$ cargo help tree
...
OPTIONS
   Tree Options
        ...
       --target triple
           Filter dependencies matching the given target-triple. The default is the host platform. Use the value all to include all targets.
...

3 years agoDocument RUSTFMT env var behaviour
Jonathan Li [Sat, 10 Oct 2020 15:58:15 +0000 (11:58 -0400)]
Document RUSTFMT env var behaviour

3 years agodoc(tree): mention special target `all` in CLI help
Weihang Lo [Sat, 10 Oct 2020 08:43:32 +0000 (16:43 +0800)]
doc(tree): mention special target `all` in CLI help

Fixes #8567

3 years agoUpdate tree tests
Kitsu [Sat, 10 Oct 2020 08:38:52 +0000 (11:38 +0300)]
Update tree tests

3 years agoMark proc-macro crates
Kitsu [Sat, 10 Oct 2020 07:46:09 +0000 (10:46 +0300)]
Mark proc-macro crates

3 years agostyle: cargo fmt
Weihang Lo [Sat, 10 Oct 2020 02:08:10 +0000 (10:08 +0800)]
style: cargo fmt

3 years agofix: emit errors instead of warnings when glob patterns not found
Weihang Lo [Sat, 10 Oct 2020 01:50:36 +0000 (09:50 +0800)]
fix: emit errors instead of warnings when glob patterns not found

3 years agotest: use `with_stderr_unordered`
Weihang Lo [Sat, 10 Oct 2020 00:05:24 +0000 (08:05 +0800)]
test: use `with_stderr_unordered`

3 years agotest: normalize raw string indentation.
Weihang Lo [Fri, 9 Oct 2020 23:44:57 +0000 (07:44 +0800)]
test: normalize raw string indentation.

3 years agorefactor: simplify match -> if let
Weihang Lo [Fri, 9 Oct 2020 23:17:18 +0000 (07:17 +0800)]
refactor: simplify match -> if let

3 years agotest: be consistent on error message styles
Weihang Lo [Fri, 9 Oct 2020 22:58:06 +0000 (06:58 +0800)]
test: be consistent on error message styles

3 years agoAuto merge of #8764 - ehuss:version-bump, r=alexcrichton
bors [Fri, 9 Oct 2020 19:53:46 +0000 (19:53 +0000)]
Auto merge of #8764 - ehuss:version-bump, r=alexcrichton

Bump to 0.50.0, update changelog

3 years agoUpdate changelog for 1.48.
Eric Huss [Fri, 9 Oct 2020 17:15:11 +0000 (10:15 -0700)]
Update changelog for 1.48.

3 years agoBump to 0.50.0
Eric Huss [Fri, 9 Oct 2020 16:46:36 +0000 (09:46 -0700)]
Bump to 0.50.0

3 years agoAuto merge of #8760 - ehuss:github-add-path, r=Eh2406
bors [Thu, 8 Oct 2020 16:21:26 +0000 (16:21 +0000)]
Auto merge of #8760 - ehuss:github-add-path, r=Eh2406

Update deprecated GitHub add-path in workflows.

The old method of using `::` commands is being deprecated, see https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/.

3 years agoUpdate deprecated GitHub add-path in workflows.
Eric Huss [Thu, 8 Oct 2020 16:12:12 +0000 (09:12 -0700)]
Update deprecated GitHub add-path in workflows.

3 years agoAuto merge of #8755 - ehuss:fingerprint-lto, r=alexcrichton
bors [Mon, 5 Oct 2020 18:29:52 +0000 (18:29 +0000)]
Auto merge of #8755 - ehuss:fingerprint-lto, r=alexcrichton

Add LTO to the metadata filename hash.

There are some rare cases where different cargo commands end up building dependencies with different LTO settings. This adds the LTO value to the filename hash so that the cache does not thrash when switching between these commands.

Fixes #8669

3 years agoAdd LTO to the metadata filename hash.
Eric Huss [Mon, 5 Oct 2020 15:56:22 +0000 (08:56 -0700)]
Add LTO to the metadata filename hash.

3 years agoAuto merge of #8754 - ehuss:lto-dylib-rlib, r=alexcrichton
bors [Mon, 5 Oct 2020 17:56:19 +0000 (17:56 +0000)]
Auto merge of #8754 - ehuss:lto-dylib-rlib, r=alexcrichton

Fix dylib+rlib with LTO.

A mixed dylib+rlib crate with LTO was using the wrong settings. It was using `OnlyObject`, but the `rlib` needs bitcode when linked with other things.

Fixes #8673

3 years agoFix dylib+rlib with LTO.
Eric Huss [Mon, 5 Oct 2020 15:15:32 +0000 (08:15 -0700)]
Fix dylib+rlib with LTO.

3 years agodoc: build-man.sh for glob pattern support
Weihang Lo [Sun, 4 Oct 2020 15:38:47 +0000 (23:38 +0800)]
doc: build-man.sh for glob pattern support

3 years agodoc: glob pattern support for package/target selection
Weihang Lo [Sun, 4 Oct 2020 15:38:00 +0000 (23:38 +0800)]
doc: glob pattern support for package/target selection

3 years agotest(test): glob support for package selection
Weihang Lo [Sun, 4 Oct 2020 15:31:22 +0000 (23:31 +0800)]
test(test): glob support for package selection

3 years agotest(check): glob support for package selection
Weihang Lo [Sun, 4 Oct 2020 15:31:09 +0000 (23:31 +0800)]
test(check): glob support for package selection

3 years agotest(build): glob support for package selection
Weihang Lo [Sun, 4 Oct 2020 15:30:44 +0000 (23:30 +0800)]
test(build): glob support for package selection

3 years agotest(run): glob support for package selection
Weihang Lo [Sun, 4 Oct 2020 15:30:33 +0000 (23:30 +0800)]
test(run): glob support for package selection

3 years agotest(bench): glob support for package selection
Weihang Lo [Sun, 4 Oct 2020 15:29:11 +0000 (23:29 +0800)]
test(bench): glob support for package selection

3 years agotest(doc): glob support for package selection
Weihang Lo [Sun, 4 Oct 2020 15:28:48 +0000 (23:28 +0800)]
test(doc): glob support for package selection

3 years agotest(rustdoc): glob support for package selection
Weihang Lo [Sun, 4 Oct 2020 15:28:22 +0000 (23:28 +0800)]
test(rustdoc): glob support for package selection

3 years agotest(rustc): glob support for package selection
Weihang Lo [Sun, 4 Oct 2020 15:28:01 +0000 (23:28 +0800)]
test(rustc): glob support for package selection

3 years agotest(tree): glob support for package selection
Weihang Lo [Sun, 4 Oct 2020 15:27:45 +0000 (23:27 +0800)]
test(tree): glob support for package selection

3 years agofeat: glob support for package selection
Weihang Lo [Sun, 4 Oct 2020 15:27:01 +0000 (23:27 +0800)]
feat: glob support for package selection

3 years agotest: glob support for target selection
Weihang Lo [Sun, 4 Oct 2020 15:25:53 +0000 (23:25 +0800)]
test: glob support for target selection

3 years agofeat: glob support for target selection
Weihang Lo [Sun, 4 Oct 2020 15:22:54 +0000 (23:22 +0800)]
feat: glob support for target selection

3 years agotest: minimal shell quote supoort for cargo-test-support
Weihang Lo [Sun, 4 Oct 2020 14:55:50 +0000 (22:55 +0800)]
test: minimal shell quote supoort for cargo-test-support

3 years agoAuto merge of #8744 - roblabla:homepage-doc-cargo-metadata, r=alexcrichton
bors [Fri, 2 Oct 2020 14:53:21 +0000 (14:53 +0000)]
Auto merge of #8744 - roblabla:homepage-doc-cargo-metadata, r=alexcrichton

Homepage doc cargo metadata

Adds two new field to cargo-metadata: `homepage` and `documentation`, lifted directly from the Cargo.toml. This additionally makes those fields available through `cargo read-manifest`.

3 years agoAdd homepage/documentation to cargo-metadata docs
roblabla [Thu, 1 Oct 2020 09:24:22 +0000 (09:24 +0000)]
Add homepage/documentation to cargo-metadata docs

3 years agoTest that homepage/documentation values are properly propagated
roblabla [Thu, 1 Oct 2020 09:23:06 +0000 (09:23 +0000)]
Test that homepage/documentation values are properly propagated

3 years agoFix tests
roblabla [Thu, 1 Oct 2020 09:22:49 +0000 (09:22 +0000)]
Fix tests

3 years agoAdd homepage and documentation to package in cargo metadata
roblabla [Thu, 1 Oct 2020 08:49:06 +0000 (08:49 +0000)]
Add homepage and documentation to package in cargo metadata

3 years agoAuto merge of #8741 - est31:makeflags, r=alexcrichton
bors [Tue, 29 Sep 2020 18:42:19 +0000 (18:42 +0000)]
Auto merge of #8741 - est31:makeflags, r=alexcrichton

Correct mistake about supporting sub-makes and document CARGO_MAKEFLAGS

Sub-makes are currently not supported as the jobserver crate only
sets CARGO_MAKEFLAGS which GNU Make doesn't understand.

This might be reasonable as cargo overriding existing MAKEFLAGS
variables would be weird, but also makes the statement in the
reference false.

It's helpful for build script authors who want to invoke make
to know how to get make subprocesses work with parallel builds.

3 years agoAuto merge of #8742 - ehuss:proc-macro-test-feature, r=alexcrichton
bors [Tue, 29 Sep 2020 18:17:36 +0000 (18:17 +0000)]
Auto merge of #8742 - ehuss:proc-macro-test-feature, r=alexcrichton

Properly set for_host for proc-macro tests.

Proc-macro tests are currently forced to run for the host target (by [this line of code](https://github.com/rust-lang/cargo/blob/898ccde7ac867ecdb62184714b379c4328409399/src/cargo/ops/cargo_compile.rs#L819)). However, the code that builds the dependency graph wasn't playing by the same rules, and was building the proc-macro test as-if it was "not for_host".  This would cause the proc-macro test to pull in the wrong set of dependencies/features with the new feature resolver.

Forcing proc-macro tests to run on host isn't 100% required, since most targets have the proc_macro crate available. However, I feel like it simplifies things to build for-host. I was thinking we could relax that requirement, but I'm not really sure.  See also #4336 where there's an bug if you do specify `--target`.

Tested with the wasmtime repo running `cargo test -Zfeatures=all -p wiggle-macro` with `doctest = false` commented out of `crates/wiggle/macro/Cargo.toml`.

Fixes #8563.

3 years agoProperly set for_host for proc-macro tests.
Eric Huss [Mon, 28 Sep 2020 23:21:55 +0000 (16:21 -0700)]
Properly set for_host for proc-macro tests.

3 years agoCorrect mistake about supporting sub-makes and document CARGO_MAKEFLAGS
est31 [Mon, 28 Sep 2020 21:10:10 +0000 (23:10 +0200)]
Correct mistake about supporting sub-makes and document CARGO_MAKEFLAGS

Sub-makes are currently not supported as the jobserver crate only
sets CARGO_MAKEFLAGS which GNU Make doesn't understand.

This might be reasonable as cargo overriding existing MAKEFLAGS
variables would be weird, but also makes the statement in the
reference false.

It's helpful for build script authors who want to invoke make
to know how to get make subprocesses work with parallel builds.

3 years agoAuto merge of #8740 - nop:target-completion, r=ehuss
bors [Mon, 28 Sep 2020 14:52:35 +0000 (14:52 +0000)]
Auto merge of #8740 - nop:target-completion, r=ehuss

Add Zsh completion for target triples

Target triples are used for specifying targets for e.g. `cargo build --target thumbv7em-none-eabihf` where `thumbv7em-none-eabihf` is the target triplet.
For more information on target triples, see <https://doc.rust-lang.org/cargo/appendix/glossary.html#target>.

3 years agoAdd Zsh completion for target triples
nop [Mon, 28 Sep 2020 07:08:19 +0000 (02:08 -0500)]
Add Zsh completion for target triples

Target triples are used for specifying targets for e.g. `cargo build
--target thumbv7em-none-eabihf` where `thumbv7em-none-eabihf` is the
target triplet.
For more information on target triples, see
<https://doc.rust-lang.org/cargo/appendix/glossary.html#target>.

3 years agoAuto merge of #8735 - ehuss:git-object-not-found, r=alexcrichton
bors [Sun, 27 Sep 2020 17:44:27 +0000 (17:44 +0000)]
Auto merge of #8735 - ehuss:git-object-not-found, r=alexcrichton

Reinitialize index on "Object not found" error.

Fixes #4007

Users have occasionally been reporting "Object not found" errors when updating the index. This PR changes cargo to detect this error, and delete the index and attempt one more time to update it.  Our best theory is that the git repo is getting corrupted or out-of-sync somehow.

**Other options**
We talked about having cargo generate a ZIP file of the corrupt repo and ask the user to upload it to the issue tracker, but I feel like that isn't going to be too useful (there will be an object missing in the repo, which is unlikely to tell us how to got lost).

We could also implement some tricks to make the fetch process more atomic (by renaming the git directory before starting the fetch), but I'm uncertain if the added complexity is justified.

Another option (which I personally like) is to use `net.git-fetch-with-cli` by default if `git` is found in `PATH`.  It is faster and more reliable and handles authentication better, and I suspect the vast majority of developer and CI systems have `git` installed.  This kinda sweeps the problems of libgit2 under the rug, and would mean a huge amount of code would no longer be exercised by most users, leaving the few without `git` to be more likely to suffer obscure bugs.

**Testing**
Note that I was unable to create a local test to reproduce this, but I was able to reproduce against GitHub.  I took my index repo and removed the most recent pack file, and then ran `cargo fetch`. This resulted in the exact same error users are reporting. I believe I cannot repro locally because the network update code is significantly different from the `file://` update code (there's all sorts of negotiation that happens over the protocol).  Unless anyone has ideas on how to repro this in an automated fashion, I'm out of ideas.

**Other corruption**
In testing, I noticed there are a few other ways the "Object not found" error can happen, but this does not address them. Both cases involved deleting pack files:

1. After deleting the oldest pack file in an index, running an update, the index fetch succeeds. But then, when the `RemoteRegistry` attempts to load the `config.json` file, it can't find it (it fails [here](https://github.com/rust-lang/cargo/blob/05c611ae3c4255b7a2bcf4fcfa65b20286a07839/src/cargo/sources/registry/remote.rs#L181)).

2. After deleting the newest pack file of a git dependency in the `db` directory, the fetch succeeds, but then the call to `reset` of the checkout fails (around [here](https://github.com/rust-lang/cargo/blob/05c611ae3c4255b7a2bcf4fcfa65b20286a07839/src/cargo/sources/git/utils.rs#L480)).

Fixing these I think will be require a bit of work, since retry loops will need to be added. I'm not too eager to do that since nobody has reported an error with either of these cases (the error stack is slightly different).

3 years agoAuto merge of #8739 - ehuss:normalize-raw-strings, r=alexcrichton
bors [Sun, 27 Sep 2020 08:48:55 +0000 (08:48 +0000)]
Auto merge of #8739 - ehuss:normalize-raw-strings, r=alexcrichton

Normalize raw string indentation.

It has always slightly bugged me how strings were indented after rustfmt was run across the repo (#5176). This attempts to normalize the strings so that they open and close on the same column.  This only touches the `tests` directory.

3 years agoAuto merge of #8738 - ehuss:rustup-links, r=alexcrichton
bors [Sun, 27 Sep 2020 08:23:38 +0000 (08:23 +0000)]
Auto merge of #8738 - ehuss:rustup-links, r=alexcrichton

Update links to rustup docs.

The rustup docs have moved, so update some of the documentation links.

3 years agoAuto merge of #8715 - ehuss:contrib, r=alexcrichton
bors [Sun, 27 Sep 2020 07:06:34 +0000 (07:06 +0000)]
Auto merge of #8715 - ehuss:contrib, r=alexcrichton

Add contributor guide.

This consolidates and extends the contributor information in a single place. This is an mdbook project, along with a CI job which will build and deploy it to GitHub Pages at <https://rust-lang.github.io/cargo/contrib/>.

You can view a rendered version here: <https://ehuss.github.io/cargo/contrib/>

I don't know if this will actually be helpful to anyone, but I figured it's worth a shot.

NOTE: The CI deploy is designed to preserve the existing gh-pages content.  However, it will **delete the history** on that branch. I think that should be fine, there doesn't seem to be too much interesting stuff there.  I do have a backup in my fork, though. Some extra scrutiny on the code might be wise.  The reason it deletes the history is because deploying mdbook on every push would balloon the repository size.

3 years agoAuto merge of #8737 - ehuss:doc-update-lockfile, r=alexcrichton
bors [Sun, 27 Sep 2020 06:39:39 +0000 (06:39 +0000)]
Auto merge of #8737 - ehuss:doc-update-lockfile, r=alexcrichton

Fix minor error in `cargo update` docs.

`cargo update` does not require `Cargo.lock` to exist.

Also updated `generate-lockfile` to maybe be a little clearer (to me).

3 years agoNormalize raw string indentation.
Eric Huss [Sun, 27 Sep 2020 00:59:58 +0000 (17:59 -0700)]
Normalize raw string indentation.

3 years agoUpdate links to rustup docs.
Eric Huss [Sat, 26 Sep 2020 17:09:04 +0000 (10:09 -0700)]
Update links to rustup docs.

3 years agoFix minor error in `cargo update` docs.
Eric Huss [Sat, 26 Sep 2020 16:59:43 +0000 (09:59 -0700)]
Fix minor error in `cargo update` docs.

3 years agoNumber the subcommand steps.
Eric Huss [Sat, 26 Sep 2020 16:13:04 +0000 (09:13 -0700)]
Number the subcommand steps.

3 years agoAdd introduction to the architecture chapter.
Eric Huss [Sat, 26 Sep 2020 16:12:06 +0000 (09:12 -0700)]
Add introduction to the architecture chapter.

3 years agoReinitialize index on "Object not found" error.
Eric Huss [Fri, 25 Sep 2020 20:44:49 +0000 (13:44 -0700)]
Reinitialize index on "Object not found" error.