]> git.proxmox.com Git - cargo.git/log
cargo.git
2 years agoAuto merge of #9767 - nipunn1313:refactor, r=alexcrichton
bors [Fri, 6 Aug 2021 14:39:45 +0000 (14:39 +0000)]
Auto merge of #9767 - nipunn1313:refactor, r=alexcrichton

Refactor fake_file() away from cargo_command tests

There are already similar preexisting test helpers which
also work on windows. Port over the executable-creation
helper into the file() helper and things appear to pass.

Was inspired to do this when trying to add tests to solve a separate issue.

2 years agoRefactor fake_file() away from cargo_command tests
Nipunn Koorapati [Fri, 6 Aug 2021 00:19:42 +0000 (17:19 -0700)]
Refactor fake_file() away from cargo_command tests

There are already similar preexisting test helpers which
also work on windows. Port over the executable-creation
helper into the file() helper and things appear to pass.

2 years agoAuto merge of #9762 - erickt:bump, r=ehuss
bors [Thu, 5 Aug 2021 01:23:53 +0000 (01:23 +0000)]
Auto merge of #9762 - erickt:bump, r=ehuss

Update cargo-platform to 0.1.2

This preps cargo-platform for a release. The only substantial change is that this should include the license files into the archive that is uploaded to crates.io.

Closes #9758

2 years agoAuto merge of #9760 - alexcrichton:bump-jobserver, r=Eh2406
bors [Thu, 5 Aug 2021 00:59:49 +0000 (00:59 +0000)]
Auto merge of #9760 - alexcrichton:bump-jobserver, r=Eh2406

Bump to the latest jobserver dependency

This should help mitigate #9739 at least with a better error message as
opposed to deadlocking.

2 years agoAuto merge of #9763 - erickt:fix-semver-check, r=ehuss
bors [Thu, 5 Aug 2021 00:36:09 +0000 (00:36 +0000)]
Auto merge of #9763 - erickt:fix-semver-check, r=ehuss

Fix semver check for rust 1.54.0

This updates semver.md to use the new error message for reporting missing generic arguments.

2 years agoFix semver check for rust 1.54.0
Erick Tryzelaar [Wed, 4 Aug 2021 23:59:38 +0000 (16:59 -0700)]
Fix semver check for rust 1.54.0

This updates semver.md to use the new error message for reporting missing
generic arguments.

2 years agoUpdate cargo-platform to 0.1.2
Erick Tryzelaar [Wed, 4 Aug 2021 23:11:52 +0000 (16:11 -0700)]
Update cargo-platform to 0.1.2

This preps cargo-platform for a release. The only substantial change is that
this should include the license files into the archive that is uploaded to
crates.io.

Closes #9758

2 years agoBump to the latest jobserver dependency
Alex Crichton [Wed, 4 Aug 2021 14:25:07 +0000 (07:25 -0700)]
Bump to the latest jobserver dependency

This should help mitigate #9739 at least with a better error message as
opposed to deadlocking.

2 years agoAuto merge of #9732 - djc:rust-version-docs, r=ehuss
bors [Mon, 2 Aug 2021 20:28:08 +0000 (20:28 +0000)]
Auto merge of #9732 - djc:rust-version-docs, r=ehuss

Stabilize the rust-version field

I've tried to make the documentation here fairly comprehensive. I've also updated the first version for the 2021 edition, which should now be stable pending substantial unforeseen changes.

See #8072.

2 years agoAdd a CHANGELOG entry
Dirkjan Ochtman [Mon, 2 Aug 2021 09:28:47 +0000 (11:28 +0200)]
Add a CHANGELOG entry

2 years agoStabilize rust-version
Dirkjan Ochtman [Tue, 27 Jul 2021 18:57:46 +0000 (20:57 +0200)]
Stabilize rust-version

2 years agoDocument the rust-version field
Dirkjan Ochtman [Tue, 27 Jul 2021 14:33:57 +0000 (16:33 +0200)]
Document the rust-version field

2 years agoAuto merge of #9751 - ehuss:remove-nbsp, r=alexcrichton
bors [Fri, 30 Jul 2021 22:41:00 +0000 (22:41 +0000)]
Auto merge of #9751 - ehuss:remove-nbsp, r=alexcrichton

Remove nbsp characters.

Due to an accident due to the way I've been typing em-dash characters, a bunch of non-breaking space characters have snuck in to the source here.  I never intended that, and I think having invisible characters that are not normal spaces can be confusing, so I just replaced them with spaces. There's still a few nbsp's where they are needed.

2 years agoRemove nbsp characters.
Eric Huss [Fri, 30 Jul 2021 20:30:27 +0000 (13:30 -0700)]
Remove nbsp characters.

2 years agoAuto merge of #9750 - ehuss:update-unstable-toc, r=alexcrichton
bors [Fri, 30 Jul 2021 21:06:57 +0000 (21:06 +0000)]
Auto merge of #9750 - ehuss:update-unstable-toc, r=alexcrichton

Update unstable documentation TOC.

The unstable table of contents was slightly out-of-sync with recent changes.

2 years agoAuto merge of #9749 - ehuss:no_all-package, r=alexcrichton
bors [Fri, 30 Jul 2021 20:37:29 +0000 (20:37 +0000)]
Auto merge of #9749 - ehuss:no_all-package, r=alexcrichton

Some minor updates for package/publish package selection.

This is just a few small things I missed in the review of #9559.

* Don't include the deprecated `--all` flag in `cargo package`.
* Update the man pages for the new flags.

2 years agoUpdate unstable documentation TOC.
Eric Huss [Fri, 30 Jul 2021 20:22:34 +0000 (13:22 -0700)]
Update unstable documentation TOC.

2 years agoUpdate package/publish man pages for package selection.
Eric Huss [Fri, 30 Jul 2021 20:09:14 +0000 (13:09 -0700)]
Update package/publish man pages for package selection.

2 years agoRemove duplicated code in arg_package_spec.
Eric Huss [Fri, 30 Jul 2021 20:05:17 +0000 (13:05 -0700)]
Remove duplicated code in arg_package_spec.

2 years agoRemove `--all` from `cargo package`.
Eric Huss [Fri, 30 Jul 2021 19:59:35 +0000 (12:59 -0700)]
Remove `--all` from `cargo package`.

2 years agoAuto merge of #9748 - ehuss:version-bump, r=alexcrichton
bors [Fri, 30 Jul 2021 15:35:18 +0000 (15:35 +0000)]
Auto merge of #9748 - ehuss:version-bump, r=alexcrichton

Bump to 0.57.0, update changelog

2 years agoUpdate changelog for 1.55
Eric Huss [Fri, 30 Jul 2021 15:24:21 +0000 (08:24 -0700)]
Update changelog for 1.55

2 years agoAuto merge of #9411 - joshtriplett:stabilize-configurable-env, r=alexcrichton
bors [Fri, 30 Jul 2021 15:01:55 +0000 (15:01 +0000)]
Auto merge of #9411 - joshtriplett:stabilize-configurable-env, r=alexcrichton

Stabilize `[env]` sections

`[env]` sections seem to work as advertised.

2 years agoBump to 0.57.0
Eric Huss [Fri, 30 Jul 2021 14:24:53 +0000 (07:24 -0700)]
Bump to 0.57.0

2 years agoAdd reference from unstable doc anchor to stable env documentation
Josh Triplett [Fri, 30 Jul 2021 02:42:19 +0000 (19:42 -0700)]
Add reference from unstable doc anchor to stable env documentation

2 years agoStabilize `[env]` sections
Josh Triplett [Sun, 25 Apr 2021 04:55:52 +0000 (21:55 -0700)]
Stabilize `[env]` sections

`[env]` sections seem to work as advertised.

2 years agoAuto merge of #9747 - lf-:document-pathandargs-doc-browser, r=ehuss
bors [Thu, 29 Jul 2021 21:58:18 +0000 (21:58 +0000)]
Auto merge of #9747 - lf-:document-pathandargs-doc-browser, r=ehuss

doc: Clarify [doc].browser docs, document PathAndArgs better

I was talking to someone who was confused about the [doc].browser value type as it related to using a path with a space in it, and it seemed like this area needed clarification in general.

2 years agoClarify [doc].browser docs, document PathAndArgs better
Jade [Thu, 29 Jul 2021 21:50:34 +0000 (14:50 -0700)]
Clarify [doc].browser docs, document PathAndArgs better

2 years agoAuto merge of #9745 - ehuss:cargo-util-version, r=alexcrichton
bors [Thu, 29 Jul 2021 16:57:14 +0000 (16:57 +0000)]
Auto merge of #9745 - ehuss:cargo-util-version, r=alexcrichton

Bump cargo-util version.

I neglected to bump the version when moving some APIs over to this crate.

cc #9744

2 years agoBump cargo-util version.
Eric Huss [Thu, 29 Jul 2021 16:23:23 +0000 (09:23 -0700)]
Bump cargo-util version.

2 years agoAuto merge of #9736 - hi-rustin:rustin-patch-clippy, r=ehuss
bors [Wed, 28 Jul 2021 15:41:09 +0000 (15:41 +0000)]
Auto merge of #9736 - hi-rustin:rustin-patch-clippy, r=ehuss

Make clippy happy

Make clippy happy.

2 years agoAuto merge of #9737 - ods:doc/features_typo, r=alexcrichton
bors [Wed, 28 Jul 2021 14:05:21 +0000 (14:05 +0000)]
Auto merge of #9737 - ods:doc/features_typo, r=alexcrichton

Fix typo in features doc

2 years agoFix typo in features doc
ods [Wed, 28 Jul 2021 13:20:44 +0000 (16:20 +0300)]
Fix typo in features doc

2 years agoMake clippy happy
hi-rustin [Wed, 28 Jul 2021 06:59:43 +0000 (14:59 +0800)]
Make clippy happy

Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2 years agoAuto merge of #9730 - hi-rustin:rustin-patch-doc-test, r=alexcrichton
bors [Tue, 27 Jul 2021 15:05:14 +0000 (15:05 +0000)]
Auto merge of #9730 - hi-rustin:rustin-patch-doc-test, r=alexcrichton

doc test supports silent output

close https://github.com/rust-lang/cargo/issues/9728

2 years agodoc test supports silent output
hi-rustin [Tue, 27 Jul 2021 07:49:59 +0000 (15:49 +0800)]
doc test supports silent output

Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2 years agoAuto merge of #9727 - ehuss:fix-version, r=alexcrichton
bors [Mon, 26 Jul 2021 20:23:21 +0000 (20:23 +0000)]
Auto merge of #9727 - ehuss:fix-version, r=alexcrichton

Fix version string.

The version string for `cargo version` was inadvertently changed in #9657 so that it does not include the leading `cargo` as in `cargo 1.53.0 (4369396ce 2021-04-27)`.

2 years agoAuto merge of #9559 - tcmal:master, r=ehuss
bors [Mon, 26 Jul 2021 19:58:01 +0000 (19:58 +0000)]
Auto merge of #9559 - tcmal:master, r=ehuss

Allow publishing from workspace root.

Adds -p, --workspace, and --exclude to package and publish commands.

Uses ephemeral workspaces to avoid changing the existing functions too much.
There might be more `Finished dev [unoptimized + debuginfo] target` messages when packaging than there should be, I couldn't figure out what was generating them.
The tests aren't super extensive, as all the specs from arguments code should already be tested elsewhere.

Closes #7345

2 years agoRemove unnecessary format!
Eric Huss [Mon, 26 Jul 2021 19:56:53 +0000 (12:56 -0700)]
Remove unnecessary format!

2 years agoAuto merge of #9723 - hi-rustin:rustin-patch-better-msg, r=ehuss
bors [Mon, 26 Jul 2021 19:24:32 +0000 (19:24 +0000)]
Auto merge of #9723 - hi-rustin:rustin-patch-better-msg, r=ehuss

Better msg for wrong position

close https://github.com/rust-lang/cargo/issues/9717

2 years agoFix version string.
Eric Huss [Mon, 26 Jul 2021 19:18:22 +0000 (12:18 -0700)]
Fix version string.

2 years agoAuto merge of #9557 - danielframpton:extra-link-args, r=ehuss
bors [Mon, 26 Jul 2021 18:54:29 +0000 (18:54 +0000)]
Auto merge of #9557 - danielframpton:extra-link-args, r=ehuss

Stabilize the rustc-link-arg option

This change removes the unstable option (tracked by #9426) and unconditionally accepts additional linker arguments (as implemented in #7811 and #8441). Documentation is moved from unstable to what appeared to be the correct location.

I am not aware of any significant concerns with the option and it appears consistent with some other existing stable linker options.

Please let me know if this is not the appropriate process or if there is anything that I am missing from the PR.

2 years agofeat(package+publish): package arguments
tcmal [Wed, 21 Jul 2021 17:33:19 +0000 (18:33 +0100)]
feat(package+publish): package arguments

adds -p, --workspace, and --exclude to package command,
and -p to publish command, as well as tests for both.

closes #7345

2 years agoRefine name
hi-rustin [Sat, 24 Jul 2021 16:35:09 +0000 (00:35 +0800)]
Refine name

Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2 years agoBetter msg for wrong position
hi-rustin [Sat, 24 Jul 2021 02:44:44 +0000 (10:44 +0800)]
Better msg for wrong position

Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2 years agoAuto merge of #9681 - hi-rustin:rustin-patch-reject, r=ehuss
bors [Fri, 23 Jul 2021 18:53:25 +0000 (18:53 +0000)]
Auto merge of #9681 - hi-rustin:rustin-patch-reject, r=ehuss

Warning when using features in replace

close https://github.com/rust-lang/cargo/issues/3034
close https://github.com/rust-lang/cargo/issues/2582

r? `@ehuss`

2 years agoAuto merge of #9721 - In-line:refactor-if-let-chains, r=ehuss
bors [Fri, 23 Jul 2021 18:29:49 +0000 (18:29 +0000)]
Auto merge of #9721 - In-line:refactor-if-let-chains, r=ehuss

Refactor if let chains to matches! macro

2 years agoRefactor if let chains to matches! macro
Alik Aslanyan [Fri, 23 Jul 2021 14:53:09 +0000 (18:53 +0400)]
Refactor if let chains to matches! macro

2 years agoAuto merge of #9720 - In-line:weather-is-not-nice-today, r=ehuss
bors [Fri, 23 Jul 2021 13:37:24 +0000 (13:37 +0000)]
Auto merge of #9720 - In-line:weather-is-not-nice-today, r=ehuss

Weather is not nice today..

2 years agoWeather is not nice today..
Alik Aslanyan [Fri, 23 Jul 2021 13:15:14 +0000 (17:15 +0400)]
Weather is not nice today..

2 years agoWarning when using features in replace
hi-rustin [Fri, 23 Jul 2021 07:00:50 +0000 (15:00 +0800)]
Warning when using features in replace

Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2 years agoStabilize the extra link arg option
Daniel Frampton [Fri, 4 Jun 2021 23:15:31 +0000 (16:15 -0700)]
Stabilize the extra link arg option

2 years agoAuto merge of #9653 - bjorn3:update_should_use_metadata, r=alexcrichton
bors [Thu, 22 Jul 2021 14:16:04 +0000 (14:16 +0000)]
Auto merge of #9653 - bjorn3:update_should_use_metadata, r=alexcrichton

Update should_use_metadata function

* Correct the reason for not renaming dylibs
* Add todo for -install-name/-soname usage
* Limit wasm32 executable metadata omission to emscripten. Wasm file don't contain any filename themself.
* Don't omit metadata for executables on macOS. backtrace-rs is now able to load debuginfo for renamed .dSYM files: https://github.com/rust-lang/backtrace-rs/blob/ed3689c2f2b9a31546d75fae389a32a572957dbd/src/symbolize/gimli/macho.rs#L51-L65
* Mention another reason to include the metadata hash for libstd.

2 years agoAuto merge of #9714 - PTNobel:fix-force-warn, r=ehuss
bors [Thu, 22 Jul 2021 13:01:52 +0000 (13:01 +0000)]
Auto merge of #9714 - PTNobel:fix-force-warn, r=ehuss

Changes rustc argument from `--force-warns` to `--force-warn`

The rustc argument was renamed in rust-lang/rust#87346 breaking `cargo fix` on the nightly toolchain.

I encountered this while attempting to test Edition 2021 migrations.

I ran `RUSTC=/path/to/nightly/rustc cargo test` and encountered a few failing tests, but none of them seemed at all related to the 1 line I changed, so if they crop up in CI as well, would love some help on identifying what's causing that.

Closes rust-lang/rust#87360

2 years agoChanges rustc argument from `--force-warns` to `--force-warn`
Parth Nobel [Thu, 22 Jul 2021 06:44:24 +0000 (23:44 -0700)]
Changes rustc argument from `--force-warns` to `--force-warn`

The rustc argument was renamed in rust-lang/rust#87346.

2 years agoAuto merge of #9632 - weihanglo:issue-6691, r=ehuss
bors [Wed, 21 Jul 2021 17:14:20 +0000 (17:14 +0000)]
Auto merge of #9632 - weihanglo:issue-6691, r=ehuss

Display registry name instead of registry URL when possible

Fixes #6691

This PR can be divided into several parts:

c5be3de: Try to display registry names instead of URLs for `impl Dipslay for SourceId`. This benefits almost all kinds of messages using`SourceId` directly or indrectly.
9394d48: This fixes `Updating <name> index` part of `[source]` replacement, which previously didn't preserve the registry name information.
4c2f9b5: This makes its best effort to show registry names for deps from `Cargo.lock`. Since current lockfile format does not serialize any registry name. We here try the best effort to restore registry name from either `[registries]` table or `[source]` replacement table. This is done by manually implementing `Hash` and `PartialEq` for `SourceIdInner`, of which two traits previously are simply derived.
    To make `SourceIdInner` generate the same hash no matter it contains `name` field or not, here we remove `name` field from hashing and only concern about `kind`, `precise` and `canonical_url`.

Feel free to ask me for adding more tests, though I am not sure what tests should be added ðŸ˜…

2 years agoUpdate tests to use registry names
Weihang Lo [Sun, 27 Jun 2021 19:18:36 +0000 (03:18 +0800)]
Update tests to use registry names

2 years agoUse `crates-io` instead of `crates.io` as registry name
Weihang Lo [Sun, 27 Jun 2021 18:33:47 +0000 (02:33 +0800)]
Use `crates-io` instead of `crates.io` as registry name

2 years agoShow registry name for SourceId from lockfile
Weihang Lo [Sun, 27 Jun 2021 16:28:39 +0000 (00:28 +0800)]
Show registry name for SourceId from lockfile

Since current lockfile does not serialize any registry names. We here
try best effort to restore registry name from either `[registries]`
table or `[source]` replacement table. This is done by manually
implementing `Hash` and `PartialEq` for `SourceIdInner`, of which two
traits previously are simply `derive`d.

To make `SourceIdInner` generate the same hash whether contains `name`
field or not, here we remove `name` field from hashing and only concern
about `kind`, `precise` and `canonical_url`.

2 years agoShow registry name when using source replacment
Weihang Lo [Sun, 27 Jun 2021 06:46:56 +0000 (14:46 +0800)]
Show registry name when using source replacment

2 years agoShow registry name in messages if possible
Weihang Lo [Sun, 27 Jun 2021 06:12:47 +0000 (14:12 +0800)]
Show registry name in messages if possible

This fixes most messages to display registry names instead of URLs.

2 years agoReuse crate-io constant
Weihang Lo [Sat, 26 Jun 2021 13:35:07 +0000 (21:35 +0800)]
Reuse crate-io constant

2 years agoAuto merge of #9685 - ehuss:named-profile-updates, r=alexcrichton
bors [Tue, 20 Jul 2021 21:55:45 +0000 (21:55 +0000)]
Auto merge of #9685 - ehuss:named-profile-updates, r=alexcrichton

Named profile updates

A few updates for named profiles to push them closer to stabilization:

- Disable the `dir-name` profile setting. `dir-name` primarily exists for translating the built-in profiles or sharing artifacts between profiles. In order to simplify the UI, we would like to not expose it to the user for the initial stabilization. The code to support it is kept in case we want to add it in the future.
- Reserve some profile names. Just to give a little flexibility in the future in case we want to use these, or that they could cause confusion. Also updated the error text a little.
- Add support for custom profiles to legacy commands. Their old behavior is still retained for backwards compatibility. That is:
    * `cargo check`
        * `--profile=test`: This forces the test mode. For example, `cargo check --lib --profile=test` will check the library as a unit test (with `--test`).
    * `cargo fix`
        * `--profile=test`: Forces test mode, same as above.
    * `cargo rustc`
        * `--profile=test`: Forces test mode, same as above.
        * `--profile=bench`: Forces bench mode.
        * `--profile=check`: Forces check mode.
    - These commands also allow mixing the above options with `--release`, which is normally not allowed.
- Fix `cargo bench` to support the `--profile` option. I think it was just forgotten.

2 years agoAuto merge of #9601 - jonhoo:fix-9600, r=ehuss
bors [Tue, 20 Jul 2021 21:27:35 +0000 (21:27 +0000)]
Auto merge of #9601 - jonhoo:fix-9600, r=ehuss

Inform build scripts of rustc compiler context

Fixes #9600.

2 years agoAuto merge of #9703 - djmitche:versionprefs, r=alexcrichton
bors [Mon, 19 Jul 2021 14:33:56 +0000 (14:33 +0000)]
Auto merge of #9703 - djmitche:versionprefs, r=alexcrichton

Factor version preferences into a struct

This concentrates all of the "prefer this version" logic previously
handled with `try_to_use` and `prefer_patch_deps` parameters into a
struct that hides both the reason a package version might be preferred
and the form that preference took (Dependency or PackageId).  Besides
simplifying `RegistryQuerier::query` slightly, this invites further
refinements to version preferences to support new cargo features.

2 years agoAuto merge of #9704 - LightSage:update-link, r=alexcrichton
bors [Mon, 19 Jul 2021 14:08:15 +0000 (14:08 +0000)]
Auto merge of #9704 - LightSage:update-link, r=alexcrichton

docs: Fix sentence & update link for GitLab CI docs

This just adds a missing word in the sentence and updates the link for gitlab's ci docs.

2 years agoFix sentence & update link for GitLab CI docs
LightSage [Mon, 19 Jul 2021 02:44:26 +0000 (02:44 +0000)]
Fix sentence & update link for GitLab CI docs

2 years agoFactor version preferences into a struct
Dustin J. Mitchell [Sun, 18 Jul 2021 19:31:05 +0000 (19:31 +0000)]
Factor version preferences into a struct

This concentrates all of the "prefer this version" logic previously
handled with `try_to_use` and `prefer_patch_deps` parameters into a
struct that hides both the reason a package version might be preferred
and the form that preference took (Dependency or PackageId).  Besides
simplifying `RegistryQuerier::query` slightly, this invites further
refinements to version preferences to support new cargo features.

2 years agoAuto merge of #9675 - ehuss:diagnostic-dedupe, r=alexcrichton
bors [Fri, 16 Jul 2021 15:22:58 +0000 (15:22 +0000)]
Auto merge of #9675 - ehuss:diagnostic-dedupe, r=alexcrichton

Deduplicate compiler diagnostics.

This adds some logic to deduplicate diagnostics emitted across rustc invocations. There are some situations where different targets can emit the same message, and that has caused confusion particularly for new users. A prominent example is running `cargo test` which will build the library twice concurrently (once as a normal library, and once as a test).

As part of this, the "N warnings emitted" message sent by rustc is intercepted, and instead cargo generates its own summary. This is to prevent potentially confusing situations where that message is either deduplicated, or wrong. It also provides a little more context to explain exactly *what* issued the warnings.  Example:

```warning: `foo` (lib) generated 1 warning```

This only impacts human-readable output, it does not change JSON behavior.

Closes #9104

2 years agoRename show_warnings.
Eric Huss [Fri, 16 Jul 2021 15:16:03 +0000 (08:16 -0700)]
Rename show_warnings.

2 years agoAuto merge of #9698 - ehuss:enable-future-incompat, r=alexcrichton
bors [Fri, 16 Jul 2021 14:06:56 +0000 (14:06 +0000)]
Auto merge of #9698 - ehuss:enable-future-incompat, r=alexcrichton

Re-enable future-incompatible tests.

This re-enables the future-incompatible tests that were disabled in #9638.

rustc now has a `-Zfuture-incompat-test` flag we can use to test the future-incompatible reporting system. It causes rustc to treat every lint as future-incompatible, so we can just pick some arbitrary lint that should be stable over time.

2 years agoRe-enable future-incompatible tests.
Eric Huss [Fri, 16 Jul 2021 12:45:29 +0000 (05:45 -0700)]
Re-enable future-incompatible tests.

2 years agoRemove RUSTC_VERSION envvar
Jon Gjengset [Fri, 16 Jul 2021 00:52:33 +0000 (17:52 -0700)]
Remove RUSTC_VERSION envvar

2 years agoAuto merge of #9695 - alexcrichton:flaky, r=ehuss
bors [Fri, 16 Jul 2021 00:50:39 +0000 (00:50 +0000)]
Auto merge of #9695 - alexcrichton:flaky, r=ehuss

Flag another curl error as possibly spurious

cc rust-lang/crates.io#3782

2 years agoAdd test demonstrating deduplication of errors.
Eric Huss [Fri, 16 Jul 2021 00:37:21 +0000 (17:37 -0700)]
Add test demonstrating deduplication of errors.

2 years agoAuto merge of #9680 - inquisitivecrystal:doc-alias, r=ehuss
bors [Fri, 16 Jul 2021 00:23:22 +0000 (00:23 +0000)]
Auto merge of #9680 - inquisitivecrystal:doc-alias, r=ehuss

Add `d` as an alias for `doc`

I expected that this alias would already exist. `doc` feels to me like the other commands that currently have aliases. `build`, `check`, `run`, and `test` are all modes of using the existing repository, and are all things one might run at least somewhat frequently during development. There is no other built in cargo subcommand that starts with `d`, so this also has the virtue of being pretty unambiguous.

2 years agoDocument `d` alias
inquisitivecrystal [Thu, 15 Jul 2021 22:31:39 +0000 (15:31 -0700)]
Document `d` alias

2 years agoAuto merge of #9694 - ehuss:edition-fix-latest, r=alexcrichton
bors [Thu, 15 Jul 2021 17:54:25 +0000 (17:54 +0000)]
Auto merge of #9694 - ehuss:edition-fix-latest, r=alexcrichton

`cargo fix --edition`: extend warning when on latest edition

This extends the warning issued when `cargo fix --edition` is run when the user is already on the latest edition.  Before #9184, there were instructions on what to do, but those probably should not have been completely removed.  It seems likely that some users may get the steps out of order, so this hopefully tries to explain them clearly.

2 years agoAuto merge of #9688 - rust-lang:dependabot/cargo/env_logger-0.9.0, r=alexcrichton
bors [Thu, 15 Jul 2021 15:18:24 +0000 (15:18 +0000)]
Auto merge of #9688 - rust-lang:dependabot/cargo/env_logger-0.9.0, r=alexcrichton

Update env_logger requirement from 0.8.1 to 0.9.0

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>v0.9.0</h2>
<p>Breaking Changes:</p>
<ul>
<li>Default message format now prints the target instead of the module</li>
</ul>
<p>Improvements:</p>
<ul>
<li>Added a method to print the module instead of the target</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/04856ac38baf422baebb40729cf51127a75b82ed"><code>04856ac</code></a> bump version to 0.9.0</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/e4744ff41a2e249bd94511c4689b4dbaa915841f"><code>e4744ff</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/env-logger-rs/env_logger/issues/209">#209</a> from gtsiam/main</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/c5fa7a2c2d9ad3f5d2da0581ede4ab2e8944e104"><code>c5fa7a2</code></a> refactor: fix clippy warnings</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/34574dfa13e2c81bab007715c2f6faa4b94bb67f"><code>34574df</code></a> Update link to examples</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/18884971d4eb1c268d61a4c37747de692bdd7124"><code>1888497</code></a> Clarified documentation about log filtering</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/365ffafe45f615f65b88d67834aab16b132d9ecc"><code>365ffaf</code></a> Show target instead of module path by default</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/d2998a6ec685051b97f5b5c97427a61593bc6581"><code>d2998a6</code></a> Add option to print log target</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/13cafce572362582f57964eae6cb4a41f52fd04a"><code>13cafce</code></a> Bump version to 0.8.4</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/090081156127dcd896b8b00837549cb4008c43d0"><code>0900811</code></a> Ensure unique directive names when building filters</li>
<li><a href="https://github.com/env-logger-rs/env_logger/commit/1a8379a533f043e623d5eb4a898d171927ad61c1"><code>1a8379a</code></a> Allow writing logs to a custom output target (Target::Pipe)</li>
<li>Additional commits viewable in <a href="https://github.com/env-logger-rs/env_logger/compare/v0.8.1...v0.9.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)

</details>

2 years agoAuto merge of #9674 - iankronquist:patch-1, r=alexcrichton
bors [Thu, 15 Jul 2021 14:53:39 +0000 (14:53 +0000)]
Auto merge of #9674 - iankronquist:patch-1, r=alexcrichton

Document cargo limitation w/ workspaces & configs

This behavior is described in this bug:
https://github.com/rust-lang/cargo/issues/2930

I think we should document limitations of the tool which exist at present if they do not bind our hands in the future.
If this bug is fixed, this note should be removed.

2 years agoFlag another curl error as possibly spurious
Alex Crichton [Thu, 15 Jul 2021 14:31:55 +0000 (07:31 -0700)]
Flag another curl error as possibly spurious

cc rust-lang/crates.io#3782

2 years ago`cargo fix --edition`: extend warning when on latest edition
Eric Huss [Thu, 15 Jul 2021 14:12:34 +0000 (07:12 -0700)]
`cargo fix --edition`: extend warning when on latest edition

2 years agoAuto merge of #9689 - hi-rustin:rustin-patch-error, r=alexcrichton
bors [Thu, 15 Jul 2021 14:23:06 +0000 (14:23 +0000)]
Auto merge of #9689 - hi-rustin:rustin-patch-error, r=alexcrichton

Change some warnings to errors

These warnings are over three years old, so maybe we can adjust it to an error.

2 years agoMake ignored key in config be an error
hi-rustin [Thu, 15 Jul 2021 06:35:10 +0000 (14:35 +0800)]
Make ignored key in config be an error

Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2 years agoMake the dependency specification ambiguous be an error
hi-rustin [Thu, 15 Jul 2021 06:29:11 +0000 (14:29 +0800)]
Make the dependency specification ambiguous be an error

Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2 years agoUpdate env_logger requirement from 0.8.1 to 0.9.0
dependabot[bot] [Thu, 15 Jul 2021 01:07:00 +0000 (01:07 +0000)]
Update env_logger requirement from 0.8.1 to 0.9.0

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/main/CHANGELOG.md)
- [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.8.1...v0.9.0)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoRemove extra whitespace
Ian Kronquist [Wed, 14 Jul 2021 23:59:50 +0000 (16:59 -0700)]
Remove extra whitespace

2 years agoAuto merge of #9663 - nebkor:master, r=alexcrichton
bors [Wed, 14 Jul 2021 20:54:28 +0000 (20:54 +0000)]
Auto merge of #9663 - nebkor:master, r=alexcrichton

Add format option to `cargo tree` to print the lib_name

Adds a way to have `cargo tree` display the name of the library inside a package dependency, which can differ from the name of the package. Updates the `tree::format` test to test for its proper behavior.

Closes #9659

2 years agoAuto merge of #9639 - djmitche:issue9535, r=Eh2406
bors [Wed, 14 Jul 2021 19:14:22 +0000 (19:14 +0000)]
Auto merge of #9639 - djmitche:issue9535, r=Eh2406

Prefer patched versions of dependencies

When selecting among several versions of a paackage, prefer versions
from `[patch]` sections over other versions, similar to how locked
versions are preferred.

Patches come in the form of a Dependency and not a PackageId, so this
preference is expressed with `prefer_patch_deps`, distinct from
`try_to_use`.

Fixes #9535

2 years agoRUSTC_VERSION != CARGO_VERSION
Jon Gjengset [Wed, 14 Jul 2021 17:25:22 +0000 (10:25 -0700)]
RUSTC_VERSION != CARGO_VERSION

2 years agoAuto merge of #9686 - hi-rustin:rustin-patch-error, r=alexcrichton
bors [Wed, 14 Jul 2021 16:09:57 +0000 (16:09 +0000)]
Auto merge of #9686 - hi-rustin:rustin-patch-error, r=alexcrichton

When a dependency does not have a version, git or path, fails directly

Make this warning be an error.

ref: https://github.com/rust-lang/cargo/issues/9682#issuecomment-879108193

2 years agoAuto merge of #9665 - gilescope:giles-better-message, r=alexcrichton
bors [Wed, 14 Jul 2021 15:39:04 +0000 (15:39 +0000)]
Auto merge of #9665 - gilescope:giles-better-message, r=alexcrichton

Spot the crate typo easily

ego tweak to make it easy to spot typos:

Before:
```
error: no matching package named `sc-consensus-primitivies` found
location searched: /Users/bit/p/substrate1/client/primitives/consensus/common
perhaps you meant: sc-consensus-primitives
required by package `sc-network v0.9.0 (/Users/bit/p/substrate1/client/network)`
```
After:
```
error: no matching package named `sc-consensus-primitivies` found
perhaps you meant:                sc-consensus-primitives
location searched: /Users/bit/p/substrate1/client/primitives/consensus/common
required by package `sc-network v0.9.0 (/Users/bit/p/substrate1/client/network)`
```

2 years agoOnly put it on a new line if there's candidates to compare against.
gilescope [Sun, 11 Jul 2021 18:06:20 +0000 (19:06 +0100)]
Only put it on a new line if there's candidates to compare against.

2 years agoWhen a dependency does not have a version, git or path, fails directly
hi-rustin [Wed, 14 Jul 2021 06:09:45 +0000 (14:09 +0800)]
When a dependency does not have a version, git or path, fails directly

Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2 years agoSupport custom profiles in legacy commands.
Eric Huss [Tue, 13 Jul 2021 22:22:09 +0000 (15:22 -0700)]
Support custom profiles in legacy commands.

This makes the following changes:

- Allows `cargo check`, `cargo fix`, and `cargo rustc` to support custom
  named profiles. This retains the legacy behavior of those commands.
- Fixes `cargo bench` so that it supports custom named profiles.

2 years agoReserve some names for named profiles.
Eric Huss [Tue, 13 Jul 2021 18:59:15 +0000 (11:59 -0700)]
Reserve some names for named profiles.

Just to give a little flexibility in the future in case we want to use
these, or that they could cause confusion. Also updated the error text a
little.

2 years agoDisable the dir-name profile setting.
Eric Huss [Tue, 13 Jul 2021 15:21:27 +0000 (08:21 -0700)]
Disable the dir-name profile setting.

dir-name primarily exists for translating the built-in profiles. In
order to simplify the UI, we would like to not expose it to the user for
the initial stabilization. The code to support it is kept in case we
want to add it in the future.

2 years agoAuto merge of #9616 - danieleades:refactor/unnecessary-collect, r=alexcrichton
bors [Tue, 13 Jul 2021 14:11:27 +0000 (14:11 +0000)]
Auto merge of #9616 - danieleades:refactor/unnecessary-collect, r=alexcrichton

remove unnecessary 'collect'

would appreciate a review of this one, as i'm not sure the terminology i've used here is ideal...

but you get the drift. no need to allocate a vector here.

2 years agoUpdate config.md
Ian Kronquist [Tue, 13 Jul 2021 02:09:51 +0000 (19:09 -0700)]
Update config.md

2 years agofix inverted logic
Daniel Eades [Mon, 12 Jul 2021 20:48:33 +0000 (21:48 +0100)]
fix inverted logic