]> git.proxmox.com Git - cargo.git/log
cargo.git
19 months agoupdate unsuspicious files
Fabian Grünbichler [Sat, 15 Oct 2022 12:09:38 +0000 (14:09 +0200)]
update unsuspicious files

Signed-off-by: Fabian Grünbichler <debian@fabian.gruenbichler.email>
19 months agoupdate debcargo-conf.patch / make_orig_multi-pre
Fabian Grünbichler [Sat, 15 Oct 2022 12:09:34 +0000 (14:09 +0200)]
update debcargo-conf.patch / make_orig_multi-pre

libgit2-sys is not downloadable for the current cargo version, so pin it
to one that is (and match git2 accordingly).

schannel switched to windows-sys which requires a closer analysis before
being embedded here.

Signed-off-by: Fabian Grünbichler <debian@fabian.gruenbichler.email>
19 months agod/make_orig_multi: don't use legacy GZIP env var
Fabian Grünbichler [Sat, 15 Oct 2022 12:09:29 +0000 (14:09 +0200)]
d/make_orig_multi: don't use legacy GZIP env var

pass gzip commandline directly to tar instead.

Signed-off-by: Fabian Grünbichler <debian@fabian.gruenbichler.email>
19 months agoguesst-crate-copyright: handle missing authors
Fabian Grünbichler [Sat, 15 Oct 2022 12:09:25 +0000 (14:09 +0200)]
guesst-crate-copyright: handle missing authors

Signed-off-by: Fabian Grünbichler <debian@fabian.gruenbichler.email>
19 months agoaudit-vendor-source: support filesystems with small dirs
Fabian Grünbichler [Sat, 15 Oct 2022 12:09:18 +0000 (14:09 +0200)]
audit-vendor-source: support filesystems with small dirs

like ZFS, where the tests also match (some) directories with contents,
which fail to delete and are quite noisy.

Signed-off-by: Fabian Grünbichler <debian@fabian.gruenbichler.email>
23 months agodocument that cargo lock is mandatory for the repack
Sylvestre Ledru [Sun, 19 Jun 2022 09:01:38 +0000 (11:01 +0200)]
document that cargo lock is mandatory for the repack

2 years agoUpdate changelog for upload to unstable.
Peter Michael Green [Mon, 2 May 2022 20:59:45 +0000 (20:59 +0000)]
Update changelog for upload to unstable.

2 years agoRemove build-depends on cmake.
Peter Michael Green [Sun, 10 Apr 2022 00:10:30 +0000 (00:10 +0000)]
Remove build-depends on cmake.

2 years agoRemove patches for libgit2 1.1.x and adjust dependency to 1.3.x.
Peter Michael Green [Sat, 9 Apr 2022 23:30:32 +0000 (23:30 +0000)]
Remove patches for libgit2 1.1.x and adjust dependency to 1.3.x.

2 years agoLimit autopkgtest to architectures where it does not run out of disk space.
Peter Michael Green [Sat, 9 Apr 2022 23:30:07 +0000 (23:30 +0000)]
Limit autopkgtest to architectures where it does not run out of disk space.

2 years agoMake debian cargo wrapper stop looking for feature names once it finds one.
Peter Michael Green [Tue, 15 Mar 2022 12:18:23 +0000 (12:18 +0000)]
Make debian cargo wrapper stop looking for feature names once it finds one.

2 years agoRelease 0.57.0-5 to Debian unstable.
Ximin Luo [Wed, 9 Mar 2022 13:52:33 +0000 (13:52 +0000)]
Release 0.57.0-5 to Debian unstable.

2 years agoPartial cherry-pick of upstream patch for eacces handling in tests
Simon Chopin [Tue, 8 Mar 2022 13:28:43 +0000 (14:28 +0100)]
Partial cherry-pick of upstream patch for eacces handling in tests

The test fails because cargo does NOT raise an error when hitting
EACCES. I was unable to reproduce the cargo error, even using the one
shipping with rustup. As there's been some changes in directory walking
in recent Rust version, I'm assuming this is a direct consequence of
that, and think it's safe to remove the test entirely, as is the case in
upstream main branch.

2 years agoCherry-picked upstream patch to fix 1.57 unicode handling change
Simon Chopin [Tue, 8 Mar 2022 11:48:53 +0000 (12:48 +0100)]
Cherry-picked upstream patch to fix 1.57 unicode handling change

2 years agoDisable cross-build tests in autopkgtests
Simon Chopin [Tue, 8 Mar 2022 11:42:46 +0000 (12:42 +0100)]
Disable cross-build tests in autopkgtests

2 years agoRelease 0.57.0-4 to Debian unstable.
Ximin Luo [Mon, 7 Mar 2022 20:35:07 +0000 (20:35 +0000)]
Release 0.57.0-4 to Debian unstable.

2 years agoFix build for x32
Ximin Luo [Mon, 7 Mar 2022 20:34:43 +0000 (20:34 +0000)]
Fix build for x32

2 years agoMerge branch 'conflicting-quiet-and-verbose' into 'debian/sid'
Ximin Luo [Mon, 14 Feb 2022 11:12:32 +0000 (11:12 +0000)]
Merge branch 'conflicting-quiet-and-verbose' into 'debian/sid'

Conflicting --quiet and --verbose

See merge request rust-team/cargo!11

2 years agosince the the --verbose flag is only added when subcmd is not None, add that to the...
Alexander Kjäll [Sat, 12 Feb 2022 19:14:32 +0000 (20:14 +0100)]
since the the --verbose flag is only added when subcmd is not None, add that to the if case

2 years agoIf the arguments contains both --quiet and --verbose, then remove --quiet as both...
Alexander Kjäll [Sat, 12 Feb 2022 08:28:58 +0000 (09:28 +0100)]
If the arguments contains both --quiet and --verbose, then remove --quiet as both are not allowed to be present on the cargo command line

2 years agoMerge branch 'self-build-autopkgtest' into 'debian/sid'
Ximin Luo [Fri, 28 Jan 2022 15:52:23 +0000 (15:52 +0000)]
Merge branch 'self-build-autopkgtest' into 'debian/sid'

Add an autopkgtest for cargo to build itself

See merge request rust-team/cargo!10

2 years agoAdd an autopkgtest for cargo to build itself
Simon Chopin [Tue, 25 Jan 2022 11:44:05 +0000 (12:44 +0100)]
Add an autopkgtest for cargo to build itself

Since cargo is a fairly complex project with multiple crates, tests,
etc, this exercises quite a few features.

V2: use @builddeps@ to specify the test dependencies

Signed-off-by: Simon Chopin <simon.chopin@canonical.com>
2 years agoRelease 0.57.0-3 to Debian unstable.
Ximin Luo [Sun, 24 Oct 2021 13:11:03 +0000 (14:11 +0100)]
Release 0.57.0-3 to Debian unstable.

2 years agoactually disable test, fix armhf build
Ximin Luo [Sun, 24 Oct 2021 13:10:50 +0000 (14:10 +0100)]
actually disable test, fix armhf build

2 years agorevert accidental committing of patch to upstream source
Ximin Luo [Sun, 24 Oct 2021 13:07:31 +0000 (14:07 +0100)]
revert accidental committing of patch to upstream source

2 years agoRelease 0.57.0-2 to Debian unstable.
Ximin Luo [Sun, 24 Oct 2021 12:13:12 +0000 (13:13 +0100)]
Release 0.57.0-2 to Debian unstable.

2 years agomaintain patches
Ximin Luo [Sun, 24 Oct 2021 12:00:27 +0000 (13:00 +0100)]
maintain patches

2 years agoFix failing tests
Ximin Luo [Sun, 24 Oct 2021 11:57:37 +0000 (12:57 +0100)]
Fix failing tests

2 years agoRelease 0.57.0-1 to Debian unstable.
Ximin Luo [Sun, 24 Oct 2021 00:59:10 +0000 (01:59 +0100)]
Release 0.57.0-1 to Debian unstable.

2 years agoupdate d/copyright and lintian overrides
Ximin Luo [Sun, 24 Oct 2021 00:58:52 +0000 (01:58 +0100)]
update d/copyright and lintian overrides

2 years agodon't allow RUSTFLAGS to be overridden
Ximin Luo [Sun, 24 Oct 2021 00:14:37 +0000 (01:14 +0100)]
don't allow RUSTFLAGS to be overridden

2 years agoupdate b-d for libgit2
Ximin Luo [Sat, 23 Oct 2021 23:36:07 +0000 (00:36 +0100)]
update b-d for libgit2

2 years agopatches to work with libgit2 1.1.0
Ximin Luo [Sat, 23 Oct 2021 23:22:35 +0000 (00:22 +0100)]
patches to work with libgit2 1.1.0

2 years agobump d/changelog, refresh patches
Ximin Luo [Sat, 23 Oct 2021 23:19:01 +0000 (00:19 +0100)]
bump d/changelog, refresh patches

2 years agoUpdate upstream source from tag 'upstream/0.57.0'
Ximin Luo [Sat, 23 Oct 2021 23:15:54 +0000 (00:15 +0100)]
Update upstream source from tag 'upstream/0.57.0'

Update to upstream version '0.57.0'
with Debian dir f1b0f16da6cd9b6e21925d5427590c159e4599c1

2 years agoupdate docs and drop old scripts
Ximin Luo [Sat, 23 Oct 2021 23:15:33 +0000 (00:15 +0100)]
update docs and drop old scripts

2 years agoNew upstream version 0.57.0
Ximin Luo [Sat, 23 Oct 2021 22:03:20 +0000 (23:03 +0100)]
New upstream version 0.57.0

2 years agoupdate unsuspicious whitelist for 0.57.0
Ximin Luo [Sat, 23 Oct 2021 22:00:40 +0000 (23:00 +0100)]
update unsuspicious whitelist for 0.57.0

2 years agoupdate debcargo-conf.patch for latest patches
Ximin Luo [Sat, 23 Oct 2021 21:50:21 +0000 (22:50 +0100)]
update debcargo-conf.patch for latest patches

2 years agosupport the ability to use older crates
Ximin Luo [Sat, 23 Oct 2021 21:26:02 +0000 (22:26 +0100)]
support the ability to use older crates

2 years agoupdate watch file
Ximin Luo [Sat, 23 Oct 2021 19:59:21 +0000 (20:59 +0100)]
update watch file

2 years agoAuto merge of #9958 - ehuss:1.56-backports, r=alexcrichton
bors [Mon, 4 Oct 2021 17:24:20 +0000 (17:24 +0000)]
Auto merge of #9958 - ehuss:1.56-backports, r=alexcrichton

[beta] 1.56 backports

Beta backports of:

- #9937 — Bump curl-sys to 0.4.48 with curl 7.79.1 which will hopefully fix the http2 errors
- #9927 — Change diesel compatibility messages

2 years agoAuto merge of #9927 - weiznich:diesel_2021_edition, r=ehuss
bors [Tue, 21 Sep 2021 15:24:03 +0000 (15:24 +0000)]
Auto merge of #9927 - weiznich:diesel_2021_edition, r=ehuss

Change diesel compatibility messages

Diesel 1.4.8 fixes the critical behaviour. This commit changes the
corresponding messages for `cargo fix` and normal builds to prompt the
user to just update the diesel version to fix the corresponding
compilation errors.

As discussed in https://github.com/rust-lang/rust/issues/88903#issuecomment-923061946

Fixes https://github.com/rust-lang/rust/issues/88903
Fixes #9450

2 years agoAuto merge of #9937 - alexcrichton:bump-curl, r=ehuss
bors [Wed, 22 Sep 2021 15:35:06 +0000 (15:35 +0000)]
Auto merge of #9937 - alexcrichton:bump-curl, r=ehuss

Bump curl-sys dependency

Brings in curl 7.79.1

2 years agoAuto merge of #9912 - ehuss:beta-revert-9686, r=alexcrichton
bors [Tue, 14 Sep 2021 20:55:22 +0000 (20:55 +0000)]
Auto merge of #9912 - ehuss:beta-revert-9686, r=alexcrichton

[beta] Revert "When a dependency does not have a version, git or path…

…, fails directly"

This reverts commit 98d5d10268684d337d70caa2b0b95cc4c13b34f9, reversing
changes made to 3658906b0700ec70c727d95f5cdecc7c61a95a82.

Reverting #9686

Also including #9906 for CI.

2 years agoAuto merge of #9906 - camelid:fix-warnings, r=alexcrichton
bors [Mon, 13 Sep 2021 17:31:11 +0000 (17:31 +0000)]
Auto merge of #9906 - camelid:fix-warnings, r=alexcrichton

Fix warnings from better precision of `dead_code` lint

The lint now ignores derived `Clone` and `Debug` implementations, as of
PR rust-lang/rust#85200, which landed a couple of days ago.

I sprinkled `#[allow(dead_code)]` in a few places; the fields are not
expected to be read since they are just part of a very specific test.

2 years ago[beta] Revert "When a dependency does not have a version, git or path, fails directly"
Eric Huss [Tue, 14 Sep 2021 20:05:44 +0000 (13:05 -0700)]
[beta] Revert "When a dependency does not have a version, git or path, fails directly"

This reverts commit 98d5d10268684d337d70caa2b0b95cc4c13b34f9, reversing
changes made to 3658906b0700ec70c727d95f5cdecc7c61a95a82.

Reverting #9686

2 years agoAuto merge of #9901 - ehuss:beta-rustc-profile-dev, r=Eh2406
bors [Fri, 10 Sep 2021 22:05:41 +0000 (22:05 +0000)]
Auto merge of #9901 - ehuss:beta-rustc-profile-dev, r=Eh2406

[beta] Fix rustc --profile=dev unstable check.

Beta backport of #9898.

2 years agoFix rustc --profile=dev unstable check.
Eric Huss [Fri, 10 Sep 2021 16:40:37 +0000 (09:40 -0700)]
Fix rustc --profile=dev unstable check.

2 years agoAuto merge of #9891 - ehuss:beta-remove-z-force-warn, r=alexcrichton
bors [Thu, 9 Sep 2021 14:08:56 +0000 (14:08 +0000)]
Auto merge of #9891 - ehuss:beta-remove-z-force-warn, r=alexcrichton

[beta] Fix `cargo fix --edition` on stable.

Beta backport of #9890.

2 years ago[beta] Fix `cargo fix --edition` on stable.
Eric Huss [Thu, 9 Sep 2021 04:33:15 +0000 (21:33 -0700)]
[beta] Fix `cargo fix --edition` on stable.

2 years agoAuto merge of #9850 - hi-rustin:rustin-patch-no-track, r=alexcrichton
bors [Wed, 1 Sep 2021 14:26:00 +0000 (14:26 +0000)]
Auto merge of #9850 - hi-rustin:rustin-patch-no-track, r=alexcrichton

print the full destination path when no track duplicates

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

2 years agoAuto merge of #9800 - ehuss:stabilize-2021, r=alexcrichton
bors [Wed, 1 Sep 2021 13:53:35 +0000 (13:53 +0000)]
Auto merge of #9800 - ehuss:stabilize-2021, r=alexcrichton

Stabilize 2021 edition

This stabilizes the 2021 edition.

Closes #9781

2 years agoTemporarily move test lockfile_constant_during_new to nightly.
Eric Huss [Wed, 1 Sep 2021 05:44:34 +0000 (22:44 -0700)]
Temporarily move test lockfile_constant_during_new to nightly.

2 years agoMake --force-warn support auto-detect.
Eric Huss [Tue, 17 Aug 2021 18:09:08 +0000 (11:09 -0700)]
Make --force-warn support auto-detect.

2 years agoStabilize 2021 edition
Eric Huss [Tue, 17 Aug 2021 15:43:11 +0000 (08:43 -0700)]
Stabilize 2021 edition

2 years agoAuto merge of #9839 - jonhoo:prefer-cargo-toml-patch, r=ehuss
bors [Wed, 1 Sep 2021 04:55:13 +0000 (04:55 +0000)]
Auto merge of #9839 - jonhoo:prefer-cargo-toml-patch, r=ehuss

Stabilize patch-in-config (and prefer config over manifest)

Tracking issue: https://github.com/rust-lang/cargo/issues/9269

---

This stabilizes the `patch-in-config` feature ([unstable entry](https://doc.rust-lang.org/cargo/reference/unstable.html#patch-in-config)) following the discussion in https://github.com/rust-lang/cargo/issues/9269#issuecomment-904913263.

As requested, this PR _also_ changes the precedence behavior such that a `[patch]` for the same dependency in both `.cargo/config.toml` and `Cargo.toml` prefers the patch from the configuration file over the one from the manifest, which matches the behavior of other overlapping configuration options. The corresponding test has also been updated to reflect this change in behavior.

2 years agoAuto merge of #9808 - QiangHeisenberg:examples, r=ehuss
bors [Wed, 1 Sep 2021 04:28:18 +0000 (04:28 +0000)]
Auto merge of #9808 - QiangHeisenberg:examples, r=ehuss

Adding the cargo doc --examples subcommand

Adding the cargo doc --examples subcommand

#4508

2 years agoAuto merge of #9796 - hi-rustin:rustin-patch-clippy, r=ehuss
bors [Wed, 1 Sep 2021 04:04:11 +0000 (04:04 +0000)]
Auto merge of #9796 - hi-rustin:rustin-patch-clippy, r=ehuss

Make library created with `cargo new` clippy happy

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

2 years agoAuto merge of #9862 - dtolnay-contrib:repos, r=ehuss
bors [Wed, 1 Sep 2021 03:35:21 +0000 (03:35 +0000)]
Auto merge of #9862 - dtolnay-contrib:repos, r=ehuss

Swap out some outdated repo urls in documentation

I noticed that `rand` and `rustfmt` are no longer located in rust-lang-nursery.

Rather than updating `rand` to github.com/rust-random/rand, I've swapped it out for `regex` in this PR. Some considerations:

- Preference for github.com/rust-lang over github.com/rust-random to reduce the perception of unnecessarily endorsing a project that isn't already endorsed by being in Cargo's org.
- Ruled out `libc` because make-your-own-libcpocalypse is not a fun detour for anyone following along and experimenting with git dependencies.
- Ruled out everything with a -rs suffix (`git2-rs`, `flate2-rs`, `backtrace-rs`, `futures-rs`) out of personal distaste.
- Went for something that has comparable name recognition to rand, i.e. ruled out `hashbrown`.

We could alternatively use dummy URLs like github.com/user/example everywhere but I feel that maintaining this every several years is not a big deal and is worth it for the character of the documentation.

2 years agoSwap out some outdated repo urls in documentation
David Tolnay [Tue, 31 Aug 2021 20:13:35 +0000 (13:13 -0700)]
Swap out some outdated repo urls in documentation

2 years agoMake windows CI happy
hi-rustin [Tue, 31 Aug 2021 08:54:16 +0000 (16:54 +0800)]
Make windows CI happy

Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2 years agoprint the full destination path when no track duplicates
hi-rustin [Sat, 28 Aug 2021 04:57:41 +0000 (12:57 +0800)]
print the full destination path when no track duplicates

Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2 years agoDocument stabilization version
Jon Gjengset [Mon, 30 Aug 2021 16:27:14 +0000 (09:27 -0700)]
Document stabilization version

2 years agoAuto merge of #9846 - ehuss:fix-only-edition-lints, r=alexcrichton
bors [Mon, 30 Aug 2021 14:17:26 +0000 (14:17 +0000)]
Auto merge of #9846 - ehuss:fix-only-edition-lints, r=alexcrichton

Change `cargo fix --edition` to only fix edition lints.

This changes it so that `cargo fix --edition` will only fix edition lints.  The reason for this is that sometimes non-edition lints get in the way, and make suggestions that can cause failures.  An example is a user that only ever runs `cargo test` or `cargo check --profile=test` locally, and doesn't realize there are problems with running without `cfg(test)` such as unused warnings.

This works by using `--cap-lints=allow` along with `--force-warn` which takes precedence over `cap-lints`.

This only works on nightly since `--force-warn` is still unstable.  I will update this as part of #9800.

Closes #5738

2 years agoAuto merge of #9848 - nipunn1313:desc, r=alexcrichton
bors [Fri, 27 Aug 2021 19:40:28 +0000 (19:40 +0000)]
Auto merge of #9848 - nipunn1313:desc, r=alexcrichton

Show desc of well known subcommands (fmt, clippy) in cargo --list

Fixes #8680

An approach to #8680 that shows these in `cargo --list` without showing them directly in the `cargo --help`.

```
➜  cargo git:(desc) target/debug/cargo --list | grep clippy
    clippy               Checks a package to catch common mistakes and improve your Rust code.
```

Here's what mine looks like visually now:
![image](https://user-images.githubusercontent.com/1300387/131178775-2255ef0d-1993-47dd-bc73-9015394b967c.png)

2 years agoShow desc of well known subcommands (fmt, clippy) in cargo --list
Nipunn Koorapati [Fri, 27 Aug 2021 19:20:55 +0000 (12:20 -0700)]
Show desc of well known subcommands (fmt, clippy) in cargo --list

2 years agoChange `cargo fix --edition` to only fix edition lints.
Eric Huss [Fri, 27 Aug 2021 16:26:11 +0000 (09:26 -0700)]
Change `cargo fix --edition` to only fix edition lints.

2 years agoAuto merge of #9843 - ehuss:fix-test-cargo-env, r=alexcrichton
bors [Thu, 26 Aug 2021 22:54:55 +0000 (22:54 +0000)]
Auto merge of #9843 - ehuss:fix-test-cargo-env, r=alexcrichton

Fix test not to rely on `cargo` in PATH.

This fixes a test that was trying to execute `cargo` from PATH.  This test doesn't work on rust-lang/rust where the rustup installation is removed, and thus there is no `cargo` in PATH.

2 years agoFix test not to rely on `cargo` in PATH.
Eric Huss [Thu, 26 Aug 2021 21:06:32 +0000 (14:06 -0700)]
Fix test not to rely on `cargo` in PATH.

2 years agoAuto merge of #9827 - weihanglo:issue-6199, r=Eh2406
bors [Wed, 25 Aug 2021 17:36:11 +0000 (17:36 +0000)]
Auto merge of #9827 - weihanglo:issue-6199, r=Eh2406

Improve resolver message to include dependency requirements

Resolves #6199.

Thanks for previous efforts: #5452, #6374, #6665, which are great but somehow outdated, so I tweak them and create this PR. This will also be obsolete if we ship pubgrub-rs with cargo in the future 😃 But before that happens, IMO these changes are still helpful.

---

This PR changes the resolver error message from

https://github.com/rust-lang/cargo/blob/216f915c46b8ada2323423d049314ba18247ef95/tests/testsuite/build.rs#L1104-L1106

to

https://github.com/rust-lang/cargo/blob/0afd40b4de17a5c45145a0762beb4ef001720fe1/tests/testsuite/build.rs#L1104-L1106

Also provide different message for different source kinds, such like:

https://github.com/rust-lang/cargo/blob/0afd40b4de17a5c45145a0762beb4ef001720fe1/tests/testsuite/build.rs#L2810-L2812

## TODO?

From https://github.com/rust-lang/cargo/pull/5452#issuecomment-402832200, there shall be at least one task left behind:

> 3. Special case pind by a lock file and not a `"=1.1.2"` in a dependency. Also add a "note: try cargo update" to the end.

In this PR, `validate_links` also faces this issue that a dependency requirement is locked into a precise version `=0.1.0`.

https://github.com/rust-lang/cargo/blob/a5f8bc94f5d38539dd127f735ea4d3a515c230fd/tests/testsuite/build_script.rs#L1002-L1004

I am uncertain about how to resolve this. Besides  the function`validate_links`, is this problem really a thing that may happen? If not, since `validate_links` only handles old validation logic, it may be ok to drop the commit a5f8bc94f5d38539dd127f735ea4d3a515c230fd and leave it as is.

2 years agocancel examples
l00556901 [Wed, 25 Aug 2021 03:45:22 +0000 (11:45 +0800)]
cancel examples

2 years agofix doc
l00556901 [Wed, 25 Aug 2021 03:42:35 +0000 (11:42 +0800)]
fix doc

2 years agodoc man.page
l00556901 [Wed, 25 Aug 2021 02:00:19 +0000 (10:00 +0800)]
doc man.page

2 years agoStabilize patch-in-config
Jon Gjengset [Tue, 24 Aug 2021 19:55:04 +0000 (12:55 -0700)]
Stabilize patch-in-config

2 years agoPrefer config [patch] over manifest [patch]
Jon Gjengset [Tue, 24 Aug 2021 19:54:30 +0000 (12:54 -0700)]
Prefer config [patch] over manifest [patch]

2 years agoAuto merge of #9836 - Firstyear:9804-cargo-docs-improve, r=alexcrichton
bors [Tue, 24 Aug 2021 14:06:23 +0000 (14:06 +0000)]
Auto merge of #9836 - Firstyear:9804-cargo-docs-improve, r=alexcrichton

Add hint for cargo metadata in environment section

Fixes #9804

2 years agofix bug
l00556901 [Tue, 24 Aug 2021 11:06:19 +0000 (19:06 +0800)]
fix bug

2 years agoadd fmt
l00556901 [Tue, 24 Aug 2021 09:49:21 +0000 (17:49 +0800)]
add fmt

2 years agoadd --examples subcommand
l00556901 [Tue, 24 Aug 2021 09:44:58 +0000 (17:44 +0800)]
add --examples subcommand

2 years agoAdd hint for cargo metadata in environment section
William Brown [Tue, 24 Aug 2021 03:15:07 +0000 (13:15 +1000)]
Add hint for cargo metadata in environment section

2 years agoAuto merge of #9834 - ehuss:fix-build-std-proc-macro-only, r=alexcrichton
bors [Mon, 23 Aug 2021 20:04:47 +0000 (20:04 +0000)]
Auto merge of #9834 - ehuss:fix-build-std-proc-macro-only, r=alexcrichton

Fix panic with build-std of a proc-macro.

If you try to run `cargo build -Zbuild-std` in a proc-macro project, cargo would panic in [`check_collisions`](https://github.com/rust-lang/cargo/blob/835d5576e1f0b917a42ba18a9556242204377cd1/src/cargo/core/compiler/context/mod.rs#L427). This is because it iterates over every Unit in the build graph checking the `outputs` for filenames.  However, [`outputs`](https://github.com/rust-lang/cargo/blob/835d5576e1f0b917a42ba18a9556242204377cd1/src/cargo/core/compiler/context/compilation_files.rs#L109-L110) was missing the outputs for standard library units. That is because `outputs` is computed by walking the graph starting from the roots.

The bug here is that `attach_std_deps` was adding the standard library units to graph, even though they aren't reachable from the roots, thus creating orphans.

The solution is to avoid adding the standard library units if they are not needed (as is the case when building just a proc-macro).

Fixes #9828

2 years agoAuto merge of #9821 - steffahn:a_an, r=Eh2406
bors [Mon, 23 Aug 2021 19:39:22 +0000 (19:39 +0000)]
Auto merge of #9821 - steffahn:a_an, r=Eh2406

Fix typos “a”→“an”

See rust-lang/rust#88230

2 years agoAuto merge of #9832 - Tindarid:patch-1, r=ehuss
bors [Mon, 23 Aug 2021 19:11:04 +0000 (19:11 +0000)]
Auto merge of #9832 - Tindarid:patch-1, r=ehuss

Fix typo in git-authentication.md

2 years agoFix panic with build-std of a proc-macro.
Eric Huss [Mon, 23 Aug 2021 19:06:32 +0000 (12:06 -0700)]
Fix panic with build-std of a proc-macro.

2 years agoAuto merge of #9831 - ehuss:fix-debug, r=Eh2406
bors [Mon, 23 Aug 2021 18:45:32 +0000 (18:45 +0000)]
Auto merge of #9831 - ehuss:fix-debug, r=Eh2406

Add some debug logging for `cargo fix`

This adds some debug logging to the `cargo fix` command to give better insight into what it is actually doing. I've needed to try to debug some things recently where this would have been useful, since cargo runs rustc many times with different arguments.  I think this will be useful if other people report problems, we can ask them to run with `CARGO_LOG=cargo::ops::fix=trace` to gather more information.

2 years agoAuto merge of #9830 - ehuss:document-third-party-registries, r=alexcrichton
bors [Mon, 23 Aug 2021 17:43:37 +0000 (17:43 +0000)]
Auto merge of #9830 - ehuss:document-third-party-registries, r=alexcrichton

Add documentation about third-party registries.

This adds a link to the wiki where a list of third-party registries can be maintained.

2 years agoAuto merge of #9818 - hi-rustin:rustin-patch-fix, r=alexcrichton
bors [Mon, 23 Aug 2021 17:03:28 +0000 (17:03 +0000)]
Auto merge of #9818 - hi-rustin:rustin-patch-fix, r=alexcrichton

unset the FIX_ENV when executing the real rustc

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

2 years agoImprove resolver message for validate_links
Weihang Lo [Mon, 23 Aug 2021 03:36:42 +0000 (11:36 +0800)]
Improve resolver message for validate_links

2 years agoUpdate tests to display dep-req info for dep-chain
Weihang Lo [Sun, 22 Aug 2021 16:10:15 +0000 (00:10 +0800)]
Update tests to display dep-req info for dep-chain

2 years agoDisplay dep requirement info for cyclic dependencies
Weihang Lo [Sun, 22 Aug 2021 16:08:02 +0000 (00:08 +0800)]
Display dep requirement info for cyclic dependencies

2 years agoAdd dep requirement info for dep-chain display
Weihang Lo [Sun, 22 Aug 2021 16:04:41 +0000 (00:04 +0800)]
Add dep requirement info for dep-chain display

2 years agoAuto merge of #9801 - arlosi:checksum, r=alexcrichton
bors [Mon, 23 Aug 2021 16:37:47 +0000 (16:37 +0000)]
Auto merge of #9801 - arlosi:checksum, r=alexcrichton

Allow crate download by checksum

The `dl` key in `config.json` currently allows the following substitutions: {crate}, {version}, {prefix}, {lowerprefix}.

This change adds a {checksum} placeholder for the crate's sha256 checksum. Does not change any existing behavior.

Allowing downloads by checksum makes it possible for crate files to be placed in a content addressable store.

2 years agoAuto merge of #9792 - weihanglo:issue-9782, r=ehuss
bors [Mon, 23 Aug 2021 16:07:05 +0000 (16:07 +0000)]
Auto merge of #9792 - weihanglo:issue-9782, r=ehuss

Emit warning for migrating to unstable edition in stable channel

Resolves #9782

Also alter the original error message slightly.

2 years agoFix typo in git-authentication.md
Nursan Valeyev [Mon, 23 Aug 2021 16:03:33 +0000 (19:03 +0300)]
Fix typo in git-authentication.md

2 years agoAuto merge of #9771 - hi-rustin:rustin-patch-dep, r=ehuss
bors [Mon, 23 Aug 2021 15:36:56 +0000 (15:36 +0000)]
Auto merge of #9771 - hi-rustin:rustin-patch-dep, r=ehuss

Warning for no lib dependencies

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

2 years agoAdd some debug logging for `cargo fix`
Eric Huss [Mon, 23 Aug 2021 15:11:30 +0000 (08:11 -0700)]
Add some debug logging for `cargo fix`

2 years agoAuto merge of #9824 - ehuss:disable-std_docs, r=alexcrichton
bors [Mon, 23 Aug 2021 15:08:18 +0000 (15:08 +0000)]
Auto merge of #9824 - ehuss:disable-std_docs, r=alexcrichton

Temporarily disable extern-html-root-url test.

A change in https://github.com/rust-lang/rust/pull/82776 broke this test,
so disabling for now until it is figured out how things are going to work.

2 years agoAdd documentation about third-party registries.
Eric Huss [Mon, 23 Aug 2021 14:17:10 +0000 (07:17 -0700)]
Add documentation about third-party registries.

2 years agoTemporarily disable extern-html-root-url test.
Eric Huss [Sun, 22 Aug 2021 16:24:46 +0000 (09:24 -0700)]
Temporarily disable extern-html-root-url test.

A change in https://github.com/rust-lang/rust/pull/82776 broke this test,
so disabling for now until it is figured out how things are going to work.