14569 Commits

Author SHA1 Message Date
Ed Page
5d80aa263d refactor: Provide workspace-level default license 2023-07-17 13:21:41 -05:00
Ed Page
3752929dd4 refactor: Update home to 2021 edition 2023-07-17 13:21:41 -05:00
Ed Page
e4877cc701 refactor: Update resolver-tests to 2021 edition 2023-07-17 13:21:41 -05:00
Ed Page
f358359a17 refactor: Provide a workspace-level default edition 2023-07-17 13:21:40 -05:00
Ed Page
8b02d4927e refactor: Infer package.readme 2023-07-17 13:21:10 -05:00
bors
31eda6f7c3 Auto merge of #12363 - BartMassey-upstream:unspecifead, r=ehuss
Correct unspecifiead to unspecified

This patch just corrects a small spelling error.
2023-07-16 00:55:10 +00:00
bors
da4f189ac1 Auto merge of #12364 - AlexTMjugador:patch-1, r=ehuss
Replace invalid `panic_unwind` std feature with `panic-unwind`

### What does this PR try to resolve?

The documentation for the unstable `build-std-features` flag mentions that a default-enabled feature for `std` is `panic_unwind`. However, as of 2023-07-16, that feature does not even exist in the latest nightlies:

![Cargo error shown when trying to use the `panic_unwind` feature](https://github.com/rust-lang/cargo/assets/7822554/daeec810-0cd9-4a6d-ab54-a6336704cc08)

[The `std` `Cargo.toml`](https://github.com/rust-lang/rust/blob/master/library/std/Cargo.toml#L54-L79) does not contain the `panic_unwind` feature either, but it defines a `panic-unwind` feature, which works as intended with the `build-std-features` flag.

Therefore, let's update the documentation to refer to the intended feature instead, which improves its accuracy and reduces developer time waste.

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

Run e.g. `cargo build --release -Z build-std -Z build-std-features=panic-unwind --target x86_64-unknown-linux-gnu` instead of `cargo build --release -Z build-std -Z build-std-features=panic_unwind --target x86_64-unknown-linux-gnu`, and watch how the first one works as intended but the second one just shows an error.
2023-07-16 00:08:43 +00:00
Alejandro González
b8ac2f6b62
Replace invalid panic_unwind std feature with panic-unwind 2023-07-16 01:53:21 +02:00
Bart Massey
b9bee5297e corrected unspecifiead to unspecified 2023-07-15 16:52:55 -07:00
bors
8461660621 Auto merge of #12361 - weihanglo:version-bump, r=epage
Bump to 0.74.0; update changelog

[rendered](https://github.com/weihanglo/cargo/blob/version-bump/CHANGELOG.md)
2023-07-14 23:37:53 +00:00
Weihang Lo
d11145dfb9
Update changelog for 1.73 2023-07-15 00:30:08 +01:00
Weihang Lo
80c09d78e0
Update changelog for 1.72 2023-07-15 00:30:08 +01:00
Weihang Lo
ff644b8cac
Bump to 0.74.0 2023-07-15 00:20:53 +01:00
bors
4bbb300055 Auto merge of #12357 - arlosi:crates-io-version-bump, r=weihanglo
Bump version of crates-io due to unintentional semver-breaking change

r? `@weihanglo`

Fixes #12354
2023-07-13 21:09:42 +00:00
Arlo Siemsen
d45ba88290 Bump version of crates-io due to unintentional semver-breaking change 2023-07-13 14:35:09 -05:00
bors
20df9e40a4 Auto merge of #12341 - epage:update, r=weihanglo
chore: Automatically update dependencies monthly

### What does this PR try to resolve?

This will create PRs that will update `Cargo.toml` and `Cargo.lock` at the same time.  By default, RenovateBot will update all dependencies, so we pull out the compatible dependencies into a consolidated PR to reduce disruptions and CI load.

This doesn't just cover Rust dependencies but github workflows as well.

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

This starts off with the dependency dashboard and automerging being disabled but explicitly specified to call attention to the potential for this.  We can evaluate these later.

The frequency of monthly was chosen to consolidate disruptions.  The main risk is doing an update right before a beta branch but we can't have a cron schedule for once every 6 weeks (I assume) which would be ideal.  At least its not daily or instant.

I chose `json5` over `json` for comments and trailing commas, to make human-editing easier.

I pulled the config from https://github.com/gitext-rs/git-stack/blob/main/.github/renovate.json5
- [Dependency dashboard](https://github.com/gitext-rs/git-stack/issues/309)
- [Compatible PR](https://github.com/gitext-rs/git-stack/pull/255)
- [Incompatible PR](https://github.com/gitext-rs/git-stack/pull/310)

CC `@Turbo87`
2023-07-12 14:11:16 +00:00
bors
ee100cce20 Auto merge of #12339 - ehuss:heading-attributes, r=weihanglo
docs: Use heading attributes to control the fragment.

mdBook recently gained the ability to use [heading attributes](https://rust-lang.github.io/mdBook/format/markdown.html#heading-attributes) which allows you to define the HTML id (and thus URL fragment) for a section. This is an improvement over using manual `id` tags since mdBook can now know which ID matches the section, and will automatically set up links and such.

Some of these pages were using `id` tags to handle backwards-compat for old URLs. For those, I switched them to use redirects instead.

One downside is that the links won't work in GitHub render previews. Overall I think the benefits are worth it, though.
2023-07-12 12:11:33 +00:00
Eric Huss
a1812676b7 docs: Use heading attributes to control the fragment. 2023-07-11 18:02:52 -07:00
bors
a94d1d03a5 Auto merge of #12351 - ehuss:let-else-fmt, r=weihanglo
Rustfmt with latest nightly.

The latest nightly introduced a new version of rustfmt which handles let-else formatting.

These should be compatible with stable formatting.
2023-07-12 00:05:31 +00:00
Eric Huss
43c253e69a Rustfmt with latest nightly. 2023-07-11 16:58:53 -07:00
bors
694a579566 Auto merge of #12349 - epage:sanitize, r=weihanglo
fix(embedded): Always generate valid package names

### What does this PR try to resolve?

The sanitization logic uses a placeholder for the first character that isn't valid in the first character position.  #12329 took the approach of always using `_` which has the problem of mixing separators if the user used `-` or we had other placeholders to insert.  Instead, this takes the approach of stripping the leading invalid characters and using a placeholder name if nothing is left.

Fixes #12330

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

Per-commit.  The first adds tests so the change in behavior can be observed over each additional commit.

### Additional information

I was also hoping to make the binary name not use placeholders by setting `bin.name` to `file_stem` but then I got
```
   Compiling s-h-w-c- v0.0.0 (/home/epage/src/personal/cargo/target/tmp/cit/t133/foo)
error: invalid character `'.'` in crate name: `s_h.w§c!`

error: invalid character `'§'` in crate name: `s_h.w§c!`

error: invalid character `'!'` in crate name: `s_h.w§c!`

error: could not compile `s-h-w-c-` (bin "s-h.w§c!") due to 3 previous errors
```
I decided to not get into what are or aren't valid characters according to rustc.
2023-07-11 22:28:29 +00:00
bors
e64975c005 Auto merge of #12350 - epage:invalid, r=weihanglo
fix(embedded): Error on unsupported commands

### What does this PR try to resolve?

We had talked about de-prioritizing some commands in the cargo team meeting today.  Looking through `cargo --list` and trying them out, the important ones to defer seemed to be:

- `cargo pkgid` is unsupported because we can't (yet) generate valid
  pkgids for embedded manifests.  Adding support for this would be a
  step towards workspace support
- `cargo package` and `cargo publish` are being deferred.  These would
  be more important for `[lib]` support.  `cargo install` for `[[bin]]`s
  is a small case and As single-file packages are fairly restrictive, a
  `[[bin]]` is a lower priority.

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

Per-commit
2023-07-11 21:23:17 +00:00
Ed Page
10fbb470bb fix(embedded): Error on unsupported commands
- `cargo pkgid` is unsupported because we can't (yet) generate valid
  pkgids for embedded manifests.  Adding support for this would be a
  step towards workspace support
- `cargo package` and `cargo publish` are being deferred.  These would
  be more important for `[lib]` support.  `cargo install` for `[[bin]]`s
  is a small case and As single-file packages are fairly restrictive, a
  `[[bin]]` is a lower priority.
2023-07-11 15:34:17 -05:00
Ed Page
aaaa37f409 test(embedded): Add tests for unsupported commands 2023-07-11 15:26:28 -05:00
bors
7d9498dd29 Auto merge of #12342 - epage:ci, r=weihanglo
chore(ci): Automatically test new packages by using `--workspace`

### What does this PR try to resolve?

This is a part of #11987 that was unblocked by #12321 and #11993

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

Relying on CI to verify this

I'd prefer to move the `cargo test --workspace` step earlier but we run out of disk space if we do (we currently only have 661 MB of headroom of windows-gnu)

See the individual commits for smaller chunks and explanations for why changes were made.
2023-07-11 19:50:49 +00:00
Ed Page
7d4e39c4f5 fix(embedded): Don't generate empty package names 2023-07-11 14:37:44 -05:00
Ed Page
87be661989 fix(embedded): Don't generate package names with invalid leading digit 2023-07-11 14:35:50 -05:00
Ed Page
09d6c79278 test(script): Verify existing leading number behavior 2023-07-11 14:27:36 -05:00
bors
98bfa9870c Auto merge of #12344 - ehuss:contrib-publish-more, r=epage
contrib docs: Add some more detail about how publishing works

This adds a little clarification on how cargo releases are made, and how things get published.
2023-07-11 18:53:50 +00:00
Eric Huss
f95a2a5e32 Add some clarifications on where things run from. 2023-07-11 11:41:24 -07:00
Eric Huss
3c8399ef5d contrib docs: Add some more detail about how publishing works 2023-07-10 14:15:42 -07:00
bors
445838d3ff Auto merge of #12343 - epage:change, r=ehuss
docs: Put cargo-add change under nightly

I'm assuming we'll want to beta-backport this.
2023-07-10 20:46:55 +00:00
Ed Page
642e0c38db docs: Put cargo-add change under nightly
I'm assuming we'll want to beta-backport this.
2023-07-10 15:13:15 -05:00
Ed Page
6968d41c3a chore(ci): Automatically test all new packages 2023-07-10 13:04:14 -05:00
Ed Page
3d7dd47f15 chore(ci): Clarify which steps are linked by disk space 2023-07-10 13:00:23 -05:00
Ed Page
b83ac38637 chore(ci): Put success/failure first so we remember to update them 2023-07-10 13:00:20 -05:00
Ed Page
12622ab56b chore: Automatically update dependencies monthly
This will update `Cargo.toml` and `Cargo.lock` at the same time.  By
default, all dependencies will be updated, so we pull out the compatible
dependencies into a consolidated PR.

This starts off with the dependency dashboard and automerging being
disabled but explicitly specified to call attention to the potential for
this.  We can evaluate these later.
2023-07-10 12:26:33 -05:00
bors
04c94d90b6 Auto merge of #12340 - nicoburns:patch-1, r=weihanglo
Minor: Use "number" instead of "digit" when explaining Cargo's use of semver

Digit is technically incorrect here, as it would imply that Cargo treats 0.10.0 and 0.11.0 as semver compatible (because they have the same leftmost non-zero *digit*, even though they do not have the same leftmost non-zero *number*).
2023-07-10 10:29:15 +00:00
bors
0e5f3b65bc Auto merge of #12338 - ehuss:update-criterion, r=weihanglo
Update criterion

This updates the criterion dependency to the latest version. There aren't huge changes since 0.3.6, but there are some small changes such as slightly different console output, new flags, etc. The full changelog is at: https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md
2023-07-10 09:34:08 +00:00
Nico Burns
a35b0f3e6d
Use "number" instead of "digit" when explaining Cargo's semver
Digit is technically incorrect here, as it would imply that Cargo treats 0.10.0 and 0.11.0 as semver compatible (because they have the same leftmost non-zero *digit*, even though they do not have the same leftmost non-zero *number*).
2023-07-10 10:08:58 +01:00
Eric Huss
119fede29f Update criterion 2023-07-09 15:59:30 -07:00
bors
c40a69df6a Auto merge of #12337 - ehuss:config-strip, r=weihanglo
Add profile strip to config docs.

This information in the docs was missed when stabilizing in #10088.
2023-07-09 22:57:06 +00:00
Eric Huss
b6d1979683 Add profile strip to config docs. 2023-07-09 15:53:33 -07:00
bors
bd0b9fdfe4 Auto merge of #12335 - ahl:ahl-patch-1, r=epage
update re: multiple versions that differ only in the metadata tag

Resolved by https://github.com/rust-lang/crates.io/issues/1059 a few weeks ago
2023-07-09 00:49:00 +00:00
Adam Leventhal
26b0be4ae9
update re: multiple versions that differ only in the metadata tag
Resolved by https://github.com/rust-lang/crates.io/issues/1059 a few weeks ago
2023-07-08 15:22:09 -07:00
bors
ea9c1a5bd7 Auto merge of #12313 - weihanglo:opaque-id, r=ehuss
doc: state `PackageId`/`SourceId` string is opaque
2023-07-08 20:48:07 +00:00
Weihang Lo
f3fd9ef724
doc: state PackageId/SourceId string is opaque
Cargo tries to maintain the stability of every output it emits.
However, for things like `PackageId` and `SourceId` users should
see them as opaque strings. We generally don't change it but we
want to reserve the right to change when it is required.
2023-07-08 20:20:29 +01:00
bors
45782b6b8a Auto merge of #12323 - epage:version, r=weihanglo
docs(ref): Provide guidance on version requirements

### What does this PR try to resolve?

I've been dealing with these situations as either the package author, depending on such a package, or supporting users who run into problems that I figure documenting this guidance in a central place means I won't have to repeat myself as often and have to re-find all of the relevant links each time.

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

Alternatives to how this was documented
- Use a regular header.  All of sections in this document are flat and its hard to see association between them.  This also feels like its more on the level of the "note"s.
- Put this in a central Recommendations page.  I think we should do something more for these when we have more (nothing else in my quick scan stood out as "recommendations" like this).  At that point we can have a better idea of how it would work (much like the rule of 3 for generalizing code).  I also suspect a "Recommendations" index might be better.
- Put this in the FAQ.  This can easily be framed as a question and we put the `Cargo.lock` policy in there.

I left out talking about alternative proc-macro designs as I feel like treading new ground in community practices is out of the scope of this.

### Additional information

See also https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Version.20Requirements.20documentation
2023-07-05 16:54:51 +00:00
Ed Page
6c37c34b0f docs(ref): Provide guidance on version requirements
I've been dealing with these situations as either the package author,
depending on such a package, or supporting users who run into problems
that I figure documenting this guidance in a central place means I won't
have to repeat myself as often and have to re-find all of the relevant
links each time.

Alternatives to how this was documented
- Use a regular header.  All of sections in this document are flat and
  its hard to see association between them.  This also feels like its
  more on the level of the "note"s.
- Put this in a central Recommendations page.  I think we should do
  something more for these when we have more (nothing else in my quick
  scan stood out as "recommendations" like this).  At that point we can
  have a better idea of how it would work (much like the rule of 3 for
  generalizing code).  I also suspect a "Recommendations" index might be
  better.
- Put this in the FAQ.  This can easily be framed as a question and we
  put the `Cargo.lock` policy in there.

I left out talking about alternative proc-macro designs as I feel like
treading new ground in community practices is out of the scope of this.

See also https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Version.20Requirements.20documentation
2023-06-30 14:41:24 -05:00
bors
5b377cece0 Auto merge of #12322 - ehuss:credential-readme, r=epage
Add READMEs for the credential helpers.

This adds some READMEs for these crates. These are pretty bare bones for now, but I suspect they may get extended in the future based on how we decide to deploy them.
2023-06-30 00:01:00 +00:00