Commit graph

17057 commits

Author SHA1 Message Date
Ed Page f96638ea3b refactor(toml): Rely on resolved description 2024-03-28 13:33:23 -05:00
Ed Page 102b5890be refactor(toml): Rely on resolved edition
Returning a `&String` is unusual but this keeps things easier on both
sides.
2024-03-28 13:33:23 -05:00
Ed Page b3183596cc refactor(toml): Rely on resolved rust-version
This also removes duplicated inheritance and one of them specifying the
wrong field.
2024-03-28 13:33:23 -05:00
Ed Page 6ad976912d refactor(toml): Rely on resolved version 2024-03-28 13:33:23 -05:00
bors 631b077003 Auto merge of #13685 - ehuss:macos-13, r=weihanglo
CI: Update macos images to macos-13

This changes the CI workflows to use `macos-13` instead of `macos-latest`. `latest` is currently `macos-12`, but GitHub is [migrating](https://github.blog/changelog/2024-04-01-macos-14-sonoma-is-generally-available-and-the-latest-macos-runner-image/) latest to `macos-14` starting immediately. 14 switches to aarch64 which we do not want, yet.

rust-lang/rust already migrated to macos-13 a little while ago in https://github.com/rust-lang/rust/pull/113544. This might have some performance improvements here, as the macos-12 images inconsistently have SIP enabled, but macos-13 seems to reliably have it disabled.

We do not yet know when GitHub will be retiring their x86_64 runners. Their current roadmap, posted at https://github.com/actions/runner-images/issues/9255, shows macos-13 supported through at least the end of the year. However, I suspect next year might spell the end for it. At that time, the Rust project might need to consider downgrading x86_64-apple-darwin to tier 2 or figure out some other option.
2024-04-01 20:31:29 +00:00
Eric Huss 33360c898a CI: Update macos images to macos-13 2024-04-01 13:17:36 -07:00
bors c9ca99bd41 Auto merge of #13679 - rust-lang:renovate/opener-0.x, r=epage
chore(deps): update rust crate opener to 0.7.0

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [opener](https://togithub.com/Seeker14491/opener) | workspace.dependencies | minor | `0.6.1` -> `0.7.0` |

---

### Release Notes

<details>
<summary>Seeker14491/opener (opener)</summary>

### [`v0.7.0`](https://togithub.com/Seeker14491/opener/blob/HEAD/CHANGELOG.md#070---2024-03-22)

[Compare Source](https://togithub.com/Seeker14491/opener/compare/v0.6.1...v0.7.0)

##### Added

-   "dbus-vendored" feature, which is enabled by default to match current behavior. This just forwards to the `dbus` crate's "vendored" feature. Disable it to link dynamically to dbus instead of statically.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 5am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/rust-lang/cargo).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
2024-04-01 13:11:52 +00:00
bors 01270e0094 Auto merge of #13678 - heisen-li:flag_allow_prerelease, r=epage
Remove useless parameters

### What does this PR try to resolve?

From https://github.com/rust-lang/cargo/pull/12078#discussion_r1185640020
2024-04-01 12:41:35 +00:00
bors 50efee464c Auto merge of #13680 - rust-lang:renovate/supports-unicode-3.x, r=epage
chore(deps): update rust crate supports-unicode to v3

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [supports-unicode](https://togithub.com/zkat/supports-unicode) | dependencies | major | `2.1.0` -> `3.0.0` |

---

### Release Notes

<details>
<summary>zkat/supports-unicode (supports-unicode)</summary>

### [`v3.0.0`](https://togithub.com/zkat/supports-unicode/blob/HEAD/CHANGELOG.md#300-2024-02-04)

[Compare Source](https://togithub.com/zkat/supports-unicode/compare/v2.1.0...v3.0.0)

##### Features

-   **deps:** Switch to std::io::IsTerminal ([#&#8203;5](https://togithub.com/zkat/supports-unicode/issues/5)) ([e286df87](e286df87e0))
    -   **BREAKING CHANGE**: This bumps the MSRV to 1.70.0 in order to use `std::io::IsTerminal` directly.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 5am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/rust-lang/cargo).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
2024-04-01 11:53:15 +00:00
renovate[bot] dd81de0d1a
chore(deps): update rust crate supports-unicode to v3 2024-04-01 03:40:43 +00:00
renovate[bot] b66026d656
chore(deps): update rust crate opener to 0.7.0 2024-04-01 03:40:34 +00:00
heisen-li 7fa0e81090 fmt 2024-04-01 11:36:52 +08:00
heisen-li 88b19af01d Remove legacy parameters 2024-04-01 11:36:32 +08:00
bors a59aba136a Auto merge of #13666 - epage:refactor-package, r=weihanglo
refactor(package): Simplify getting of published Manifest

### What does this PR try to resolve?

This is a parallel effort to #13664 in an effort to #13456

This abstracts away the logic for getting the published version of `Cargo.toml` so we can more easily change the APIs that were previously exposed

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

### Additional information
2024-03-28 21:21:41 +00:00
Ed Page ca706a494b refactor(toml): Be consistent in how we initialize warnings
This resolves feedback from #13664
2024-03-28 13:32:28 -05:00
Ed Page 8a7489952f refactor(package): Consolidate creation of published package 2024-03-28 13:29:24 -05:00
Ed Page 866d51d090 refactor(package): Make prepare for publish a higher level operation 2024-03-28 13:29:24 -05:00
Ed Page 3c3a8cf33c refactor(package): Flatten manifest prep for packaging 2024-03-28 13:29:24 -05:00
Ed Page cad9673785 refactor(package): Move preamble to Manifest 2024-03-28 13:29:24 -05:00
bors 97ed4ff1ad Auto merge of #13664 - epage:refactor-toml, r=weihanglo
fix(toml): Warn on unused workspace.dependencies keys on virtual workspaces

### What does this PR try to resolve?

This splits out refactors that build on #13589 in preparation for resolving #13456.

As part of those refactors, I noticed an inconsistency on when we warn for unused keys.  We have parallel code paths between `to_virtual_manifest` and `to_real_manifest` and only one got updated on a change.  This syncs them up.  Hopefully the end state this builds to will reduce duplication.

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

### Additional information
2024-03-28 17:49:42 +00:00
bors 3d9dea672a Auto merge of #13665 - weihanglo:locked-frozen, r=epage
docs: clarify `--locked` ensures Cargo uses dependency versions in lockfile
2024-03-28 16:49:40 +00:00
Weihang Lo 26b2e74e55
docs: clarify --locked disallows changes in Cargo.lock 2024-03-28 12:08:57 -04:00
bors acd673bcc4 Auto merge of #13648 - RalfJung:RUSTC_WORKSPACE_WRAPPER, r=weihanglo
RUSTC_WORKSPACE_WRAPPER: clarify docs

Follow-up to [Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Question.20about.20RUSTC_WORKSPACE_WRAPPER)
2024-03-28 15:23:13 +00:00
Ralf Jung 27a474180c
fix typo
Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
2024-03-28 16:16:09 +01:00
Ralf Jung 4bacc47b36 add test for having both wrappers 2024-03-28 07:20:37 +01:00
Weihang Lo e549bc809b
fix(cli): resolve confusion between --frozen and --locked 2024-03-27 22:05:03 -04:00
Ed Page 8a82df2c21 refactor(toml): Consolidate workspace dependency verification 2024-03-27 15:23:26 -05:00
Ed Page 453f39f40e refactor(toml): Centralize workspace config processing 2024-03-27 15:21:45 -05:00
Ed Page 931259032e refator(tom): Give up and allow warnings anywhere 2024-03-27 15:18:03 -05:00
bors 07253b7ea6 Auto merge of #13655 - epage:add-comment, r=weihanglo
fix(add): Preserve comments when updating simple deps

### What does this PR try to resolve?

Fixes https://github.com/rust-lang/cargo/issues/13645

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

A case the tests showed but isn't covered here is when a `[features]`
table is created, the dependencies-end comment gets attached to that,
e.g. see cargo_add/overwrite_optional

### Additional information
2024-03-27 20:13:01 +00:00
Ed Page 573fe524cf fix(toml): Warn on unused workspace.dependencies keys on virtual workspaces 2024-03-27 13:00:43 -05:00
Ed Page 5d2fa4497f refactor(toml): Consolidate public nightly check with clearing it 2024-03-27 13:00:43 -05:00
Ed Page e4f1eb01c9 refactor(toml): Decouple Dep and TomlDep creation 2024-03-27 13:00:43 -05:00
Ed Page 1855a4ad24 refactor(toml): Pull out the dep resolve/validate code 2024-03-27 13:00:43 -05:00
Ed Page 3b7fddb737 refactor(toml): Delay pkgid/summary creation 2024-03-27 12:53:49 -05:00
Ed Page 386c4b6a65 refactor(toml): Consistently don't include pkgid
This is the only error we do this for and we have the context for what
manifest we are parsing.
By removing this, it makes it easier to adjust lifetimes in the short
term.
2024-03-27 12:53:49 -05:00
Ed Page b63e385a89 refactor(toml): Group workspace inheritance functions 2024-03-27 12:53:49 -05:00
bors 3b43aa875f Auto merge of #13657 - weihanglo:package-cache-lock, r=epage
fix(generate-lockfile): hold lock before querying index
2024-03-26 21:06:23 +00:00
Weihang Lo f1c139624f
fix(generate-lockfile): hold lock before querying index 2024-03-26 16:57:28 -04:00
Weihang Lo 5587af7caf
refactor: remove unnecessary export so no need to deal with lock acquisitions 2024-03-26 16:57:27 -04:00
Weihang Lo e186bf4e7a
test(generate-lockfile): verify --offline panics 2024-03-26 16:57:27 -04:00
Ed Page e476bd5254 fix(add): Preserve comments when updating simple deps
A case the tests showed but isn't covered here is when a `[features]`
table is created, the dependencies-end comment gets attached to that,
e.g. see cargo_add/overwrite_optional

Fixes #13645
2024-03-26 12:49:01 -05:00
Ed Page 8b7aca91b0 test(add): Show a bunch of cases 2024-03-26 12:35:03 -05:00
bors 5b2b1c036c Auto merge of #13651 - weihanglo:borrow_mut, r=epage
test: Add asserts to catch BorrowMutError's

### What does this PR try to resolve?

This intentionally borrows from `RefCell`s before conditional code to try to prevent regressions like #13646 without exhaustively covering every case that could hit these `BorrowMutError`s with complicated tests.

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

I tested this by ensuring the registry code path panicked before rebasing on top of #13647.
Once I rebased, the panic went away.

### Additional information

Split off from #13649 to try to avoid appveyor
2024-03-26 17:12:28 +00:00
Ed Page 309cd9387c
test: Add asserts to catch BorrowMutError's
This intentionally borrows from `RefCell`s before conditional code
to try to prevent regressions like #13646 without exhaustively
covering every case that could hit these `BorrowMutError`s with
complicated tests.

I tested this by ensuring the registry code path panicked before
rebasing on top of #13647.
Once I rebased, the panic went away.

Co-authored-by: Ed Page <eopage@gmail.com>
2024-03-26 13:04:07 -04:00
bors 3a77350b77 Auto merge of #13418 - PaulDance:publish-test-crates, r=weihanglo
Publish test crates

### What does this PR try to resolve?

This is an attempt to close #10147. In short, publish the `cargo-test-(macro|support)` crates to crates.io.

Main parts:
* Updating the concerned manifests to make the packages publishable.
* Adding them to `publish.py`: not sure if you want this to be done. I put them after all other packages and in reverse-dependency order to ensure things will work the best, hopefully.
* Updating the contribution documentation to reflect the change. I didn't see any other place where the crates' publication was mentioned.

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

Sadly, the effective testing could not be done by me as it would require publishing the crates, which would block future publications by Cargo team members and therefore render the whole point of this impossible or cumbersome. Hopefully, the PR is small and readable enough that mistakes can be seen easily. The real testing would need to be done manually by some team member either before by checking the source branch out or after merging.

The only testing I was able to perform was to run `cargo publish --dry-run -p cargo-test-(macro|support)`. The first worked just fine. The second failed on the `crates-io` package not being available on crates.io in version `0.40.0`. However, the package is in this version in the current sources. I therefore suspect that a run of `publish.py` should work since the packages have been added there after `crates-io`.

### Additional information

This is very much tentative and open to discussion. I tried my best to update things as I understood them. Please correct me on anything I would have done wrong or simply not thought of.
2024-03-26 12:45:32 +00:00
Paul Mabileau f422e96b31
Docs(crates/cargo-test-*): Add external usage warning
As discussed in #10147.

Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
2024-03-26 11:17:34 +01:00
Paul Mabileau 29c45d0e66
Docs(process/release): Update to include test tools in publication
Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
2024-03-26 11:17:34 +01:00
Paul Mabileau 6f581e9056
Chore(xtask-bump-check): Exclude cargo-test-* to make corresponding CI check pass
Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
2024-03-26 11:17:34 +01:00
Paul Mabileau 8be4cc39e2
Chore(publish.py): Add cargo-test-* to publication list
Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
2024-03-26 11:17:34 +01:00