Commit graph

17073 commits

Author SHA1 Message Date
Ed Page 611b6889a6 refactor(toml): Separate resolve/validate dependencies 2024-03-28 13:33:23 -05:00
Ed Page 21ca8ab647 refactor(toml): Remove ManifestContext from dependency_inherit_with 2024-03-28 13:33:23 -05:00
Ed Page b517320f1a refactor(toml): Remove ManifestContext from default_feature_msg 2024-03-28 13:33:23 -05:00
Ed Page 772539a03a refactor(toml): Group resolving of lints with package
We can't have validation depend on `TomlManifest::resolved_lints` yet
because we need to pull out the resolving of deps first.
2024-03-28 13:33:23 -05:00
Ed Page a2033965a8 refactor(toml): Directly initialize TomlPackage
This will make it easier to evaluate what needs to be resolved in the
future.
2024-03-28 13:33:23 -05:00
Ed Page 2ea1ac6fac refactor(toml): Rely on resolved publish 2024-03-28 13:33:23 -05:00
Ed Page 20302b34b7 refactor(toml): Rely on resolved include/exclude 2024-03-28 13:33:23 -05:00
Ed Page 00ba5780e4 refactor(toml): Rely on resolved authors 2024-03-28 13:33:23 -05:00
Ed Page 425a8ae478 refactor(toml): Rely on resolved repository 2024-03-28 13:33:23 -05:00
Ed Page 18550b2512 refactor(toml): Rely on resolved license-file 2024-03-28 13:33:23 -05:00
Ed Page b942be5bc1 refactor(toml): Rely on resolved license 2024-03-28 13:33:23 -05:00
Ed Page 047c1fe9d0 refactor(toml): Rely on resolved categories 2024-03-28 13:33:23 -05:00
Ed Page 258d8447a9 refactor(toml): Rely on resolved keywords 2024-03-28 13:33:23 -05:00
Ed Page d435d0e72a refactor(toml): Rely on resolved readme 2024-03-28 13:33:23 -05:00
Ed Page c62a559d82 refactor(toml): Rely on resolved documentation 2024-03-28 13:33:23 -05:00
Ed Page 5b5f64460b refactor(toml): Rely on resolved homepage 2024-03-28 13:33:23 -05:00
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