Commit graph

16383 commits

Author SHA1 Message Date
bors b97cffe069 Auto merge of #13080 - epage:toml, r=weihanglo
refactor(toml): Decouple logic from schema

### What does this PR try to resolve?

This tries to decouple cargo logic from the schemas so we can split the schemas out into a separate crate for #12801

Profile layering was one of the few pieces of logic I kept in the schema, assuming its general enough / decoupled enough from cargo policies.

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

Each step is broken down into its own commit for easier analysis

### Additional information
2023-12-01 18:48:37 +00:00
bors 78109c0d2c Auto merge of #13071 - LuuuXXX:issue-11010, r=epage
Have cargo add --optional <dep> create a <dep> = "dep:<dep> feature

### What does this PR try to resolve?

`cargo add --optional <dep>` would create a `<dep> = "dep:<dep>` feature iff

- `rust-version` is unset or is new enough for the syntax
- `dep:<dep>` doesn't already exist

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

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

As the `dep:` syntax is only available starting with Rust 1.60. this pr maintains the previous usage convention in the earlier version.

run

```shell
cargo add --optional <dep>
```

with different rust-version to verify.
2023-12-01 18:13:54 +00:00
LuuuX 036a03709b Fix issue-11010 2023-12-02 01:36:16 +08:00
bors 60e65eefb2 Auto merge of #13046 - linyihai:cargo-add-public, r=epage
Add `--public` for `cargo add`

## What does this PR try to resolve?
Complete https://github.com/rust-lang/cargo/issues/13037

This PR want to add `--public/--no public` flag for `cargo add`

Note: this assumes we'll remove workspace inheritance support for `public` as it sounds like we'll be reverting it https://github.com/rust-lang/rust/issues/44663#issuecomment-1826474620.  If we decide to keep workspace inheritance, we'll need to come back and update this.

## How should we test and review this PR?
Most of Code were reference `cargo add --optional`, So can reviewed the new code based on the part of  `optional` code.

The new testcases were origin from the `cargo add --optional` part.
- `public` testcase:there is no dependencies and will be add `public` dependencies.
- `no_public` testcase:  there is no dependencies  and will be add `no_public` dependencies.
- `overwrite_public` testcase: the dependencies already exists but will be overwrite with `public`.
- `overwrite_no_public` testcase: the dependencies already exists but will be overwrite with `no_public`.
- `overwrite_public_with_no_public` testcase: the dependencies already marked as `no_public` and will be overwrite with `public`.
- `overwrite_no_public_with_public` testcase: the dependencies already marked as `public` and will be overwrite with `no_public`.
2023-12-01 17:33:20 +00:00
renovate[bot] ab6adab01b
chore(deps): update compatible 2023-12-01 17:33:18 +00:00
bors 3d98b5e749 Auto merge of #13088 - rust-lang:renovate/toml_edit-0.x, r=epage
chore(deps): update rust crate toml_edit to 0.21.0

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

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [toml_edit](https://togithub.com/toml-rs/toml) | workspace.dependencies | minor | `0.20.7` -> `0.21.0` |

---

### Release Notes

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

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

[Compare Source](https://togithub.com/toml-rs/toml/compare/v0.20.7...v0.21.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:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->
2023-12-01 16:55:15 +00:00
Ed Page 28f36c7a64 refactor: Clarify direct-construction function for PackageId 2023-12-01 10:49:59 -06:00
Ed Page 378502bf20 refactor: Try to make PackageId conversion clearer 2023-12-01 10:48:14 -06:00
bors ea633818b2 Auto merge of #13087 - rust-lang:renovate/rusqlite-0.x, r=epage
chore(deps): update rust crate rusqlite to 0.30.0

[![Mend Renovate logo banner](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.29.0` -> `0.30.0` |

---

### Release Notes

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

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

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

#### What's Changed

-   Fix sqlite3\_auto_extension xEntryPoint signature [#&#8203;1310](https://togithub.com/rusqlite/rusqlite/issues/1310)
-   Use track_caller for panicking methods [#&#8203;1314](https://togithub.com/rusqlite/rusqlite/issues/1314)
-   Force linking against system sqlite libs [#&#8203;1317](https://togithub.com/rusqlite/rusqlite/issues/1317)
-   fix compilation for target wasm32-wasi [#&#8203;1321](https://togithub.com/rusqlite/rusqlite/issues/1321)
-   Add SQLITE_MAX_COLUMN compile-time option [#&#8203;1324](https://togithub.com/rusqlite/rusqlite/issues/1324)
-   Upgrade http links to https in Cargo.toml [#&#8203;1330](https://togithub.com/rusqlite/rusqlite/issues/1330)
-   Update fallible-iterator requirement from 0.2 to 0.3 [#&#8203;1334](https://togithub.com/rusqlite/rusqlite/issues/1334)
-   Implement FromSql & ToSql for std::num::NonZero types [#&#8203;1313](https://togithub.com/rusqlite/rusqlite/issues/1313)
-   Add new constants introduced by SQLite 3.42.0 [#&#8203;1336](https://togithub.com/rusqlite/rusqlite/issues/1336)
-   Use SQLITE_PREPARE_PERSISTENT for CachedStatement [#&#8203;1339](https://togithub.com/rusqlite/rusqlite/issues/1339)
-   Fix type of SQLITE_DESERIALIZE\_*, SQLITE_PREPARE\_*, SQLITE_SERIALIZE_\* [#&#8203;1340](https://togithub.com/rusqlite/rusqlite/issues/1340)
-   Introduce to_sqlite_error [#&#8203;1345](https://togithub.com/rusqlite/rusqlite/issues/1345)
-   remove depth from Savepoint [#&#8203;1327](https://togithub.com/rusqlite/rusqlite/issues/1327)
-   Savepoint Drop bug [#&#8203;1347](https://togithub.com/rusqlite/rusqlite/issues/1347)
-   \[breaking change] Update edition from 2018 to 2021 [#&#8203;1267](https://togithub.com/rusqlite/rusqlite/issues/1267)
-   Remove msrv for clippy by [#&#8203;1351](https://togithub.com/rusqlite/rusqlite/issues/1351)
-   Tweak bindgen [#&#8203;1352](https://togithub.com/rusqlite/rusqlite/issues/1352), [#&#8203;1353](https://togithub.com/rusqlite/rusqlite/issues/1353)
-   Inline constraint_error_code [#&#8203;1359](https://togithub.com/rusqlite/rusqlite/issues/1359)
-   Simplify bindgen generation [#&#8203;1360](https://togithub.com/rusqlite/rusqlite/issues/1360)
-   Fixes generate_series to handle NULL arguments [#&#8203;1357](https://togithub.com/rusqlite/rusqlite/issues/1357)
-   Factorize code in build.rs [#&#8203;1361](https://togithub.com/rusqlite/rusqlite/issues/1361)
-   Serialize and deserialize database [#&#8203;1341](https://togithub.com/rusqlite/rusqlite/issues/1341)
-   Spelling and a few more nits [#&#8203;1373](https://togithub.com/rusqlite/rusqlite/issues/1373)
-   Implement support for more `time` types [#&#8203;1374](https://togithub.com/rusqlite/rusqlite/issues/1374)
-   Fix visibility of TransactionState [#&#8203;1384](https://togithub.com/rusqlite/rusqlite/issues/1384)
-   Column is used only with column_decltype feature [#&#8203;1385](https://togithub.com/rusqlite/rusqlite/issues/1385)
-   Use proper var names in trait definition [#&#8203;1398](https://togithub.com/rusqlite/rusqlite/issues/1398)
-   Fix clippy warning: arc_with_non_send_sync - interrupt_lock [#&#8203;1400](https://togithub.com/rusqlite/rusqlite/issues/1400)
-   Captured identifiers in SQL strings [#&#8203;1346](https://togithub.com/rusqlite/rusqlite/issues/1346)
-   Add new constants introduced by SQLite 3.43.0 [#&#8203;1405](https://togithub.com/rusqlite/rusqlite/issues/1405)
-   Make WindowAggregate::value pass mutable value ref [#&#8203;1395](https://togithub.com/rusqlite/rusqlite/issues/1395)
-   Bump bundled SQLite version to 3.44.0 [#&#8203;1409](https://togithub.com/rusqlite/rusqlite/issues/1409)
-   Bump bindgen version to 0.69 [#&#8203;1410](https://togithub.com/rusqlite/rusqlite/issues/1410)
-   Loadable extension [#&#8203;1362](https://togithub.com/rusqlite/rusqlite/issues/1362)

#### New Contributors

-   [`@&#8203;icp1994](https://togithub.com/icp1994)` made their first contribution in [https://github.com/rusqlite/rusqlite/pull/1317](https://togithub.com/rusqlite/rusqlite/pull/1317)
-   [`@&#8203;wasm-forge](https://togithub.com/wasm-forge)` made their first contribution in [https://github.com/rusqlite/rusqlite/pull/1321](https://togithub.com/rusqlite/rusqlite/pull/1321)
-   [`@&#8203;nopjia](https://togithub.com/nopjia)` made their first contribution in [https://github.com/rusqlite/rusqlite/pull/1324](https://togithub.com/rusqlite/rusqlite/pull/1324)
-   [`@&#8203;Benjins-automation](https://togithub.com/Benjins-automation)` made their first contribution in [https://github.com/rusqlite/rusqlite/pull/1330](https://togithub.com/rusqlite/rusqlite/pull/1330)
-   [`@&#8203;itsxaos](https://togithub.com/itsxaos)` made their first contribution in [https://github.com/rusqlite/rusqlite/pull/1313](https://togithub.com/rusqlite/rusqlite/pull/1313)
-   [`@&#8203;Taywee](https://togithub.com/Taywee)` made their first contribution in [https://github.com/rusqlite/rusqlite/pull/1327](https://togithub.com/rusqlite/rusqlite/pull/1327)
-   [`@&#8203;davidselassie](https://togithub.com/davidselassie)` made their first contribution in [https://github.com/rusqlite/rusqlite/pull/1357](https://togithub.com/rusqlite/rusqlite/pull/1357)
-   [`@&#8203;nyurik](https://togithub.com/nyurik)` made their first contribution in [https://github.com/rusqlite/rusqlite/pull/1373](https://togithub.com/rusqlite/rusqlite/pull/1373)
-   [`@&#8203;nydrani](https://togithub.com/nydrani)` made their first contribution in [https://github.com/rusqlite/rusqlite/pull/1374](https://togithub.com/rusqlite/rusqlite/pull/1374)

**Full Changelog**: https://github.com/rusqlite/rusqlite/compare/v0.29.0...v0.30.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:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->
2023-12-01 16:15:43 +00:00
Ed Page ed83ee0a2f chore(ci): Always update gix packages together 2023-12-01 10:02:30 -06:00
bors c192d989b3 Auto merge of #13091 - weihanglo:trim-paths-lldb, r=epage
test(trim-paths): exercise with real world debugger
2023-12-01 15:47:10 +00:00
bors 847958971b Auto merge of #13053 - linyihai:cargo-uninstall-fixed, r=weihanglo
Fixed uninstall a running binary failed on Windows

### What does this PR try to resolve?
 Fixes https://github.com/rust-lang/cargo/issues/3364

The problem reproduce when you try to uninstall a running binary and it will failed on Windows,  this is because that cargo had already remove the installed binary tracker information in disk,  and next to remove the running binary but it is not allowed in Windows.  And to the worst,  you can not uninstall the binary already and only to reinstall it by the `--force` flag.

### How to solve the issue?
This PR try to make the uninstall a binary more reasonable that  only after remove the binary sucessfully then remove the tracker information on binary and make the remove binary one by one.

### How should we test and review this PR?
Add testcase 0fd4fd357b
- install the `foo`
- run `foo` in another thread.
- try to uninstall running `foo` and only failed in Windows.
- wait the `foo` finish, uninstall `foo`
- install the `foo`

### Additional information
2023-12-01 15:10:56 +00:00
Lin Yihai db144c9d0a Add tracker verification for test case uninstall_running_binary 2023-12-01 22:23:40 +08:00
Weihang Lo 5c32fe0432
test(trim-paths): exercise with real world debugger 2023-12-01 08:48:24 -05:00
renovate[bot] 5e61514ed3
chore(deps): update rust crate windows-sys to 0.52 2023-12-01 03:29:43 +00:00
renovate[bot] 40d85adcb9
chore(deps): update rust crate toml_edit to 0.21.0 2023-12-01 03:29:23 +00:00
bors e9ba4fe814 Auto merge of #13086 - rust-lang:renovate/itertools-0.x, r=weihanglo
chore(deps): update rust crate itertools to 0.12.0

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

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [itertools](https://togithub.com/rust-itertools/itertools) | workspace.dependencies | minor | `0.11.0` -> `0.12.0` |

---

### Release Notes

<details>
<summary>rust-itertools/itertools (itertools)</summary>

### [`v0.12.0`](https://togithub.com/rust-itertools/itertools/blob/HEAD/CHANGELOG.md#0120)

[Compare Source](https://togithub.com/rust-itertools/itertools/compare/v0.11.0...v0.12.0)

##### Breaking

-   Made `take_while_inclusive` consume iterator by value ([#&#8203;709](https://togithub.com/rust-itertools/itertools/issues/709))
-   Added `Clone` bound to `Unique` ([#&#8203;777](https://togithub.com/rust-itertools/itertools/issues/777))

##### Added

-   Added `Itertools::try_len` ([#&#8203;723](https://togithub.com/rust-itertools/itertools/issues/723))
-   Added free function `sort_unstable` ([#&#8203;796](https://togithub.com/rust-itertools/itertools/issues/796))
-   Added `GroupMap::fold_with` ([#&#8203;778](https://togithub.com/rust-itertools/itertools/issues/778), [#&#8203;785](https://togithub.com/rust-itertools/itertools/issues/785))
-   Added `PeekNth::{peek_mut, peek_nth_mut}` ([#&#8203;716](https://togithub.com/rust-itertools/itertools/issues/716))
-   Added `PeekNth::{next_if, next_if_eq}` ([#&#8203;734](https://togithub.com/rust-itertools/itertools/issues/734))
-   Added conversion into `(Option<A>,Option<B>)` to `EitherOrBoth` ([#&#8203;713](https://togithub.com/rust-itertools/itertools/issues/713))
-   Added conversion from `Either<A, B>` to `EitherOrBoth<A, B>` ([#&#8203;715](https://togithub.com/rust-itertools/itertools/issues/715))
-   Implemented `ExactSizeIterator` for `Tuples` ([#&#8203;761](https://togithub.com/rust-itertools/itertools/issues/761))
-   Implemented `ExactSizeIterator` for `(Circular)TupleWindows` ([#&#8203;752](https://togithub.com/rust-itertools/itertools/issues/752))
-   Made `EitherOrBoth<T>` a shorthand for `EitherOrBoth<T, T>` ([#&#8203;719](https://togithub.com/rust-itertools/itertools/issues/719))

##### Changed

-   Added missing `#[must_use]` annotations on iterator adaptors ([#&#8203;794](https://togithub.com/rust-itertools/itertools/issues/794))
-   Made `Combinations` lazy ([#&#8203;795](https://togithub.com/rust-itertools/itertools/issues/795))
-   Made `Intersperse(With)` lazy ([#&#8203;797](https://togithub.com/rust-itertools/itertools/issues/797))
-   Made `Permutations` lazy ([#&#8203;793](https://togithub.com/rust-itertools/itertools/issues/793))
-   Made `Product` lazy ([#&#8203;800](https://togithub.com/rust-itertools/itertools/issues/800))
-   Made `TupleWindows` lazy ([#&#8203;602](https://togithub.com/rust-itertools/itertools/issues/602))
-   Specialized `Combinations::{count, size_hint}` ([#&#8203;729](https://togithub.com/rust-itertools/itertools/issues/729))
-   Specialized `CombinationsWithReplacement::{count, size_hint}` ([#&#8203;737](https://togithub.com/rust-itertools/itertools/issues/737))
-   Specialized `Powerset::fold` ([#&#8203;765](https://togithub.com/rust-itertools/itertools/issues/765))
-   Specialized `Powerset::count` ([#&#8203;735](https://togithub.com/rust-itertools/itertools/issues/735))
-   Specialized `TupleCombinations::{count, size_hint}` ([#&#8203;763](https://togithub.com/rust-itertools/itertools/issues/763))
-   Specialized `TupleCombinations::fold` ([#&#8203;775](https://togithub.com/rust-itertools/itertools/issues/775))
-   Specialized `WhileSome::fold` ([#&#8203;780](https://togithub.com/rust-itertools/itertools/issues/780))
-   Specialized `WithPosition::fold` ([#&#8203;772](https://togithub.com/rust-itertools/itertools/issues/772))
-   Specialized `ZipLongest::fold` ([#&#8203;774](https://togithub.com/rust-itertools/itertools/issues/774))
-   Changed `{min, max}_set*` operations require `alloc` feature, instead of `std` ([#&#8203;760](https://togithub.com/rust-itertools/itertools/issues/760))
-   Improved documentation of `tree_fold1` ([#&#8203;787](https://togithub.com/rust-itertools/itertools/issues/787))
-   Improved documentation of `permutations` ([#&#8203;724](https://togithub.com/rust-itertools/itertools/issues/724))
-   Fixed typo in documentation of `multiunzip` ([#&#8203;770](https://togithub.com/rust-itertools/itertools/issues/770))

##### Notable Internal Changes

-   Improved specialization tests ([#&#8203;799](https://togithub.com/rust-itertools/itertools/issues/799), [#&#8203;786](https://togithub.com/rust-itertools/itertools/issues/786), [#&#8203;782](https://togithub.com/rust-itertools/itertools/issues/782))
-   Simplified implementation of `Permutations` ([#&#8203;739](https://togithub.com/rust-itertools/itertools/issues/739), [#&#8203;748](https://togithub.com/rust-itertools/itertools/issues/748), [#&#8203;790](https://togithub.com/rust-itertools/itertools/issues/790))
-   Combined `Merge`/`MergeBy`/`MergeJoinBy` implementations ([#&#8203;736](https://togithub.com/rust-itertools/itertools/issues/736))
-   Simplified `Permutations::size_hint` ([#&#8203;739](https://togithub.com/rust-itertools/itertools/issues/739))
-   Fix wrapping arithmetic in benchmarks ([#&#8203;770](https://togithub.com/rust-itertools/itertools/issues/770))
-   Enforced `rustfmt` in CI ([#&#8203;751](https://togithub.com/rust-itertools/itertools/issues/751))
-   Disallowed compile warnings in CI ([#&#8203;720](https://togithub.com/rust-itertools/itertools/issues/720))
-   Used `cargo hack` to check MSRV ([#&#8203;754](https://togithub.com/rust-itertools/itertools/issues/754))

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->
2023-12-01 03:28:45 +00:00
Lin Yihai 48c998fec7 Add detect_workspace_inherit_public test case. 2023-12-01 11:22:26 +08:00
Lin Yihai a6ca281948 chore: add lib.rs for new test cases 2023-12-01 10:21:33 +08:00
renovate[bot] 7025627162
chore(deps): update rust crate rusqlite to 0.30.0 2023-12-01 02:06:50 +00:00
renovate[bot] 48e3d6c330
chore(deps): update rust crate itertools to 0.12.0 2023-12-01 02:06:25 +00:00
bors dd5e47acd2 Auto merge of #13085 - ehuss:registry-support-more, r=epage
Add more options to registry test support.

This adds a few things that are missing in the registry test support code. These aren't immediately necessary, since no tests rely on them. However, I wrote it for something else that I ended up not needing, but I think it is still helpful for future work.

The additions are:

- Ability to specify `default-features=false` for a registry dependency.
- Include binary dependencies in the index for the `cargo publish` HTTTP server (current `cargo publish` tests use `file:///` upload, and don't verify the index).
- Include `rust-version` in the `cargo publish` HTTP server (current `cargo publish` tests don't verify the index).
- Include the `features=[…]` field for dependencies in the published `Cargo.toml` (cargo doesn't read features from `Cargo.toml`, it only uses the registry, but it is probably best to keep it in sync).
- Include the `package="…"` field for dependencies (for renamed dependencies) in the published `Cargo.toml` (similarly, cargo only uses the index, but it is probably good to keep in sync).
2023-12-01 01:24:10 +00:00
Eric Huss 1aa769240d Add more options to registry test support. 2023-11-30 16:39:08 -08:00
Ed Page 9bb7c97b31 refactor(toml): Make rest of TomlManifest logic free functions 2023-11-30 10:49:33 -06:00
Ed Page 89f8f5c77a refactor(toml): Make Dep's to_dependency_split a free function 2023-11-30 10:43:24 -06:00
bors 1ef8575839 Auto merge of #13077 - GuillaumeGomez:filter-workspace-scrape-example, r=epage
Don't filter on workspace members when scraping doc examples

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

I confirmed locally that it fixed the issue in docs.rs.

cc `@willcrichton`
r? `@epage`
2023-11-30 16:42:35 +00:00
Guillaume Gomez 689d9a7e4f Don't filter on workspace members when scraping doc examples 2023-11-30 17:38:49 +01:00
Guillaume Gomez 95a27cdbd1 Add regression test for scraped examples in crates without [workspace] 2023-11-30 17:36:46 +01:00
Lin Yihai 1e3b4231da chore: fixed clippy 2023-11-30 15:46:02 +08:00
Lin Yihai 26cf2740d7 Combine the behavior for cargo uninstall 2023-11-30 15:29:51 +08:00
bors 7ed235a48e Auto merge of #13076 - hi-rustin:rustin-patch-add, r=epage
Remove the outdated comment
2023-11-30 03:11:37 +00:00
hi-rustin fc45ed29d7 Remove the outdated comment
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-11-30 10:57:23 +08:00
bors f38ebbe9d4 Auto merge of #13036 - epage:defenestrate, r=Eh2406
fix(resolver): Remove unused public-deps error handling

To implement rust-lang/rfcs#3516, we need to decouple the resolver's behavior from the unstable flag.  Since the code path is now dead, I went ahead and removed it.
2023-11-29 21:50:33 +00:00
Ed Page 8ff20c7b3c refactor(toml): Make Dep's to_dependency a free function 2023-11-29 15:41:57 -06:00
Ed Page 94395d4b45 refactor(toml): Make Detailed Dep's to_dependency a free function 2023-11-29 15:38:36 -06:00
Ed Page a43e09073c test(resolver): Don't bother generating public cases 2023-11-29 13:11:39 -06:00
bors 430effa37d Auto merge of #12484 - adrianEffe:fix/error-count, r=weihanglo
Fixes error count display is different when there's only one error left

### What does this PR try to resolve?

When there's only 1 error left, the number 1 appears in the output so that it scans the same as the output when there's more than 1 error, so:

```
error: could not compile `crate` (lib test) due to 1 previous error
```
instead of the current:
```
error: could not compile `crate` (lib test) due to a previous error
```

Fixes #12390

rustc related PR [#114759](https://github.com/rust-lang/rust/pull/114759)
2023-11-29 19:07:16 +00:00
bors 07f1208a9f Auto merge of #13065 - weihanglo:remap-path-prefix-order, r=ehuss
fix: reorder `--remap-path-prefix` flags for `-Zbuild-std`

### What does this PR try to resolve?

Order of `--remap-path-prefix` flags is important for `-Zbuild-std`.
We want to show `/rustc/<hash>/library/std` instead of `std-0.0.0`.

Fixes rust-lang/rust#117839

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

Follow the steps in rust-lang/rust#117839, or run

```
CARGO_RUN_BUILD_STD_TESTS=true cargo +nightly t --test build-std
```

to verify.
2023-11-29 18:28:07 +00:00
Ed Page e6da166c8b test(resolver-tests): Remove public dep support from SAT resolver 2023-11-29 12:17:26 -06:00
Adrian 3e297a6803
Update test for override respects spec metadata 2023-11-29 18:47:27 +02:00
Adrian b7b5a093a1
Fix cargo errors counter 2023-11-29 18:47:14 +02:00
bors d5d9c35e5f Auto merge of #13072 - belovdv:jobserver-remove-env-var, r=weihanglo
remove jobserver env var in some tests

This PR makes cargo compatible with [rust-lang/rust#113730](https://github.com/rust-lang/rust/pull/113730). Linked [comment](https://github.com/rust-lang/rust/pull/113730#issuecomment-1821892786). Problem to be fixed: shim for cargo fix spawns rustc with make environment variable inherited, which points to closed jobserver.

r? `@weihanglo`
2023-11-29 12:57:11 +00:00
belovdv 6b86f93713 remove jobserver in shim for tests in testsuite/fix 2023-11-29 15:30:58 +03:00
Lin Yihai 0fd4fd357b Add test case for cargo uninstall while try to uninstalling a running Bin. 2023-11-29 17:52:22 +08:00
bors bec67ed6d2 Auto merge of #13069 - weihanglo:buildscript-cfg, r=ehuss
doc: clarify different target has different set of `CARGO_CFG_*` values
2023-11-29 03:49:59 +00:00
Weihang Lo 8e7dbebcfd
doc: clarify different target has different set of CARGO_CFG_* values 2023-11-28 22:47:18 -05:00
bors 35ea623b4c Auto merge of #13070 - weihanglo:pr-template, r=epage
docs: remove review capacity notice in PR template

Forgot to update PR template in #12842. This updates accordingly.

Note that this doesn't mean Cargo start accepting arbitrary pull requests or features. The reviewers are still a small handful of people. The guideline never changes — issue, discuss, then pull request.
2023-11-29 02:00:53 +00:00
Weihang Lo 44e063830c
docs: remove review capacity notice 2023-11-28 20:40:27 -05:00
bors 99f6ac64ef Auto merge of #13068 - rust-lang:renovate/crate-openssl-vulnerability, r=weihanglo
chore(deps): update rust crate openssl to 0.10.60 [security]

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

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [openssl](https://togithub.com/sfackler/rust-openssl) | workspace.dependencies | patch | `0.10.57` -> `0.10.60` |

### GitHub Vulnerability Alerts

#### [GHSA-xphf-cx8h-7q9g](https://togithub.com/sfackler/rust-openssl/issues/2096)

This function returned a reference into an OpenSSL datastructure, but there was no way to ensure OpenSSL would not mutate the datastructure behind one's back.

Use of this function should be replaced with `X509StoreRef::all_certificates`.

---

### Release Notes

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

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

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

#### What's Changed

-   Correct off-by-one in minimum output buffer size computation by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2088](https://togithub.com/sfackler/rust-openssl/pull/2088)
-   Expose a few more (bad) ciphers in cipher::Cipher by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2084](https://togithub.com/sfackler/rust-openssl/pull/2084)
-   add temp key bindings by [`@&#8203;jmayclin](https://togithub.com/jmayclin)` in [https://github.com/sfackler/rust-openssl/pull/2076](https://togithub.com/sfackler/rust-openssl/pull/2076)
-   Expose ChaCha20 on LibreSSL by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2093](https://togithub.com/sfackler/rust-openssl/pull/2093)
-   Revert "Correct off-by-one in minimum output buffer size computation" by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2090](https://togithub.com/sfackler/rust-openssl/pull/2090)
-   Added `update_unchecked` to `symm::Crypter` by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2100](https://togithub.com/sfackler/rust-openssl/pull/2100)
-   fixes [#&#8203;2096](https://togithub.com/sfackler/rust-openssl/issues/2096) -- deprecate `X509StoreRef::objects`, it is unsound by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2099](https://togithub.com/sfackler/rust-openssl/pull/2099)
-   Don't leak when overwriting ex data by [`@&#8203;sfackler](https://togithub.com/sfackler)` in [https://github.com/sfackler/rust-openssl/pull/2102](https://togithub.com/sfackler/rust-openssl/pull/2102)
-   Release openssl v0.10.60 and openssl-sys v0.9.96 by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2104](https://togithub.com/sfackler/rust-openssl/pull/2104)

**Full Changelog**: https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.59...openssl-v0.10.60

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

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

#### What's Changed

-   Add binding to NID of Chacha20-Poly1305 cipher by [`@&#8203;Arnavion](https://togithub.com/Arnavion)` in [https://github.com/sfackler/rust-openssl/pull/2081](https://togithub.com/sfackler/rust-openssl/pull/2081)
-   Fixed cfg for RSA_PSS by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2079](https://togithub.com/sfackler/rust-openssl/pull/2079)
-   fixes [#&#8203;2050](https://togithub.com/sfackler/rust-openssl/issues/2050) -- build and test on libressl 3.8.2 by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2082](https://togithub.com/sfackler/rust-openssl/pull/2082)
-   Release openssl v0.10.59 and openssl-sys v0.9.95 by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2083](https://togithub.com/sfackler/rust-openssl/pull/2083)

#### New Contributors

-   [`@&#8203;Arnavion](https://togithub.com/Arnavion)` made their first contribution in [https://github.com/sfackler/rust-openssl/pull/2081](https://togithub.com/sfackler/rust-openssl/pull/2081)

**Full Changelog**: https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.58...openssl-v0.10.59

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

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

#### What's Changed

-   LibreSSL 3.8.1 support by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2035](https://togithub.com/sfackler/rust-openssl/pull/2035)
-   Update vendored version to openssl 3 by [`@&#8203;amousset](https://togithub.com/amousset)` in [https://github.com/sfackler/rust-openssl/pull/1925](https://togithub.com/sfackler/rust-openssl/pull/1925)
-   Test against 3.2.0-alpha1 by [`@&#8203;sfackler](https://togithub.com/sfackler)` in [https://github.com/sfackler/rust-openssl/pull/2037](https://togithub.com/sfackler/rust-openssl/pull/2037)
-   Removed reference to non-existent method by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2039](https://togithub.com/sfackler/rust-openssl/pull/2039)
-   Bump CI to 1.1.1w by [`@&#8203;sfackler](https://togithub.com/sfackler)` in [https://github.com/sfackler/rust-openssl/pull/2040](https://togithub.com/sfackler/rust-openssl/pull/2040)
-   \[openssl-sys] Add X509\_check\_{host,email,ip,ip_asc} fns by [`@&#8203;jgallagher](https://togithub.com/jgallagher)` in [https://github.com/sfackler/rust-openssl/pull/2042](https://togithub.com/sfackler/rust-openssl/pull/2042)
-   Expose CBC mode for several more (bad) ciphers by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2045](https://togithub.com/sfackler/rust-openssl/pull/2045)
-   Expose two additional Pkey IDs by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2046](https://togithub.com/sfackler/rust-openssl/pull/2046)
-   Add support for CRL extensions and the Authority Information Access e… by [`@&#8203;AdmiralGT](https://togithub.com/AdmiralGT)` in [https://github.com/sfackler/rust-openssl/pull/2003](https://togithub.com/sfackler/rust-openssl/pull/2003)
-   Fix clippy warnings produced by newer Rust by [`@&#8203;wiktor-k](https://togithub.com/wiktor-k)` in [https://github.com/sfackler/rust-openssl/pull/2052](https://togithub.com/sfackler/rust-openssl/pull/2052)
-   Use osslconf on BoringSSL by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2056](https://togithub.com/sfackler/rust-openssl/pull/2056)
-   Make X509\_ALGOR opaque for LibreSSL by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2060](https://togithub.com/sfackler/rust-openssl/pull/2060)
-   Don't ignore ECDSA tests without GF2m support by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2061](https://togithub.com/sfackler/rust-openssl/pull/2061)
-   Clarify 'possible LibreSSL bug' by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2062](https://togithub.com/sfackler/rust-openssl/pull/2062)
-   Enable BN_mod_sqrt() for upcoming LibreSSL 3.8.2 by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2063](https://togithub.com/sfackler/rust-openssl/pull/2063)
-   Enable SHA-3 for LibreSSL 3.8.0 by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2064](https://togithub.com/sfackler/rust-openssl/pull/2064)
-   Remove DH_generate_parameters for LibreSSL 3.8.2 by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2065](https://togithub.com/sfackler/rust-openssl/pull/2065)
-   Use EVP_MD_CTX\_{new,free}() in LibreSSL 3.8.2 by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2067](https://togithub.com/sfackler/rust-openssl/pull/2067)
-   Enable HKDF support for LibreSSL >= 3.6.0 by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2066](https://togithub.com/sfackler/rust-openssl/pull/2066)
-   Two build script fixes for LibreSSL by [`@&#8203;botovq](https://togithub.com/botovq)` in [https://github.com/sfackler/rust-openssl/pull/2068](https://togithub.com/sfackler/rust-openssl/pull/2068)
-   Respect OPENSSL_NO_OCB on AES functions by [`@&#8203;GuyLewin](https://togithub.com/GuyLewin)` in [https://github.com/sfackler/rust-openssl/pull/2070](https://togithub.com/sfackler/rust-openssl/pull/2070)
-   Support OPENSSL_NO_SCRYPT by [`@&#8203;GuyLewin](https://togithub.com/GuyLewin)` in [https://github.com/sfackler/rust-openssl/pull/2071](https://togithub.com/sfackler/rust-openssl/pull/2071)
-   Bump 3.2.0 beta by [`@&#8203;sfackler](https://togithub.com/sfackler)` in [https://github.com/sfackler/rust-openssl/pull/2073](https://togithub.com/sfackler/rust-openssl/pull/2073)
-   add security level bindings by [`@&#8203;jmayclin](https://togithub.com/jmayclin)` in [https://github.com/sfackler/rust-openssl/pull/2074](https://togithub.com/sfackler/rust-openssl/pull/2074)
-   Release openssl v0.10.58 and openssl-sys v0.9.94 by [`@&#8203;alex](https://togithub.com/alex)` in [https://github.com/sfackler/rust-openssl/pull/2078](https://togithub.com/sfackler/rust-openssl/pull/2078)

#### New Contributors

-   [`@&#8203;amousset](https://togithub.com/amousset)` made their first contribution in [https://github.com/sfackler/rust-openssl/pull/1925](https://togithub.com/sfackler/rust-openssl/pull/1925)
-   [`@&#8203;jgallagher](https://togithub.com/jgallagher)` made their first contribution in [https://github.com/sfackler/rust-openssl/pull/2042](https://togithub.com/sfackler/rust-openssl/pull/2042)
-   [`@&#8203;AdmiralGT](https://togithub.com/AdmiralGT)` made their first contribution in [https://github.com/sfackler/rust-openssl/pull/2003](https://togithub.com/sfackler/rust-openssl/pull/2003)
-   [`@&#8203;botovq](https://togithub.com/botovq)` made their first contribution in [https://github.com/sfackler/rust-openssl/pull/2060](https://togithub.com/sfackler/rust-openssl/pull/2060)
-   [`@&#8203;GuyLewin](https://togithub.com/GuyLewin)` made their first contribution in [https://github.com/sfackler/rust-openssl/pull/2070](https://togithub.com/sfackler/rust-openssl/pull/2070)
-   [`@&#8203;jmayclin](https://togithub.com/jmayclin)` made their first contribution in [https://github.com/sfackler/rust-openssl/pull/2074](https://togithub.com/sfackler/rust-openssl/pull/2074)

**Full Changelog**: https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.57...openssl-v0.10.58

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "" (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:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->
2023-11-28 22:14:19 +00:00
renovate[bot] 0998ad3090
chore(deps): update rust crate openssl to 0.10.60 [security] 2023-11-28 21:44:54 +00:00