Commit graph

16803 commits

Author SHA1 Message Date
Bryan Garza 604d2e40e2 chore: update pulldown-cmark to 0.10.0
Fixes: https://github.com/rust-lang/cargo/issues/13509
2024-03-04 20:14:44 +00:00
bors f772ec0224 Auto merge of #13505 - epage:edition-warn, r=weihanglo
feat(toml): Warn on unset Edition

### What does this PR try to resolve?

On [Internals](https://internals.rust-lang.org/t/idea-rustc-cargo-should-warn-on-unspecified-edition/20309), the idea came up for warning on unset Edition.

Besides helping people who forget to set the Edition, this creates symmetry between `Cargo.toml` and cargo scripts (#12207).  While the default is different in each case, we are making the default obvious and guiding people away from it.

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

There are separate commits for adding tests (and refactors) so the changes in behavior will be more obvious

### Additional information

This builds on
- #13499
- #13504
2024-03-01 22:57:35 +00:00
bors db609a5ac8 Auto merge of #13514 - epage:msrv-error, r=weihanglo
fix(msrv): Report all incompatible packages, not just a random one

### What does this PR try to resolve?

In #9930, it recommended improving the error for incompatible packages
so people can better get to the root of the problem.
For example, you might get an error about `clap_lex` but resolving the
error for the higher level `clap` could make the problem with `clap_lex`
go away.

Because I generally saw earlier packages in the graph reported, I
assumed we were reporting these errors bottom up.
It turns out, we are reporting them in the `UnitGraph`s order, which is
non-deterministic because it is built on a `HashMap`.

So this adds determinism and shows all incompatible dependencies
(not just the bottom or the root).

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

This is a first step.
We might find that we still want to only include the shallowest units,
rather than all.
At that point, we can add the complexity to address this by walking the
unit graph.

We could also further improve this by querying the index to suggest
compatible versions of packages.

The multi-package test wasn't split out into its own commit because hat would have required fixing the non-determinism one way to then just revert it when we fix it this way.

### Additional information
2024-03-01 21:42:27 +00:00
bors 0342c44f21 Auto merge of #13515 - weihanglo:index-cache, r=epage
refactor: abstract `std::fs` away from on-disk index cache
2024-03-01 20:51:55 +00:00
Weihang Lo 330c6dcd66
refactor(index): pass pkg name to cache manager instead of relative paths 2024-03-01 15:31:00 -05:00
Weihang Lo be1bee1aa2
refactor(index): abstract std::fs away from cache operations 2024-03-01 15:30:59 -05:00
Weihang Lo 4614a6eb59
refactor(index): move local only params into Summaries::parse 2024-03-01 14:24:32 -05:00
Weihang Lo abb38bde62
refactor(index): break on-disk cache out to its own module 2024-03-01 14:22:33 -05:00
Weihang Lo dbf15d430c
refactor(index): move registry/index.rs to a mod directory 2024-03-01 14:22:28 -05:00
Ed Page 90a681dcb8 fix(msrv): Report all incompatible packages, not just a random one
In #9930, it recommended improving the error for incompatible packages
so people can better get to the root of the problem.
For example, you might get an error about `clap_lex` but resolving the
error for the higher level `clap` could make the problem with `clap_lex`
go away.

Because I generally saw earlier packages in the graph reported, I
assumed we were reporting these errors bottom up.
It turns out, we are reporting them in the `UnitGraph`s order, which is
non-deterministic because it is built on a `HashMap`.

So this adds determinism and shows all incompatible dependencies
(not just the bottom or the root).
This is a first step.
We might find that we still want to only include the shallowest units,
rather than all.
At that point, we can add the complexity to address this by walking the
unit graph.

We could also further improve this by querying the index to suggest
compatible versions of packages.
2024-03-01 12:28:41 -06:00
Ed Page 41449f771b test(msrv): Use variables 2024-03-01 12:13:38 -06:00
bors 6994f62410 Auto merge of #13507 - rust-lang:renovate/compatible, r=epage
chore(deps): update compatible

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

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [annotate-snippets](https://togithub.com/rust-lang/annotate-snippets-rs) | workspace.dependencies | patch | `0.10.1` -> `0.10.2` |
| [anstream](https://togithub.com/rust-cli/anstyle) | workspace.dependencies | patch | `0.6.11` -> `0.6.13` |
| [anyhow](https://togithub.com/dtolnay/anyhow) | workspace.dependencies | patch | `1.0.79` -> `1.0.80` |
| [curl](https://togithub.com/alexcrichton/curl-rust) | workspace.dependencies | patch | `0.4.44` -> `0.4.46` |
| [curl-sys](https://togithub.com/alexcrichton/curl-rust) | workspace.dependencies | patch | `0.4.71` -> `0.4.72+curl-8` |
| [openssl](https://togithub.com/sfackler/rust-openssl) | workspace.dependencies | patch | `0.10.63` -> `0.10.64` |
| [pkg-config](https://togithub.com/rust-lang/pkg-config-rs) | workspace.dependencies | patch | `0.3.29` -> `0.3.30` |
| [semver](https://togithub.com/dtolnay/semver) | workspace.dependencies | patch | `1.0.21` -> `1.0.22` |
| [serde](https://serde.rs) ([source](https://togithub.com/serde-rs/serde)) | workspace.dependencies | patch | `1.0.196` -> `1.0.197` |
| [serde_json](https://togithub.com/serde-rs/json) | workspace.dependencies | patch | `1.0.113` -> `1.0.114` |
| [snapbox](https://togithub.com/assert-rs/trycmd/tree/main/crates/snapbox) ([source](https://togithub.com/assert-rs/trycmd)) | workspace.dependencies | patch | `0.5.6` -> `0.5.7` |
| [tempfile](https://stebalien.com/projects/tempfile-rs/) ([source](https://togithub.com/Stebalien/tempfile)) | workspace.dependencies | minor | `3.9.0` -> `3.10.1` |
| [thiserror](https://togithub.com/dtolnay/thiserror) | workspace.dependencies | patch | `1.0.56` -> `1.0.57` |
| [toml_edit](https://togithub.com/toml-rs/toml) | workspace.dependencies | patch | `0.22.4` -> `0.22.6` |

---

### Release Notes

<details>
<summary>rust-lang/annotate-snippets-rs (annotate-snippets)</summary>

### [`v0.10.2`](https://togithub.com/rust-lang/annotate-snippets-rs/blob/HEAD/CHANGELOG.md#0102---2024-02-29)

[Compare Source](https://togithub.com/rust-lang/annotate-snippets-rs/compare/0.10.1...0.10.2)

##### Added

-   Added `testing-colors` feature to remove platform-specific colors when testing
    [#&#8203;82](https://togithub.com/rust-lang/annotate-snippets-rs/pull/82)

</details>

<details>
<summary>rust-cli/anstyle (anstream)</summary>

### [`v0.6.13`](https://togithub.com/rust-cli/anstyle/compare/anstream-v0.6.12...anstream-v0.6.13)

[Compare Source](https://togithub.com/rust-cli/anstyle/compare/anstream-v0.6.12...anstream-v0.6.13)

### [`v0.6.12`](https://togithub.com/rust-cli/anstyle/compare/anstream-v0.6.11...anstream-v0.6.12)

[Compare Source](https://togithub.com/rust-cli/anstyle/compare/anstream-v0.6.11...anstream-v0.6.12)

</details>

<details>
<summary>dtolnay/anyhow (anyhow)</summary>

### [`v1.0.80`](https://togithub.com/dtolnay/anyhow/releases/tag/1.0.80)

[Compare Source](https://togithub.com/dtolnay/anyhow/compare/1.0.79...1.0.80)

-   Fix unused_imports warnings when compiled by rustc 1.78

</details>

<details>
<summary>alexcrichton/curl-rust (curl)</summary>

### [`v0.4.46`](https://togithub.com/alexcrichton/curl-rust/compare/0.4.45...0.4.46)

[Compare Source](https://togithub.com/alexcrichton/curl-rust/compare/0.4.45...0.4.46)

### [`v0.4.45`](https://togithub.com/alexcrichton/curl-rust/compare/0.4.44...0.4.45)

[Compare Source](https://togithub.com/alexcrichton/curl-rust/compare/0.4.44...0.4.45)

</details>

<details>
<summary>sfackler/rust-openssl (openssl)</summary>

### [`v0.10.64`](https://togithub.com/sfackler/rust-openssl/releases/tag/openssl-v0.10.64)

[Compare Source](https://togithub.com/sfackler/rust-openssl/compare/openssl-v0.10.63...openssl-v0.10.64)

##### What's Changed

-   Make \_STACK opaque for LibreSSL >= 3.9.0 by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2153](https://togithub.com/sfackler/rust-openssl/pull/2153)
-   enable x509 verify and groups list for boringssl by [`@&#8203;zh-jq](https://togithub.com/zh-jq)` in [https://github.com/sfackler/rust-openssl/pull/2155](https://togithub.com/sfackler/rust-openssl/pull/2155)
-   Cleanup some not-required Path::new invocations by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2158](https://togithub.com/sfackler/rust-openssl/pull/2158)
-   fixed a clippy (nightly) warning by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2161](https://togithub.com/sfackler/rust-openssl/pull/2161)
-   Bump actions versions by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2162](https://togithub.com/sfackler/rust-openssl/pull/2162)
-   Add support for setting the nonce type and digest on a PKEY_CTX by [`@&#8203;facutuesca](https://togithub.com/facutuesca)` in [https://github.com/sfackler/rust-openssl/pull/2144](https://togithub.com/sfackler/rust-openssl/pull/2144)
-   rebuild openssl-sys if the underlying openssl has changed by [`@&#8203;reaperhulk](https://togithub.com/reaperhulk)` in [https://github.com/sfackler/rust-openssl/pull/2157](https://togithub.com/sfackler/rust-openssl/pull/2157)
-   Added binding for EVP_default_properties_enable_fips by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2168](https://togithub.com/sfackler/rust-openssl/pull/2168)
-   LibreSSL 3.9: fix CRYPTO_malloc/free signatures by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2170](https://togithub.com/sfackler/rust-openssl/pull/2170)
-   Expose alias on X509 structs by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2167](https://togithub.com/sfackler/rust-openssl/pull/2167)
-   bump openssl and openssl-sys + changelogs by [`@&#8203;reaperhulk](https://togithub.com/reaperhulk)` in [https://github.com/sfackler/rust-openssl/pull/2175](https://togithub.com/sfackler/rust-openssl/pull/2175)

**Full Changelog**: https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.63...openssl-v0.10.64

</details>

<details>
<summary>rust-lang/pkg-config-rs (pkg-config)</summary>

### [`v0.3.30`](https://togithub.com/rust-lang/pkg-config-rs/blob/HEAD/CHANGELOG.md#0330---2024-02-14)

[Compare Source](https://togithub.com/rust-lang/pkg-config-rs/compare/0.3.29...0.3.30)

##### Changed

-   Update documentation for cross-compilation ([#&#8203;161](https://togithub.com/rust-lang/pkg-config-rs/issues/161)).

-   Update GitHub Action CI ([#&#8203;160](https://togithub.com/rust-lang/pkg-config-rs/issues/160)).

</details>

<details>
<summary>dtolnay/semver (semver)</summary>

### [`v1.0.22`](https://togithub.com/dtolnay/semver/releases/tag/1.0.22)

[Compare Source](https://togithub.com/dtolnay/semver/compare/1.0.21...1.0.22)

-   Fix unused_imports warnings when compiled by rustc 1.78

</details>

<details>
<summary>serde-rs/serde (serde)</summary>

### [`v1.0.197`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.197)

[Compare Source](https://togithub.com/serde-rs/serde/compare/v1.0.196...v1.0.197)

-   Fix unused_imports warnings when compiled by rustc 1.78
-   Optimize code size of some Display impls ([#&#8203;2697](https://togithub.com/serde-rs/serde/issues/2697), thanks [`@&#8203;nyurik](https://togithub.com/nyurik))`

</details>

<details>
<summary>serde-rs/json (serde_json)</summary>

### [`v1.0.114`](https://togithub.com/serde-rs/json/releases/tag/v1.0.114)

[Compare Source](https://togithub.com/serde-rs/json/compare/v1.0.113...v1.0.114)

-   Fix unused_imports warnings when compiled by rustc 1.78

</details>

<details>
<summary>assert-rs/trycmd (snapbox)</summary>

### [`v0.5.7`](https://togithub.com/assert-rs/trycmd/compare/snapbox-v0.5.6...snapbox-v0.5.7)

[Compare Source](https://togithub.com/assert-rs/trycmd/compare/snapbox-v0.5.6...snapbox-v0.5.7)

</details>

<details>
<summary>Stebalien/tempfile (tempfile)</summary>

### [`v3.10.1`](https://togithub.com/Stebalien/tempfile/blob/HEAD/CHANGELOG.md#3101)

[Compare Source](https://togithub.com/Stebalien/tempfile/compare/v3.10.0...v3.10.1)

-   Handle potential integer overflows in 32-bit systems when seeking/truncating "spooled" temporary files past 4GiB (2³²).
-   Handle a theoretical 32-bit overflow when generating a temporary file name larger than 4GiB. Now it'll panic (on allocation failure) rather than silently succeeding due to wraparound.

Thanks to [`@&#8203;stoeckmann](https://togithub.com/stoeckmann)` for finding and fixing both of these issues.

### [`v3.10.0`](https://togithub.com/Stebalien/tempfile/blob/HEAD/CHANGELOG.md#3100)

[Compare Source](https://togithub.com/Stebalien/tempfile/compare/v3.9.0...v3.10.0)

-   Drop `redox_syscall` dependency, we now use `rustix` for Redox.
-   Add `Builder::permissions` for setting the permissions on temporary files and directories (thanks to [`@&#8203;Byron](https://togithub.com/Byron)).`
-   Update rustix to 0.38.31.
-   Update fastrand to 2.0.1.

</details>

<details>
<summary>dtolnay/thiserror (thiserror)</summary>

### [`v1.0.57`](https://togithub.com/dtolnay/thiserror/releases/tag/1.0.57)

[Compare Source](https://togithub.com/dtolnay/thiserror/compare/1.0.56...1.0.57)

-   Generate more efficient `Display` impl for error message which do not contain any interpolated value ([#&#8203;286](https://togithub.com/dtolnay/thiserror/issues/286), thanks [`@&#8203;nyurik](https://togithub.com/nyurik))`

</details>

<details>
<summary>toml-rs/toml (toml_edit)</summary>

### [`v0.22.6`](https://togithub.com/toml-rs/toml/compare/v0.22.5...v0.22.6)

[Compare Source](https://togithub.com/toml-rs/toml/compare/v0.22.5...v0.22.6)

### [`v0.22.5`](https://togithub.com/toml-rs/toml/compare/v0.22.4...v0.22.5)

[Compare Source](https://togithub.com/toml-rs/toml/compare/v0.22.4...v0.22.5)

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjAuMiIsInVwZGF0ZWRJblZlciI6IjM3LjIyMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
2024-03-01 17:20:35 +00:00
Ed Page 96e891c89a chore: Remove metadata from version requirement 2024-03-01 10:29:10 -06:00
bors b2208ec0d1 Auto merge of #13510 - rust-lang:renovate/rusqlite-0.x, r=epage
chore(deps): update rust crate rusqlite to 0.31.0

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

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [rusqlite](https://togithub.com/rusqlite/rusqlite) | workspace.dependencies | minor | `0.30.0` -> `0.31.0` |

---

### Release Notes

<details>
<summary>rusqlite/rusqlite (rusqlite)</summary>

### [`v0.31.0`](https://togithub.com/rusqlite/rusqlite/releases/tag/v0.31.0): 0.31.0

[Compare Source](https://togithub.com/rusqlite/rusqlite/compare/v0.30.0...v0.31.0)

#### What's Changed

-   Check sqlite3\_reset result [#&#8203;1419](https://togithub.com/rusqlite/rusqlite/issues/1419)
-   Improve wasm32-wasi support [#&#8203;1332](https://togithub.com/rusqlite/rusqlite/issues/1332)
-   test_from_handle fails to build on systems with unsigned c_char [#&#8203;1420](https://togithub.com/rusqlite/rusqlite/issues/1420)
-   Fix features required by loadable_extension example [#&#8203;1426](https://togithub.com/rusqlite/rusqlite/issues/1426)
-   Fix bind macro [#&#8203;1427](https://togithub.com/rusqlite/rusqlite/issues/1427)
-   Fix uninlined_format_args [#&#8203;1428](https://togithub.com/rusqlite/rusqlite/issues/1428)
-   Remove modern_sqlite and vtab from CI in loadable ext [#&#8203;1429](https://togithub.com/rusqlite/rusqlite/issues/1429)
-   Add `#[derive(Clone, Copy...` on all bitflags [#&#8203;1396](https://togithub.com/rusqlite/rusqlite/issues/1396)
-   Use DLL_PREFIX / DLL_SUFFIX [#&#8203;1431](https://togithub.com/rusqlite/rusqlite/issues/1431)
-   Add missing doc for new features [#&#8203;1434](https://togithub.com/rusqlite/rusqlite/issues/1434)
-   Upgrade to hashlink 0.9 [#&#8203;1435](https://togithub.com/rusqlite/rusqlite/issues/1435)
-   Drop winsqlite3 feature [#&#8203;1433](https://togithub.com/rusqlite/rusqlite/issues/1433)
-   Expose the include directory of the bundled sqlite version [#&#8203;1441](https://togithub.com/rusqlite/rusqlite/issues/1441)
-   Bump bundled SQLite version to 3.45.1 [#&#8203;1445](https://togithub.com/rusqlite/rusqlite/issues/1445)
-   Fix a few typos [#&#8203;1446](https://togithub.com/rusqlite/rusqlite/issues/1446)
-   Make possible to specify subtype of SQL function [#&#8203;1160](https://togithub.com/rusqlite/rusqlite/issues/1160)

**Full Changelog**: https://github.com/rusqlite/rusqlite/compare/v0.30.0...v0.31.0

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjAuMiIsInVwZGF0ZWRJblZlciI6IjM3LjIyMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
2024-03-01 16:12:56 +00:00
bors 5cd4198197 Auto merge of #13512 - LuuuXXX:issue-5805, r=weihanglo
[docs]: Clarify vendored sources as read-only and way to modify

What does this PR try to resolve?

To document that vendored sources are not intended to be modified, and `[patch]` or a `path` dependency is the correct way to modify a vendored crate.

https://github.com/rust-lang/cargo/issues/5805#issuecomment-1868049928
2024-03-01 15:08:27 +00:00
LuuuX 13e72b9e8a docs: Clarify vendored sources as read-only and way to modify 2024-03-01 22:20:16 +08:00
renovate[bot] 8a280bbef7
chore(deps): update compatible 2024-03-01 02:50:21 +00:00
bors 3bb069775f Auto merge of #13511 - rust-lang:renovate/supports-hyperlinks-3.x, r=weihanglo
chore(deps): update rust crate supports-hyperlinks 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-hyperlinks](https://togithub.com/zkat/supports-hyperlinks) | workspace.dependencies | major | `2.1.0` -> `3.0.0` |

---

### Release Notes

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

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

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

##### Features

-   **deps:** Use `std::io::IsTerminal` instead of `is-terminal`. ([#&#8203;4](https://togithub.com/zkat/supports-hyperlinks/issues/4)) ([fb84fe60](fb84fe6022))
    -   **BREAKING CHANGE**: This bumps the MSRV to 1.70.0

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjAuMiIsInVwZGF0ZWRJblZlciI6IjM3LjIyMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
2024-03-01 02:19:54 +00:00
renovate[bot] ae0894d7df
chore(deps): update rust crate supports-hyperlinks to v3 2024-03-01 02:01:55 +00:00
renovate[bot] fb2874c129
chore(deps): update rust crate rusqlite to 0.31.0 2024-03-01 02:01:47 +00:00
bors ea22fe5d6f Auto merge of #13506 - epage:context, r=weihanglo
refactor: Clarify more Config -> Context

### What does this PR try to resolve?

This is a follow up to #13409 and #13486

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

### Additional information
2024-03-01 01:49:07 +00:00
Ed Page a7ba26b90b docs: Update ToC for Config -> Context 2024-02-29 16:24:07 -06:00
Ed Page 67b5aa4205 refactor(context): Rename config mod to context 2024-02-29 16:08:08 -06:00
Ed Page c8b10743ba refactor(cli): Update CLI/config merge to use gctx 2024-02-29 15:54:36 -06:00
Ed Page 768c70a744 fix(toml): Give MSRV-aware guidance 2024-02-29 15:48:41 -06:00
Ed Page 58801a832b refactor(toml): Group Edition validation 2024-02-29 15:48:41 -06:00
Ed Page 1d3d4a788d refactor(toml): Decouple rust-version reading from edition validation 2024-02-29 15:48:41 -06:00
Ed Page 0f9d4a352a feat(toml): Warn on unset Edition 2024-02-29 15:48:41 -06:00
Ed Page 0955a80a07 test(manifest): Verify unset edition 2024-02-29 15:48:41 -06:00
Ed Page 1b6ff9a62a test: Make edition explicit on packages
This is a follow up to 14646e6af6

I don't run these tests locally, so I missed them.
2024-02-29 15:48:41 -06:00
bors ecb8193f8d Auto merge of #13504 - epage:edition-test, r=weihanglo
test: Make `edition` explicit in packages

### What does this PR try to resolve?

This ensures we don't rely on the edition default for manifests, unblocking the door for warning on unset editions.

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

### Additional information

Alternatives considered
- Augment test output for the new warnings: figured we'd want tests closer to our intention and this seemed more work to update everything
- Make a builder API for generating manifests, allowing us to change the default in one place.  Still an interesting idea but a lot of work for this one change.

Risks
- I missed that a test was specifically for unset edition but that is unlikely of a case to come up
2024-02-29 18:23:47 +00:00
bors c21dd51b0f Auto merge of #13481 - GuillaumeGomez:extern-map-fix, r=weihanglo
Add all unit's children recursively for `doc.extern-map` option

Fixes https://github.com/rust-lang/rust/issues/120993.

It allows to fix link generation of reexport of foreign items when deps documentation is not generated. Sometimes, we need to have information about not only direct dependencies but also of dependencies of these direct dependencies and so on.
2024-02-29 02:30:13 +00:00
bors 5a5ee9aed4 Auto merge of #13499 - epage:always-edition, r=weihanglo
fix(rustc): Always pass --edition to rustc

On [Internals](https://internals.rust-lang.org/t/idea-rustc-cargo-should-warn-on-unspecified-edition/20309), the idea came up for warning on unset Edition.
I am working on the cargo warning but if rustc ever wants to do so, they'd be blocked on cargo ensuring `--edition` is always set. Hence this change.
2024-02-29 01:48:34 +00:00
Ed Page 831847e5f0 fix(rustc): Always pass --edition to rustc
On [Internals](https://internals.rust-lang.org/t/idea-rustc-cargo-should-warn-on-unspecified-edition/20309),
the idea came up for warning on unset Edition.
I am working on the cargo warning but if rustc ever wants to do so,
they'd be blocked on cargo ensuring `--edition` is always set.
Hence this change.
2024-02-28 15:35:41 -06:00
bors a3ba4ee28a Auto merge of #13438 - Urgau:check-cfg-msrv-annoyance, r=ehuss
Silently ignore `cargo::rustc-check-cfg` to avoid MSRV annoyance when stabilizing `-Zcheck-cfg`

This PR, removes the warning when trying to use `cargo::rustc-check-cfg` on stable or nightly (without the nightly-only `-Zcheck-cfg` flag) to avoid MSRV annoyance when stabilizing `-Zcheck-cfg`.

See this [Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/check-cfg.20backwards.20compatible.20warnings) for more information and context.

cc `@ehuss`
2024-02-28 15:14:12 +00:00
bors 8964c8ccff Auto merge of #13340 - linyihai:Z-public, r=epage
feat: Add "-Zpublic-dependency" for public-dependency feature.

### What does this PR try to resolve?
Part of https://github.com/rust-lang/cargo/issues/13308, include:
- Switching the cargo-features to a -Z
- Warning if public is used without -Z and setting it to false

These had not done yet:
- We should also warn if the data type changes but that is less likely to happen and could possibly be skipped
- Ensuring the published version of the package does not have public

### How should we test and review this PR?
All test case should be pass.

### Additional information

r? `@epage`
2024-02-27 19:22:46 +00:00
bors 98f6bf3700 Auto merge of #13492 - ehuss:stabilize-gc-collect, r=weihanglo
Stabilize global cache data tracking.

This stabilizes the global cache last-use data tracking. This does not stabilize automatic or manual gc.

Tracking issue: https://github.com/rust-lang/cargo/issues/12633

## Motivation

The intent is to start getting cargo to collect data so that when we do stabilize automatic gc, there will be a wider range of cargo versions that will be updating the data so the user is less likely to see cache misses due to an over-aggressive gc.

Additionally, this should give us more exposure and time to respond to any problems, such as filesystem issues.

## What is stabilized?

Cargo will now automatically create and update an SQLite database, located at `$CARGO_HOME/.global-cache`. This database tracks timestamps of the last time cargo touched an index, `.crate` file, extracted crate `src` directory, git clone, or git checkout. The schema for this database is [here](a7e9347926/src/cargo/core/global_cache_tracker.rs (L233-L307)).

Cargo updates this file on any command that needs to touch any of those on-disk caches.

The testsuite for this feature is located in [`global_cache_tracker.rs`](a7e9347926/tests/testsuite/global_cache_tracker.rs).

## Stabilization risks

There are some risks to stabilizing, since it commits us to staying compatible with the current design.

The concerns I can think of with stabilizing:

This commits us to using the database schema in the current design.

The code is designed to support both backwards and forwards compatible extensions, so I think it should be fairly flexible. Worst case, if we need to make changes that are fundamentally incompatible, then we can switch to a different database filename or tracking approach.

There are certain kinds of errors that are ignored if cargo fails to save the tracking data (see [`is_silent_error`](64ccff290f/src/cargo/core/global_cache_tracker.rs (L1796-L1813))).

The silent errors are only shown with --verbose. This should help deal with read-only filesystem mounts and other issues. Non-silent errors always show just a warning. I don't know if that will be sufficient to avoid problems.

I did a fair bit of testing of performance, and there is a bench suite for this code, but we don't know if there will be pathological problems in the real world. It also incurs an overhead that all builds will have to pay for.

I've done my best to ensure that this should be reliable when used on network or unusual filesystems, but I think those are still a high-risk category. SQLite should be configured to accommodate these cases, as well as the extensive locking code (which has already been enabled).

A call for public testing was announced in December at https://blog.rust-lang.org/2023/12/11/cargo-cache-cleaning.html. At this time, I don't see any issues in https://github.com/rust-lang/cargo/labels/Z-gc that should block this step.
2024-02-27 16:32:36 +00:00
bors bf5acf8e58 Auto merge of #13494 - weihanglo:bump-versions, r=epage
chore: bump baseline version requirement of sub crates
2024-02-27 01:41:44 +00:00
Weihang Lo edd2821f46
chore: bump baseline version requirement of sub crates
While we can just bump to the latest versions, this time we do a
conservative one for some crates.

* `cargo-util` --- 0.2.10 to 0.2.11 contain only comment changes.
* `cargo-platform` --- 0.1.6 to 0.1.8 contain only lint and metadata changes
2024-02-26 18:38:49 -05:00
Lin Yihai 01de3e0fe7 feat: Add "-Zpublic-dependency" for public-dependency feature 2024-02-27 05:10:17 +08:00
Eric Huss 39863e7f54 Stabilize global cache data tracking. 2024-02-26 11:37:54 -08:00
bors a7e9347926 Auto merge of #13490 - weihanglo:rustdoc-shared-libs, r=epage
fix(doctest): search native libs in build script outputs
2024-02-26 16:31:48 +00:00
bors cc6e32665e Auto merge of #13489 - linyihai:typo-two, r=weihanglo
chore: fixed a typo(two->too)

### What does this PR try to resolve?
typo: `for two long` corrected by `for too long`

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

### Additional information
2024-02-26 13:53:48 +00:00
Weihang Lo 34215b1b4a
fix: doctest searches native libs in build script outputs
HACK: `rustdoc --test` not only compiles but executes doctests.
Ideally only execution phase should have search paths appended,
so the executions can find native libs just like other tests.
However, there is no way to separate these two phase, so this
hack is added for both phases.
2024-02-25 22:55:44 -05:00
Lin Yihai 4ca0524539 chore: fixed a typo(two->too) 2024-02-26 11:39:33 +08:00
Weihang Lo 0e8a67fde3
test(doctest): doctest doesn't set shared libs to search path
This new test demonstrate the current behavior.
2024-02-25 19:29:05 -05:00
Weihang Lo 91f75ac4bb
refactor: enum to represent kinds of tools being run 2024-02-25 19:29:05 -05:00
Urgau da5900740e Silently ignore cargo::rustc-check-cfg to avoid MSRV annoyance 2024-02-24 19:52:52 +01:00
bors f415cb2088 Auto merge of #13488 - weihanglo:snapbox, r=Muscraft
test: relax help text assertion
2024-02-24 17:31:10 +00:00
Weihang Lo 81b3b5ad4f
test: relax help text assertion
When running test in rust-lang/rust via `./x test src/tool/cargo`,
there is no rustup integrated.
2024-02-24 11:50:41 -05:00