17085 Commits

Author SHA1 Message Date
Ed Page
ecf97cff51 refactor(toml): Simplify dependency validation 2024-04-02 12:55:25 -05:00
Ed Page
70ad920e74 refactor(toml): Prefer making a Manifest from resolved_toml 2024-04-02 12:31:18 -05:00
Ed Page
7640081cda Group logic for fields dependent on package
I'm somewhat tempted to flatten the function call.
The parallel between the package an virtual-manifest cases would help to
keep them in sync.
2024-04-02 12:25:34 -05:00
Ed Page
9eb7c09463 refactor(toml): Scope package-related tables to package scope 2024-04-02 12:17:37 -05:00
Ed Page
2811c15485 refactor(toml): Build up resolved manifest as we go
Normally, I prefer directly constructing something but I feel this works
better in this case so I can limit a lot of work that is coupled to a
`package` being present.

Since we still directly construct, just with `None`, I think this still
works.
2024-04-02 12:13:35 -05:00
Ed Page
8a6fa8bcb4 refactor(toml): Extract package resolving 2024-04-02 11:55:07 -05:00
Ed Page
e9d28d8813 refactor(toml): Simplify how we pass around inheritable data 2024-04-01 21:25:06 -05:00
Ed Page
9cc5b90932 refactor(toml): Extract resolve_toml 2024-04-01 21:10:28 -05:00
Ed Page
c921f52b4f refactor(toml): Centralize creation of workspace_config 2024-04-01 20:53:40 -05:00
Ed Page
0f5b562e62 refactor(toml): Centralize cargo-features parsing 2024-04-01 20:53:04 -05:00
Ed Page
5d8bdf4f41 refactor(toml): Separate resolving from other in same fn 2024-03-28 13:33:23 -05:00
Ed Page
3d1da63222 refactor(toml): Rely on resolved badges 2024-03-28 13:33:23 -05:00
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