Commit graph

15213 commits

Author SHA1 Message Date
Eric Huss 7ada8392d0 Update curl-sys to pull in curl 8.3.0 2023-09-20 11:17:40 -07:00
bors d829727e2f Auto merge of #12716 - epage:renovate, r=arlosi
chore(ci): Ignore patch version in MSRV

1. Its extra churn to be forced to update patch releases
2. #12654 adds `cargo hack` which doesn't handle MSRV patch versions well
2023-09-20 15:43:06 +00:00
bors 376b9a75bd Auto merge of #12711 - weihanglo:cached, r=epage
refactor: move cached crates.io SourceID to config module
2023-09-20 14:52:44 +00:00
Ed Page f328f03600 chore(ci): Ignore patch version in MSRV
1. Its extra churn to be forced to update parch releases
2. #12654 adds `cargo hack` which doesn't handle MSRV patch versions
   well
2023-09-20 09:07:48 -05:00
bors 37dd3d9dfa Auto merge of #12714 - arlosi:cred-typos, r=weihanglo
fix: typos in registry authentication documentation

r? `@weihanglo`
2023-09-20 08:25:55 +00:00
bors 2607058a22 Auto merge of #12712 - weihanglo:unstable-flag, r=arlosi
doc: mention unstable flag `-Z asymmetric-token`
2023-09-20 07:07:48 +00:00
bors 0134bb602c Auto merge of #12688 - lf-:jade/efi-pdbs, r=arlosi
fix: copy PDBs for EFI targets
2023-09-20 06:14:30 +00:00
Arlo Siemsen 3401b89cf0 fix: typos in registry-authentication documentation 2023-09-20 00:54:07 -05:00
Weihang Lo ac5da12382
doc: mention unstable flag -Z asymmetric-token
Co-authored-by: Arlo Siemsen <arsiem@microsoft.com>
2023-09-20 13:46:31 +08:00
bors d1e246f584 Auto merge of #12713 - weihanglo:label, r=arlosi
infra: add auto-trigger rules for new labels
2023-09-20 05:29:18 +00:00
Weihang Lo 7f492cd2bf
infra: add auto-trigger rules for new labels 2023-09-20 13:28:42 +08:00
hi-rustin 817c2cbbb5 Better suggestion for unsupported mode in install command 2023-09-20 11:31:36 +08:00
hi-rustin 7644a4bd96 Add test for using unsupported mode in install command 2023-09-20 11:27:56 +08:00
hi-rustin ed86337492 Better suggestion for unsupported mode in build command 2023-09-20 11:24:44 +08:00
hi-rustin f262297e9a Add test for using unsupported mode in build command 2023-09-20 11:23:01 +08:00
bors e3f2e8fb03 Auto merge of #12709 - arlosi:cred-link, r=ehuss
fix: use channel-specific link for registry auth error

The current error message for attempting to use a private registry without a credential provider will be a dead link until it's stabilized in 1.74. This makes the URL dependent on the channel.

r? `@ehuss`
2023-09-20 03:13:05 +00:00
bors f57c80ebf3 Auto merge of #12638 - ehuss:clean-updates, r=epage
Add some enhancements to `cargo clean`

### What does this PR try to resolve?

This adds some enhancements to `cargo clean` that fell out as a result of some refactorings in #12634 for supporting an interface for cleaning from other places in cargo, and these were relatively easy to add and assist with testing in #12634.

The changes are:
- Introduce some refactoring to offer a cleaning interface that can be used elsewhere in cargo.
- Adds a `--dry-run` CLI option which will print what `cargo clean` will delete without deleting it. **NOTE** This PR makes the flag insta-stable. I don't figure there is too much that can be learned about it keeping it unstable, though we could change that. #12634 has this flag gated with `-Zgc`.
- Adds a summary line at the end of the `cargo clean` operation that indicates how much was deleted.

### How should we test and review this PR?

Note that this PR also includes the changes from #12635 and #12637. Those commits can be dropped if those PRs are merged.

For the most part, this involves wrapping the cleaning operations in a `CleanContext` which provides an interface for performing cleaning operations. The dry run is just a flag that is checked at the deletion points. The summary data is also collected at those same points.
2023-09-20 02:25:46 +00:00
Eric Huss 655f75db0a Add cargo --dry-run to the documentation. 2023-09-19 18:24:45 -07:00
Eric Huss c2047345bd Don't display paths with cargo clean --dry-run without --verbose
The paths themselves aren't particularly interesting.
2023-09-19 18:24:45 -07:00
Eric Huss f61d42d5ef Add a warning to cargo clean --dry-run
This makes it more consistent with other `--dry-run` commands, and
makes it clearer to the user that cargo did not do anything.
2023-09-19 18:24:45 -07:00
Eric Huss ebee726d8f Separately track files and directories removed.
The previous status line was a little awkward in the way it combined
both counts. I don't think showing the directories is particularly
interesting, so they are only displayed when no files are deleted.
2023-09-19 18:24:37 -07:00
Eric Huss e9110aac54 Use Self type. 2023-09-19 18:19:54 -07:00
Eric Huss e7e354c85b Use existing arg_dry_run function.
And drop the `-n` short flag until we decide to commit to using it
generally.
2023-09-19 18:19:53 -07:00
Eric Huss 495ed7ebe2 Add a summary to cargo clean.
This adds a summary at the end when `cargo clean` finishes that displays
how many files and bytes were removed.
2023-09-19 18:16:40 -07:00
Eric Huss 45c5394703 Add a --dry-run option to cargo clean.
This adds a `--dry-run` option to have `cargo clean` display what it
would delete without actually deleting it.
2023-09-19 18:14:47 -07:00
Eric Huss 61e8ef30d9 Wrap clean operations in a CleanContext.
This refactors some of the `cargo clean` code to wrap the "cleaning"
operation in a `CleanContext` so that the context can be passed to other
parts of cargo which can perform their own cleaning operations.

There are some minor changes in the error messages to prepare for
cleaning operations that aren't directly related to the build directory.
2023-09-19 18:14:13 -07:00
Weihang Lo 1fa386e1c4
refactor: move cached crates.io SourceID to config module
`SourceId` should know nothing about `config` caching.
2023-09-20 09:08:58 +08:00
bors f9335babbc Auto merge of #12707 - epage:spell, r=ehuss
chore: Fix typos

This is a repeat of #11561
2023-09-19 22:07:03 +00:00
Arlo Siemsen 498ef7dc07 Use channel-specific link for registry auth error 2023-09-19 16:59:44 -05:00
bors 808ffa954e Auto merge of #12678 - Eh2406:shortest_path, r=epage
Shortest path

### What does this PR try to resolve?

Currently error messages from the resolver are based a random path from a package that couldn't be resolved back to the root package. It was pointed out to me that the shortest route is likely to be more useful so the switches to using breadth first search to pick the path. There is also one re-factor to use let-else that I spotted while doing this work.

### How should we test and review this PR?

The shortest path is is a random path, so this is not technically a behavioral change. As such the tests still pass is good evidence for being reasonable.
2023-09-19 21:23:45 +00:00
Jacob Finkelman 679d65103f shortest path is probably more informative than random path for error messages 2023-09-19 20:39:02 +00:00
Ed Page e4e10f2393 chore: Fix typos
This is a repeat of #11561
2023-09-19 15:28:48 -05:00
Jacob Finkelman 2284b7a885 added assertions to make sure the path code is correct in graphs 2023-09-19 20:22:13 +00:00
Jacob Finkelman 245e69ce10 add a test for shortest path 2023-09-19 20:22:13 +00:00
bors 976771d897 Auto merge of #12705 - Turbo87:patch-1, r=epage
doc/reference/manifest: Adjust `keywords` description

This adjusts the naming rules for keywords to match the implemented reality:

aab95692ba/src/models/keyword.rs (L56-L64)

see also:

- https://github.com/rust-lang/rfcs/pull/3488#discussion_r1327466221
- https://github.com/rust-lang/rfcs/pull/3488#discussion_r1327724345
2023-09-19 17:53:54 +00:00
Tobias Bieniek 6a6b5e082a
reference/manifest: Adjust keywords description
This adjusts the naming rules for keywords to match the implemented reality:

aab95692ba/src/models/keyword.rs (L56-L64)
2023-09-19 19:48:36 +02:00
bors 40b78fe5f3 Auto merge of #12702 - Angelin01:refactor-cargo-add-features-display, r=epage
Cargo add displays either feature list or summarized count
2023-09-19 16:34:41 +00:00
Angelo Ross 72dccecb19
Display only feature list or summarized on cargo add 2023-09-19 13:14:44 -03:00
Angelo Ross c25bee16c9
Extract feature suffix formatting to function 2023-09-19 10:21:59 -03:00
Jade Lovelace 9357504a28 fix: copy PDBs for EFI targets
EFI also uses the PE format with .pdb files, and rustc generates them,
but Cargo does not copy them out of target/*/deps. This is an oversight,
so this PR fixes it.

Related: https://github.com/rust-osdev/uefi-rs/issues/289
Related: https://github.com/rust-lang/cargo/pull/5179
2023-09-18 20:30:55 -07:00
bors e4de526f25 Auto merge of #12687 - ehuss:semver-remove-opt-dep, r=epage
SemVer: Update documentation about removing optional dependencies

This updates the documentation cautioning against removing optional dependencies with more up-to-date information about using the `dep:` syntax in the features table. This documentation was written before `dep:`, and I just forgot to update these docs when it was stabilized.
2023-09-18 20:13:24 +00:00
Ed Page b3bc67679e docs(unstable): Update script documentation 2023-09-18 15:10:07 -05:00
Ed Page a365a69130 test(embedded): Migrate to new syntax 2023-09-18 14:47:56 -05:00
Ed Page ba869d36ed feat(embedded): Hack in code fence support
This is to allow us to get feedback on the design proposed
[on zulip](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Embedding.20cargo.20manifests.20in.20rust.20source/near/391427092)
to verify we want to make an RFC for this syntax.
2023-09-18 14:47:56 -05:00
Ed Page 4638ef9d2b refactor(embedded): Clarify a variable name 2023-09-18 14:47:56 -05:00
Eric Huss 8fe995f867 SemVer: Update documentation about removing optional dependencies 2023-09-18 12:01:48 -07:00
bors 819fa73b2d Auto merge of #12686 - Turbo87:publish-script, r=epage
publish.py: Remove obsolete `sleep()` calls

`cargo` waits for the package to appear in the index by default these days, so these obsolete extra `sleep()` calls are just making the publish process slower now without any advantages.

see https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/publish.2Epy
2023-09-18 16:32:49 +00:00
bors 4ac43be68a Auto merge of #12685 - eopb:ambiguous-spec-12433, r=epage
generalise suggestion on abiguous spec

Fixes #12433
2023-09-18 15:42:58 +00:00
Tobias Bieniek 49125e9ad8
publish.py: Remove obsolete sleep() calls
`cargo` waits for the package to appear in the index by default these days, so these obsolete extra `sleep()` calls are just making the publish process slower now without any advantages.
2023-09-18 17:40:42 +02:00
Ethan Brierley 9831e83fb2 generalise suggestion on abiguous spec
Fixes #12433
2023-09-18 16:34:17 +01:00