765 Commits

Author SHA1 Message Date
Weihang Lo
6246988889
chore: Bump to 0.86.0 2024-12-02 13:59:14 -05:00
Eric Huss
d25c2691af
chore(deps): update rust crate cargo_metadata to 0.19.0 (#14878)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [cargo_metadata](https://redirect.github.com/oli-obk/cargo_metadata) |
workspace.dependencies | minor | `0.18.1` -> `0.19.0` |

---

### Release Notes

<details>
<summary>oli-obk/cargo_metadata (cargo_metadata)</summary>

###
[`v0.19.0`](https://redirect.github.com/oli-obk/cargo_metadata/blob/HEAD/CHANGELOG.md#0190---2024-11-20)

[Compare
Source](https://redirect.github.com/oli-obk/cargo_metadata/compare/0.18.1...0.19.0)

##### Added

-   Re-exported `semver` crate directly.
-   Added implementation of `std::ops::Index<&PackageId>` for `Resolve`.
-   Added `pub fn is_kind(&self, name: TargetKind) -> bool` to `Target`.
- Added derived implementations of `PartialEq`, `Eq` and `Hash` for
`Metadata` and its members' types.
-   Added default fields to `PackageBuilder`.
- Added `pub fn new(name:version:id:path:) -> Self` to `PackageBuilder`
for providing all required fields upfront.

##### Changed

-   Bumped MSRV from `1.42.0` to `1.56.0`.
- Made `parse_stream` more versatile by accepting anything that
implements `Read`.
-   Converted `TargetKind` and `CrateType` to an enum representation.

##### Removed

- Removed re-exports for `BuildMetadata` and `Prerelease` from `semver`
crate.
- Removed `.is_lib(…)`, `.is_bin(…)`, `.is_example(…)`, `.is_test(…)`,
`.is_bench(…)`, `.is_custom_build(…)`, and `.is_proc_macro(…)` from
`Target` (in favor of adding `.is_kind(…)`).

##### Fixed

- Added missing `manifest_path` field to `Artifact`. Fixes
[#&#8203;187](https://redirect.github.com/oli-obk/cargo_metadata/issues/187).

</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 was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rust-lang/cargo).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTkuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->
2024-12-01 19:14:29 +00:00
renovate[bot]
0937dd2a48
chore(deps): update rust crate gix to 0.68.0 2024-12-01 00:09:24 +00:00
renovate[bot]
59e42909cb
chore(deps): update rust crate cargo_metadata to 0.19.0 2024-12-01 00:09:18 +00:00
Weihang Lo
4240e722d4
test: requires attribute accepts string literals for cmds
The new syntax is key-value pair like `requires = "rustfmt"`,
comparing to the previous `requires_<cmd>`.
2024-11-29 22:23:08 -05:00
Ed Page
6da546c9e1 chore: Bump versions 2024-11-29 10:43:19 -06:00
Urgau
80dde854b4 Bump cargo-platform to 0.2.0 in preparation for cfg(<true/false>) 2024-11-25 21:51:18 +01:00
Ed Page
179c516f9b chore: Bump cargo-credential 2024-11-15 09:33:23 -06:00
Ed Page
54660c665e chore: Integrate build-rs into the workspace 2024-11-08 08:58:45 -06:00
Ed Page
8b9eaa51f5 chore: Merge build-rs into Cargo 2024-11-08 08:55:29 -06:00
Ed Page
a03adcf6e2 fix(test): Make redactions consistent with snapbox
I'm unsure how we should be replacing these use cases, so I'm exploring
keeping them but making them use snapbox under the hood.
Part of the intent of snapbox is that it provides you the building
blocks to make what you need.
2024-11-06 20:03:53 -06:00
Christopher Durham
4f60fe0e58 Cleanup before upstream submission 2024-11-06 15:33:03 -06:00
Ed Page
401f77a297 Big refactor 2024-11-06 15:31:35 -06:00
bors
3dedb85a25 Auto merge of #14747 - saites:rustfix-transactional, r=weihanglo
Add transactional semantics to `rustfix`

### What does this PR try to resolve?

This PR adds transactional semantics to `rustfix::Data`, enabling `rustfix::CodeFix` to apply `Suggestion`s as atomic units and rollback partially-applied changes when they conflict with existing ones. The basic approach and goals are discussed [in a comment on issue 14699](https://github.com/rust-lang/cargo/issues/14699#issuecomment-2427501232). In that comment, I proposed a solution which extended the existing `State` enumeration, but described an alternative that simplifies the overall tracking of incoming changes; this PR implements the latter.

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

I've added an additional test and updated the existing ones. The tests in `parse_and_replace` already cover this case, particularly thanks to https://github.com/rust-lang/cargo/pull/14765 added by `@weihanglo.` It's still a good idea to experiment with `cargo clippy --fix` on repos that match the cases described in these open issues.

### Additional information

Fixes #14699
Fixes rust-lang/rust-clippy/issues/13549
2024-11-02 21:45:48 +00:00
Alexander Saites
f73b1d8c74 add transactional semantics to rustfix 2024-11-02 13:01:21 -07:00
TheSlapstickDictator
9b4f03a876 chore: update handlebars to v6, fix build error
DirectorySourceOptions is marked as #[non_exhaustive], and only
exposes the Default trait, so we need to instantiate a mutable
instance using default(), and then change tpl_extension to the
value we want.
2024-11-01 14:55:20 -07:00
bors
57ffbb6e78 Auto merge of #14766 - rust-lang:renovate/security-framework-3.x, r=ehuss
chore(deps): update rust crate security-framework to v3

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [security-framework](https://lib.rs/crates/security_framework) ([source](https://redirect.github.com/kornelski/rust-security-framework)) | workspace.dependencies | major | `2.11.1` -> `3.0.0` |

---

### Release Notes

<details>
<summary>kornelski/rust-security-framework (security-framework)</summary>

### [`v3.0.0`](https://redirect.github.com/kornelski/rust-security-framework/compare/v2.11.1...v3.0.0)

[Compare Source](https://redirect.github.com/kornelski/rust-security-framework/compare/v2.11.1...v3.0.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 was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/rust-lang/cargo).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMzUuMiIsInVwZGF0ZWRJblZlciI6IjM4LjEzNS4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
2024-11-01 14:51:06 +00:00
renovate[bot]
1fad901e79
chore(deps): update rust crate security-framework to v3 2024-11-01 03:03:47 +00:00
renovate[bot]
48b163855f
chore(deps): update rust crate gix to 0.67.0 2024-11-01 00:02:25 +00:00
bors
cf9152007e Auto merge of #14683 - dacianpascu06:355adcad7, r=epage
Added unstable-schema generation for Cargo.toml

### What does this PR try to resolve?

Added unstable-schema feature that generates JsonSchema for Cargo.toml

See #12883
finished first step of [plan](https://github.com/rust-lang/cargo/issues/12883#issuecomment-2407648385)

### Information
In cargo-util-schemas,  run cargo test --feature unstable-schema  . If there have been any changes to manifest.schema.json, rerun with env variable SNAPSHOTS=overwrite  and it will update them.

### How should we test and review this PR?
In cargo-util-schemas run cargo test --features unstable-schema and it will generate manifest.schema.json
2024-10-24 21:26:44 +00:00
dacian
21ce69ef37 feat: unstable-json-schema generation for Cargo.toml 2024-10-25 00:05:11 +03:00
Ed Page
56f008da47 feat(complete): Include descriptions in zsh 2024-10-23 20:18:11 -05:00
Weihang Lo
446e3f05ba
chore(rustfix): bump to 0.8.8 2024-10-20 20:42:22 -04:00
renovate[bot]
341d619f66
chore(deps): update msrv 2024-10-19 01:35:59 -04:00
Ed Page
e52b041a4d chore(test): Bump to 0.6 2024-10-17 06:26:47 +08:00
Weihang Lo
6f92802dd1
Bump to 0.85.0 2024-10-15 12:26:42 -04:00
bors
a4600184b8 Auto merge of #14668 - dacianpascu06:bump, r=epage
chore(deps): update rust crate pulldown-cmark to 0.12.0

### What does this PR try to resolve?

Closes #14667

### How should we test and review this PR?
Cargo build-man stopped giving errors after updating pulldown-cmark
### Additional information
2024-10-10 20:27:06 +00:00
dacian
54bbe02489 chore(deps): update rust crate pulldown-cmark to 0.12.0 2024-10-10 22:38:01 +03:00
x-hgg-x
3d4d48b0ff fix: use rustc-hash in the resolver 2024-10-10 20:06:31 +02:00
bors
15fbd2f607 Auto merge of #14137 - Xaeroxe:checksum-freshness, r=weihanglo
initial version of checksum based freshness

Implementation for https://github.com/rust-lang/cargo/issues/14136 and resolves https://github.com/rust-lang/cargo/issues/6529

This PR implements the use of checksums in cargo fingerprints as an alternative to using mtimes. This is most useful on systems with poor mtime implementations.

This has a dependency on https://github.com/rust-lang/rust/pull/126930. It's expected this will increase the time it takes to declare a build to be fresh. Still this loss in performance may be preferable to the issues the ecosystem has had with the use of mtimes for determining freshness.
2024-10-08 21:08:11 +00:00
Jacob Kiesel
f4ca739073
implement checksum freshness fingerprints for cargo 2024-10-08 16:29:44 -04:00
bors
9026f9565c Auto merge of #14653 - epage:complete, r=ehuss
fix(complete): Don't complete files for any value

### What does this PR try to resolve?
We now need to opt-in to path completions for values, which can be as simple as setting the value parser to be for `PathBuf`s.

We'll now show a lot less irrelevant completions.

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

### Additional information
2024-10-08 15:35:41 +00:00
x-hgg-x
dedf251c27 test: add tests from pubgrub 2024-10-08 08:06:15 +02:00
x-hgg-x
870f6d31d7 test: refactor sat resolver clauses computation
Add new intermediate boolean variables for each dependency and each dependency feature declared in a package.
This is used to simplify computation of the sat clauses.

Add support for multiple dependencies with the same name, if their kind or target is different.

A non-weak dependency feature for an optional dependency now activates a feature of the same name in the sat resolver.
2024-10-08 08:04:43 +02:00
Ed Page
244578e9e2 fix(complete): Don't complete files for any value
We now need to opt-in to path completions for values, which can be as
simple as setting the value parser to be for `PathBuf`s.

We'll now show a lot less irrelevant completions.
2024-10-07 21:01:03 -05:00
bors
2e309bd754 Auto merge of #14489 - rust-lang:dependabot/cargo/gix-path-0.10.10, r=weihanglo
chore(deps): bump gix-path from 0.10.9 to 0.10.11

Bumps [gix-path](https://github.com/Byron/gitoxide) from 0.10.9 to 0.10.10.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/Byron/gitoxide/releases">gix-path's releases</a>.</em></p>
<blockquote>
<h2>gix-path v0.10.10</h2>
<p>A maintenance release without user-facing changes.</p>
<h3>Commit Statistics</h3>
<ul>
<li>6 commits contributed to the release over the course of 12 calendar days.</li>
<li>35 days passed between releases.</li>
<li>0 commits were understood as <a href="https://www.conventionalcommits.org">conventional</a>.</li>
<li>0 issues like '(#ID)' were seen in commit messages</li>
</ul>
<h3>Commit Details</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<ul>
<li><strong>Uncategorized</strong>
<ul>
<li>Prepare changelogs prior to release (0f25841)</li>
<li>Merge pull request <a href="https://redirect.github.com/Byron/gitoxide/issues/1523">#1523</a> from martinvonz/push-xmsuurxprnnw (83c9de0)</li>
<li>Remove <code>--system</code> from <code>git config</code> call as it fails on MacOS (6b1c243)</li>
<li>Run <code>git config -l</code> in temp dir when looking up system config (20ef4e9)</li>
<li>Merge branch 'push-ysnqkzlzwuwq' (e2c747d)</li>
<li>Don't show console on Windows (087594c)</li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="d19af16e1d"><code>d19af16</code></a> Release gix-date v0.9.0, gix-actor v0.31.6, gix-validate v0.9.0, gix-object v...</li>
<li><a href="0f2584178a"><code>0f25841</code></a> prepare changelogs prior to release</li>
<li><a href="9ed2b24e5d"><code>9ed2b24</code></a> Merge branch 'improvements'</li>
<li><a href="6990afd269"><code>6990afd</code></a> fix: similarity detection</li>
<li><a href="f8c5d9ce87"><code>f8c5d9c</code></a> fix similarity detection</li>
<li><a href="25a3f1b0b0"><code>25a3f1b</code></a> Merge pull request <a href="https://redirect.github.com/Byron/gitoxide/issues/1531">#1531</a> from EliahKagan/progress-typos</li>
<li><a href="ba72ee0f06"><code>ba72ee0</code></a> fix!: better peeling performance for reference traversal.</li>
<li><a href="9f9feb6545"><code>9f9feb6</code></a> add progress report for July</li>
<li><a href="b31d6b79fd"><code>b31d6b7</code></a> Fix typos in config support info</li>
<li><a href="242fedc973"><code>242fedc</code></a> Merge branch 'improvements'</li>
<li>Additional commits viewable in <a href="https://github.com/Byron/gitoxide/compare/gix-path-v0.10.9...gix-path-v0.10.10">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=gix-path&package-manager=cargo&previous-version=0.10.9&new-version=0.10.10)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/rust-lang/cargo/network/alerts).

</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
2024-10-08 00:07:37 +00:00
dependabot[bot]
7a58e6fbd0
chore(deps): bump gix-path from 0.10.9 to 0.10.11
Bumps [gix-path](https://github.com/Byron/gitoxide) from 0.10.9 to 0.10.11.
- [Release notes](https://github.com/Byron/gitoxide/releases)
- [Changelog](https://github.com/Byron/gitoxide/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Byron/gitoxide/compare/gix-path-v0.10.9...gix-path-v0.10.11)

---
updated-dependencies:
- dependency-name: gix-path
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 19:24:32 -04:00
Ed Page
01e138fc0e chore: Update snapbox 2024-10-03 21:09:18 -05:00
Ed Page
d199f2e97c chore: Bump versions 2024-09-26 12:43:09 -05:00
xzfc
0c74d2449d chore(deps): update tar to 0.4.42
The new version of tar enables the creation of sparse tar archives by
default.  The ability to read such sparse entries was added in tar
0.4.6, which has been in use starting from Cargo 0.13 and Rust 1.12.
Additionally, `docker cp` doesn't support sparse tar entries in the GNU
format.  For compatibility with older versions of Rust and Cargo, as
well as with `docker cp`, this commit disables sparse archive creation
in the corresponding cases where the `tar::Builder` is used.  See
#14594.
2024-10-02 03:27:27 +00:00
renovate[bot]
a6a2b66e0f chore(deps): update rust crate unicode-width to 0.2.0 2024-10-01 03:12:10 +00:00
Chris Denton
a5503c1480
Update cc to1.1.22 2024-09-27 17:31:46 +00:00
Ed Page
da18686f29 chore(schemas): Bump version 2024-09-24 11:24:24 -05:00
Ed Page
023f4c66ca test: Remove completion tests
The tests are intended to spot check that shell completions are
registered correctly.  That is a low change, low risk area.  For shell
integration, we're relying on `clap_complete`s tests.
For our own candidates, we should test the candidate generation
directly, rather than end-to-end.

This reverts parts of commit e7ca9bec80ab5c010c1a84690816da7b64008257, reversing
changes made to bd5f32bb1c7ca273b5d86815bf0ae4adba59ddd8.

Fixes #14545
2024-09-24 08:58:57 -05:00
Ed Page
61b8903e59 chore(test): Bump for breaking changes 2024-09-23 20:44:40 -05:00
Ed Page
1b94fb2326 chore: Bump MSRV to 1.81
This is prep for using `#[expect]`.

Its not clear why RenovateBot didn't do this.
2024-09-23 19:45:57 -05:00
Ed Page
86a1ff300d feat(complete): Upgrade clap_complete
Changes:
- Change completion order to subcommands, positional values, flags
- When completing `-[TAB]`, prioritize shorts over longs
- De-duplicate completions that have the same result (longs, shorts, aliases)
- Group candidates from the same `CompletionCandidate::tag`
- Sort candidates within a `CompletionCandidate::tag` by their `display_order`
2024-09-20 15:07:46 -05:00
Ed Page
90856d9a7f fix(complete): Fix problems on my machine
This pulls in
- clap-rs/clap#5731 for `IFS` oddities I had
- clap-rs/clap#5733 with the hope that this makes `CARGO_COMPLETE_BASH cargo +nightly` just work

`clap` was completed next to `clap_complete` because `clap_complete`
depends on unstable features from `clap`.
None should have changed in this time window but I wanted to exercise
caution.
2024-09-17 16:14:35 -05:00
Weihang Lo
4689efefa7
chore: necessary lock updates for clap_complete 2024-09-15 14:45:02 -04:00
Weihang Lo
fcaafa45f2
chore: revert change to Cargo.lock in f25806c472fd36f1ab0a8ba8a6a003f78734dd60
Some unrelated dependencies have been updated and blocked CI.
See rust-lang/rust 130377
2024-09-15 14:44:59 -04:00