Commit graph

16381 commits

Author SHA1 Message Date
Ed Page 9c73c54fe8 docs(changelog): Call out cargo-new lockfile change
I was looking for what release this happened in but we didn't have it
listed.
We do list the documentation change.
This was likely from the PR focusing on the entire policy change which
made it easy to overlook each aspect of the policy change.
2024-01-08 07:20:24 -06:00
bors 13e97927cc Auto merge of #13255 - epage:dashboard, r=weihanglo
chore: Add dependency dashboard

Example: https://github.com/clap-rs/clap/issues/4824

I'm hoping this will make it easier to see what is going on with problems with RenovateBot, like our MSRVs not updating atm (#13254).
2024-01-06 04:38:27 +00:00
Ed Page a93f4d8a18 chore: Add dependency dashboard
Example: https://github.com/clap-rs/clap/issues/4824

I'm hoping this will make it easier to see what is going on with
problems with RenovateBot, like our MSRVs not updating atm (#13254).
2024-01-05 20:08:43 -06:00
bors 2ce45605d9 Auto merge of #13247 - epage:prefix, r=Muscraft
feat(embedded): Add prefix-char frontmatter syntax support

This is a follow up to #13241 with another syntax being discussed. This one is a bit more polarizing but we're hoping first-hand experience with it can help people get a feel for how well it works in practice.

As the experiment is meant to be short-lived, this is implemented in a hacky way and docs aren't updated.
2024-01-04 18:04:13 +00:00
bors 87eb374d49 Auto merge of #13249 - WeiTheShinobi:update_dependency_handlebars, r=epage
Update dependency handlebars to v5 for mdman.

### What does this PR try to resolve?

issue #13238
- update dependency handlebars 4.5.0 -> 5.0.0
- fix code to fit the changes of Handlebars API
- RenderError::new() is deprecated. Use RenderErrorReason instead

### How should we test and review this PR?
pass all tests in /crates/mdman/tests
2024-01-04 16:03:50 +00:00
WeiTheShinobi 06201b9892 Update dependency handlebars to v5 for mdman.
- handlebars 4.5.0 -> 5.0.0
- fix code to fit the changes of Handlebars API
- RenderError::new() is deprecated. Use RenderErrorReason instead
2024-01-04 22:59:46 +08:00
bors a88535459f Auto merge of #13248 - bjorn3:deprecate_plugin, r=weihanglo
Deprecate rustc plugin support in cargo
2024-01-04 13:55:41 +00:00
bjorn3 f26e2fe1da Deprecate rustc plugin support in cargo
It has been removed entirely from rustc itself already
2024-01-04 13:17:50 +01:00
Ed Page b77ce7fa29 feat(embedded): Add prefix-char frontmatter syntax support
This is a follow up to #13241 with another syntax being discussed.
This one is a bit more polarizing but we're hoping first-hand experience
with it can help people get a feel for how well it works in practice.

As the experiment is meant to be short-lived, this is implemented in a
hacky way and docs aren't updated.
2024-01-03 16:39:43 -06:00
bors f9946d15df Auto merge of #13241 - epage:syntax, r=Muscraft
feat(embedded): Add multiple experimental manifest syntaxes

### What does this PR try to resolve?

As syntax discussions for "cargo script" are on-going, this allows us to experiment with a couple of them so we can see how they work in practice.

This is missing the line-prefix syntax as we decide how we want to separate blocks for it.

While doing this, I removed the previous doc-comment syntax.  This was left in for transition purposes.  With where discussions are going, its unlikely we'll go back to that syntax.

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

### Additional information

rust-lang/rfcs#3503

https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Syntax.20for.20embedded.20tooling.20metadata
2024-01-03 21:26:07 +00:00
bors e045049131 Auto merge of #13244 - weihanglo:auto-label, r=ehuss
chore: update auto labels

See

* `A-errors` has been renamed to `A-diagnostics`
* Some manifest related modules were moved to `cargo-util-schemas`.
2024-01-03 20:40:33 +00:00
Weihang Lo 872f4dff8d
chore: remove A-errors auto label 2024-01-03 15:06:48 -05:00
Weihang Lo c1461b5f1f
chore: label A-manifest for part of cargo-util-schemas 2024-01-03 15:05:13 -05:00
Weihang Lo 77a5f24796
chore: label Command-fix for diagnostic-server changes 2024-01-03 15:05:13 -05:00
Ed Page 22200b7df9 feat(embedded): Allow experimenting with triple dash/hash fences 2024-01-03 12:01:07 -06:00
bors 8de3343d80 Auto merge of #13245 - linyihai:publish-public-in-test, r=epage
test: support publish package with a `public` field.

### What does this PR try to resolve?

This PR add a `public` alike method to support add a dependency as public/private,
```
Package::new("foo", "0.1.0")
        .cargo_feature("public-dependency").add_dep(Dependency::new("bar", "0.1.0").public(true))
```

and then get it from registry in test.

This PR was seperated from the https://github.com/rust-lang/cargo/pull/13183.

### How should we test and review this PR?
You can review on per commit.

After running the test case `publish_package_with_public_dependency`,  you can check a "public" field in `./target/tmp/cit/t0/registry/3/b/bar`.

### Additional information
r? epage
2024-01-03 15:04:26 +00:00
bors dfdd5ff81a Auto merge of #13243 - ehuss:fix-fewer-rustc, r=epage
`cargo fix`: Call rustc fewer times.

This is an improvement of `cargo fix` so that it calls `rustc` one fewer times per target. The original code an extra step of calling `rustc` to display final diagnostics to the user. Part of the reason is that in the past, cargo did not always use JSON, and so `cargo fix` was forced to call `rustc` with and without JSON. Now that cargo uses JSON all the time, that is not necessary. This avoids the final call to `rustc` by remembering the original output from `rustc`.

This needs to keep track of both the first and last output from `rustc`. This is to handle the situation where `cargo fix` fails to apply some suggestion (either because the verification fails, or `rustfix` fails). The `cargo fix` output includes both the error, and the original diagnostics before the error.

The first commit is a little test framework to exercise the various edge cases around how fix works. The comments should explain how it works, but it essentially has a `rustc` replacement that emits various different diagnostics and counts how often it is called.

The subsequent commit includes the change to keep track of the output from `rustc` and to avoid the final call.

Fixes #13215
2024-01-03 02:17:45 +00:00
Eric Huss e7eaa51909 cargo fix: Call rustc fewer times.
This changes `cargo fix` so that it keeps track of the output so that it
doesn't need to run the final "show the output" step.
2024-01-02 15:03:06 -08:00
Eric Huss 8ffd9cd86f Add tests validating the sequence for cargo fix.
This adds a set of tests which validates various edge cases around how
`cargo fix` works in terms of calling `rustc` multiple times. This uses
a replacement of `rustc` so it doesn't depend on the behavior of rustc
itself which is not always stable.
2024-01-02 14:54:41 -08:00
bors b41f084ccb Auto merge of #13239 - weihanglo:tracing-core, r=epage
chore: tracing be compat with rustc_log
2024-01-02 22:41:16 +00:00
Ed Page e46f916807 fix(embedded): Make infostring optional
This is to allow us to experiment with how things change if there is no
infostring.
2024-01-02 16:25:14 -06:00
Ed Page 7e5dd711b5 fix(embedded)!: Remove doc comment manifest support
We added code fence support in ba869d36ed
(September), so I think this was enough of a transition period and there
is little interest in going back to this.
2024-01-02 16:25:12 -06:00
Weihang Lo 54e83c2969
chore: tracing be compat with rustc_log
The current version of rustfix cannot be used in rust-lang/rust due
to the dependency on `tracing`. `tracing-core` is currently locked
to 0.1.30, which is too old for the version in the cargo repo
(it looks like they are trying to avoid a known deadlock).

See: https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/rustfix.20is.20incompatible.20with.20rust-lang.2Frust
2024-01-02 15:32:15 -05:00
Lin Yihai 35d5fae5b6 test: support publish package with a public field. 2024-01-03 04:08:59 +08:00
bors 42d2c028bd Auto merge of #13227 - rust-lang:renovate/compatible, r=ehuss
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 |
|---|---|---|---|
| [anyhow](https://togithub.com/dtolnay/anyhow) | workspace.dependencies | patch | `1.0.75` -> `1.0.79` |
| [clap](https://togithub.com/clap-rs/clap) | workspace.dependencies | patch | `4.4.10` -> `4.4.12` |
| [filetime](https://togithub.com/alexcrichton/filetime) | workspace.dependencies | patch | `0.2.22` -> `0.2.23` |
| [home](https://togithub.com/rust-lang/cargo) | workspace.dependencies | patch | `0.5.5` -> `0.5.9` |
| [http-auth](https://togithub.com/scottlamb/http-auth) | workspace.dependencies | patch | `0.1.8` -> `0.1.9` |
| [libc](https://togithub.com/rust-lang/libc) | workspace.dependencies | patch | `0.2.150` -> `0.2.151` |
| [memchr](https://togithub.com/BurntSushi/memchr) | workspace.dependencies | minor | `2.6.4` -> `2.7.1` |
| [pasetors](https://togithub.com/brycx/pasetors) | workspace.dependencies | patch | `0.6.7` -> `0.6.8` |
| [pkg-config](https://togithub.com/rust-lang/pkg-config-rs) | workspace.dependencies | patch | `0.3.27` -> `0.3.28` |
| [serde](https://serde.rs) ([source](https://togithub.com/serde-rs/serde)) | workspace.dependencies | patch | `1.0.193` -> `1.0.194` |
| [serde-untagged](https://togithub.com/dtolnay/serde-untagged) | workspace.dependencies | patch | `0.1.1` -> `0.1.4` |
| [serde_json](https://togithub.com/serde-rs/json) | workspace.dependencies | patch | `1.0.108` -> `1.0.110` |
| [similar](https://togithub.com/mitsuhiko/similar) | dev-dependencies | minor | `2.3.0` -> `2.4.0` |
| [snapbox](https://togithub.com/assert-rs/trycmd/tree/main/crates/snapbox) ([source](https://togithub.com/assert-rs/trycmd)) | workspace.dependencies | patch | `0.4.14` -> `0.4.15` |
| [syn](https://togithub.com/dtolnay/syn) | workspace.dependencies | patch | `2.0.39` -> `2.0.46` |
| [tempfile](https://stebalien.com/projects/tempfile-rs/) ([source](https://togithub.com/Stebalien/tempfile)) | workspace.dependencies | minor | `3.8.1` -> `3.9.0` |
| [thiserror](https://togithub.com/dtolnay/thiserror) | workspace.dependencies | patch | `1.0.50` -> `1.0.56` |

---

### Release Notes

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

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

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

-   Work around improperly cached build script result by sccache ([#&#8203;340](https://togithub.com/dtolnay/anyhow/issues/340))

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

[Compare Source](https://togithub.com/dtolnay/anyhow/compare/1.0.77...1.0.78)

-   Reduce spurious rebuilds under RustRover IDE when using a nightly toolchain ([#&#8203;337](https://togithub.com/dtolnay/anyhow/issues/337))

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

[Compare Source](https://togithub.com/dtolnay/anyhow/compare/1.0.76...1.0.77)

-   Make `anyhow::Error::backtrace` available on stable Rust compilers 1.65+ ([#&#8203;293](https://togithub.com/dtolnay/anyhow/issues/293), thanks [`@&#8203;LukasKalbertodt](https://togithub.com/LukasKalbertodt))`

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

[Compare Source](https://togithub.com/dtolnay/anyhow/compare/1.0.75...1.0.76)

-   Opt in to `unsafe_op_in_unsafe_fn` lint ([#&#8203;329](https://togithub.com/dtolnay/anyhow/issues/329))

</details>

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

### [`v4.4.12`](https://togithub.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4412---2023-12-28)

[Compare Source](https://togithub.com/clap-rs/clap/compare/v4.4.11...v4.4.12)

##### Performance

-   Only ask `TypedValueParser` for possible values if needed

</details>

<details>
<summary>scottlamb/http-auth (http-auth)</summary>

### [`v0.1.9`](https://togithub.com/scottlamb/http-auth/blob/HEAD/CHANGELOG.md#v019-2023-12-28)

[Compare Source](https://togithub.com/scottlamb/http-auth/compare/v0.1.8...v0.1.9)

-   support conversion from `http` crate version 1.0 types.

</details>

<details>
<summary>BurntSushi/memchr (memchr)</summary>

### [`v2.7.1`](https://togithub.com/BurntSushi/memchr/compare/2.7.0...2.7.1)

[Compare Source](https://togithub.com/BurntSushi/memchr/compare/2.7.0...2.7.1)

### [`v2.7.0`](https://togithub.com/BurntSushi/memchr/compare/2.6.4...2.7.0)

[Compare Source](https://togithub.com/BurntSushi/memchr/compare/2.6.4...2.7.0)

</details>

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

### [`v0.3.28`](https://togithub.com/rust-lang/pkg-config-rs/blob/HEAD/CHANGELOG.md#0328---2023-12-20)

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

##### Fixed

-   Pass -l:libfoo.a to linker directly ([#&#8203;149](https://togithub.com/rust-lang/pkg-config-rs/issues/149)).

##### Changed

-   Improve error message when library not found ([#&#8203;158](https://togithub.com/rust-lang/pkg-config-rs/issues/158)).

</details>

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

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

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

-   Update proc-macro2 to fix caching issue when using a rustc-wrapper such as sccache

</details>

<details>
<summary>dtolnay/serde-untagged (serde-untagged)</summary>

### [`v0.1.4`](https://togithub.com/dtolnay/serde-untagged/compare/0.1.3...0.1.4)

[Compare Source](https://togithub.com/dtolnay/serde-untagged/compare/0.1.3...0.1.4)

### [`v0.1.3`](https://togithub.com/dtolnay/serde-untagged/releases/tag/0.1.3)

[Compare Source](https://togithub.com/dtolnay/serde-untagged/compare/0.1.2...0.1.3)

-   Turn on `deny(unsafe_op_in_unsafe_fn)` lint

</details>

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

### [`v1.0.110`](https://togithub.com/serde-rs/json/compare/v1.0.109...v1.0.110)

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

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

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

-   Documentation improvements

</details>

<details>
<summary>mitsuhiko/similar (similar)</summary>

### [`v2.4.0`](https://togithub.com/mitsuhiko/similar/blob/HEAD/CHANGELOG.md#240)

[Compare Source](https://togithub.com/mitsuhiko/similar/compare/2.3.0...2.4.0)

-   Fixed a bug where the LCS diff algorithm didn't always call `D::finish`.  ([#&#8203;58](https://togithub.com/mitsuhiko/similar/issues/58))
-   Fixed a bug in LCS that caused a panic if the common prefix and the
    common suffix overlapped.  ([#&#8203;59](https://togithub.com/mitsuhiko/similar/issues/59))

</details>

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

### [`v2.0.46`](https://togithub.com/dtolnay/syn/releases/tag/2.0.46)

[Compare Source](https://togithub.com/dtolnay/syn/compare/2.0.45...2.0.46)

-   Update proc-macro2 to fix caching issue when using a rustc-wrapper such as sccache

### [`v2.0.45`](https://togithub.com/dtolnay/syn/releases/tag/2.0.45)

[Compare Source](https://togithub.com/dtolnay/syn/compare/2.0.44...2.0.45)

-   Parse unsupported expressions in enum discriminants of `DeriveInput` as `Expr::Verbatim` in non-"full" mode, instead of error ([#&#8203;1513](https://togithub.com/dtolnay/syn/issues/1513))
-   Support parsing `PatType` with `parse_quote!` ([#&#8203;1573](https://togithub.com/dtolnay/syn/issues/1573))

### [`v2.0.44`](https://togithub.com/dtolnay/syn/releases/tag/2.0.44)

[Compare Source](https://togithub.com/dtolnay/syn/compare/2.0.43...2.0.44)

-   Documentation improvements

### [`v2.0.43`](https://togithub.com/dtolnay/syn/releases/tag/2.0.43)

[Compare Source](https://togithub.com/dtolnay/syn/compare/2.0.42...2.0.43)

-   Insert trailing comma if not already present when printing a 1-tuple in pattern position ([#&#8203;1553](https://togithub.com/dtolnay/syn/issues/1553))

### [`v2.0.42`](https://togithub.com/dtolnay/syn/releases/tag/2.0.42)

[Compare Source](https://togithub.com/dtolnay/syn/compare/2.0.41...2.0.42)

-   Documentation improvements

</details>

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

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

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

-   Updates windows-sys to 0.52
-   Updates minimum rustix version to 0.38.25

</details>

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

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

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

-   Update proc-macro2 to fix caching issue when using a rustc-wrapper such as sccache

### [`v1.0.55`](https://togithub.com/dtolnay/thiserror/compare/1.0.54...1.0.55)

[Compare Source](https://togithub.com/dtolnay/thiserror/compare/1.0.54...1.0.55)

### [`v1.0.54`](https://togithub.com/dtolnay/thiserror/compare/1.0.53...1.0.54)

[Compare Source](https://togithub.com/dtolnay/thiserror/compare/1.0.53...1.0.54)

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

[Compare Source](https://togithub.com/dtolnay/thiserror/compare/1.0.52...1.0.53)

-   Reduce spurious rebuilds under RustRover IDE when using a nightly toolchain ([#&#8203;270](https://togithub.com/dtolnay/thiserror/issues/270))

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

[Compare Source](https://togithub.com/dtolnay/thiserror/compare/1.0.51...1.0.52)

-   Fix interaction with RUSTC_BOOTSTRAP ([#&#8203;269](https://togithub.com/dtolnay/thiserror/issues/269))

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

[Compare Source](https://togithub.com/dtolnay/thiserror/compare/1.0.50...1.0.51)

-   Improve diagnostics when an invalid attribute previously caused thiserror to generate no `Error` impl ([#&#8203;266](https://togithub.com/dtolnay/thiserror/issues/266))

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
2024-01-02 16:39:51 +00:00
bors b4b03a9ebc Auto merge of #13237 - ehuss:hackmd-team-links, r=weihanglo
Contrib: Fix team HackMD links

This adjusts the links in the contrib guide to HackMD to use links which are publicly visible. I did not intend to use the other links which AFAIK are private to team members.
2024-01-02 16:11:32 +00:00
Eric Huss f3a4804e94 Contrib: Fix team HackMD links 2024-01-02 08:03:06 -08:00
renovate[bot] 4deb34bd0b
chore(deps): update compatible 2024-01-02 10:21:24 +00:00
bors add15366ea Auto merge of #13230 - rust-lang:renovate/gix, r=epage
chore(deps): update gix

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

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [gix](https://togithub.com/Byron/gitoxide) | workspace.dependencies | minor | `0.56.0` -> `0.57.1` |
| [gix-features-for-configuration-only](https://togithub.com/Byron/gitoxide) | workspace.dependencies | minor | `0.35.0` -> `0.37.1` |

---

### Release Notes

<details>
<summary>Byron/gitoxide (gix)</summary>

### [`v0.57.1`](https://togithub.com/Byron/gitoxide/releases/tag/gix-v0.57.1): gix v0.57.1

[Compare Source](https://togithub.com/Byron/gitoxide/compare/gix-v0.57.0...gix-v0.57.1)

##### Chore

-   change `rust-version` manifest field back to 1.65.
    They didn't actually need to be higher to work, and changing them
    unecessarily can break downstream CI.

    Let's keep this value as low as possible, and only increase it when
    more recent features are actually used.

##### Commit Statistics

-   2 commits contributed to the release.
-   1 commit was understood as [conventional](https://www.conventionalcommits.org).
-   0 issues like '(#ID)' were seen in commit messages

##### Commit Details

<csr-read-only-do-not-edit/>

<details><summary>view details</summary>

-   **Uncategorized**
    -   Merge branch 'msrv' ([`8c492d7`](https://togithub.com/Byron/gitoxide/commit/8c492d7))
    -   Change `rust-version` manifest field back to 1.65. ([`3bd09ef`](https://togithub.com/Byron/gitoxide/commit/3bd09ef))

</details>

### [`v0.57.0`](https://togithub.com/Byron/gitoxide/releases/tag/gix-v0.57.0): gix v0.57.0

[Compare Source](https://togithub.com/Byron/gitoxide/compare/gix-v0.56.0...gix-v0.57.0)

##### Chore

-   <csr-id-aea89c3ad52f1a800abb620e9a4701bdf904ff7d/> upgrade MSRV to v1.70
    Our MSRV follows the one of `helix`, which in turn follows Firefox.

##### New Features

-   `Repository::rev_parse*()` now supports `branch@{upstream|push|u|p}`.
    Previously it would be parsed, but always error as the implementation didn't exist.
    Now it will return the fetch and push tracking branches respectively.
-   Add `Reference::remote_tracking_ref_name()` and `*::remote_ref_name()`.
    These methods mirror their respective `Repository::branch_*` prefixed versions.
-   add `Repository::branch_remote_tracking_ref_name()`.
-   add `push.default` config key
-   add `config::Snapshot::trusted_program()`.
    That way it's possible to obtain an executable, program or script
    from a key in the configuration that is in a trusted section of the
    configuration.

    This goes along with a new `command` feature that brings in the `command`
    module at the top level to be able to execute such commands.
-   add `clone::PrepareFetch::with_in_memory_config_overrides()`.
    With it one can affect the repository configuration right before fetching.

##### New Features (BREAKING)

-   `Repository::remote_names|remote_default_name()` now returns `Cow<'_, BStr>` instead of `Cow<'_, str>`.
    That way information won't degenerate due to enforcement of UTF-8.

##### Bug Fixes (BREAKING)

-   rename `Repository::branch_remote_ref()` to `Repository::branch_remote_ref_name()`, add `direction` argument (also to `Repository::branch_remote_name()` and `Repository::branch_remote()`).
    This better differentiates the return value from the corresponding ref objects,
    which would require the named ref to exist in the repository.

    The `direction` argument allows to get the reference to push to as well.
    Further, it now takes a full ref name to support deriving the name of branches
    to push to.

    Regarding `Repository::branch_remote()`,  previously, this functionality
    was only available from a `Reference`,
    but now it's more generally available with just a branch name.

    The method was also adjusted to permit looking up non-symbolic remote
    names, like remotes that are specified by their URL.
-   mark `gix::interrupt::init_handler()` as unsafe
    The passed `interrupt()` argument will be called from a signal
    handler, so that needs to be documented and the call sites need to
    state that they fulfill the contract.

    Thanks to [`@&#8203;Manishearth](https://togithub.com/Manishearth)` for pointing this out.

##### Commit Statistics

-   40 commits contributed to the release over the course of 22 calendar days.
-   22 days passed between releases.
-   10 commits were understood as [conventional](https://www.conventionalcommits.org).
-   4 unique issues were worked on: [#&#8203;1158](https://togithub.com/Byron/gitoxide/issues/1158), [#&#8203;1165](https://togithub.com/Byron/gitoxide/issues/1165), [#&#8203;1178](https://togithub.com/Byron/gitoxide/issues/1178), [#&#8203;1191](https://togithub.com/Byron/gitoxide/issues/1191)

##### Thanks Clippy

[Clippy](https://togithub.com/rust-lang/rust-clippy) helped 1 time to make code idiomatic.

##### Commit Details

<csr-read-only-do-not-edit/>

<details><summary>view details</summary>

-   **[#&#8203;1158](https://togithub.com/Byron/gitoxide/issues/1158)**
    -   Remove extra-lines from changelog ([`11c9f66`](https://togithub.com/Byron/gitoxide/commit/11c9f66))
-   **[#&#8203;1165](https://togithub.com/Byron/gitoxide/issues/1165)**
    -   Complete partial note ([`8ef0538`](https://togithub.com/Byron/gitoxide/commit/8ef0538))
-   **[#&#8203;1178](https://togithub.com/Byron/gitoxide/issues/1178)**
    -   Add `config::Snapshot::trusted_program()`. ([`3f84213`](https://togithub.com/Byron/gitoxide/commit/3f84213))
-   **[#&#8203;1191](https://togithub.com/Byron/gitoxide/issues/1191)**
    -   Add note to clarify what users might want to do ([`2e04403`](https://togithub.com/Byron/gitoxide/commit/2e04403))
-   **Uncategorized**
    -   Prepare changelogs of next release ([`e78a92b`](https://togithub.com/Byron/gitoxide/commit/e78a92b))
    -   Merge branch 'maintenance' ([`4454c9d`](https://togithub.com/Byron/gitoxide/commit/4454c9d))
    -   Upgrade MSRV to v1.70 ([`aea89c3`](https://togithub.com/Byron/gitoxide/commit/aea89c3))
    -   Thanks clippy ([`d38d1cc`](https://togithub.com/Byron/gitoxide/commit/d38d1cc))
    -   Merge branch 'tracking-branch' ([`0fe20e8`](https://togithub.com/Byron/gitoxide/commit/0fe20e8))
    -   Refactor ([`530c15d`](https://togithub.com/Byron/gitoxide/commit/530c15d))
    -   `Repository::rev_parse*()` now supports `branch@{upstream|push|u|p}`. ([`3fba5b8`](https://togithub.com/Byron/gitoxide/commit/3fba5b8))
    -   Add `Reference::remote_tracking_ref_name()` and `*::remote_ref_name()`. ([`270322e`](https://togithub.com/Byron/gitoxide/commit/270322e))
    -   Add `Repository::branch_remote_tracking_ref_name()`. ([`4aa4b05`](https://togithub.com/Byron/gitoxide/commit/4aa4b05))
    -   Rename `Repository::branch_remote_ref()` to `Repository::branch_remote_ref_name()`, add `direction` argument (also to `Repository::branch_remote_name()` and `Repository::branch_remote()`). ([`404fde5`](https://togithub.com/Byron/gitoxide/commit/404fde5))
    -   `Repository::remote_names|remote_default_name()` now returns `Cow<'_, BStr>` instead of `Cow<'_, str>`. ([`5c07c76`](https://togithub.com/Byron/gitoxide/commit/5c07c76))
    -   Add `push.default` config key ([`8ac2dcc`](https://togithub.com/Byron/gitoxide/commit/8ac2dcc))
    -   Merge branch 'match_ceiling_dir_or_error' ([`cda5b51`](https://togithub.com/Byron/gitoxide/commit/cda5b51))
    -   Merge branch 'main' into fix-1183 ([`1691ba6`](https://togithub.com/Byron/gitoxide/commit/1691ba6))
    -   Release gix-ref v0.39.1 ([`c1cfe6e`](https://togithub.com/Byron/gitoxide/commit/c1cfe6e))
    -   Merge branch 'patch-1' ([`20dce42`](https://togithub.com/Byron/gitoxide/commit/20dce42))
    -   Differentiate between `Executable` and `Program` ([`56d1d09`](https://togithub.com/Byron/gitoxide/commit/56d1d09))
    -   Add `core.editor` key ([`ff71e07`](https://togithub.com/Byron/gitoxide/commit/ff71e07))
    -   Merge branch 'archive-handling' ([`7549559`](https://togithub.com/Byron/gitoxide/commit/7549559))
    -   Check all git-lfs managed files into the repository ([`35439de`](https://togithub.com/Byron/gitoxide/commit/35439de))
    -   Git-lfs might fail early; let's rely on these caches to be recreated, where possible ([`b6f2b81`](https://togithub.com/Byron/gitoxide/commit/b6f2b81))
    -   Release gix-hash v0.13.3, gix-index v0.27.1 ([`98b08f4`](https://togithub.com/Byron/gitoxide/commit/98b08f4))
    -   Merge branch 'mailmap-config-section' ([`8dda069`](https://togithub.com/Byron/gitoxide/commit/8dda069))
    -   Use new `mailmap` keys and make a few improvements. ([`7f65ffd`](https://togithub.com/Byron/gitoxide/commit/7f65ffd))
    -   Assign more suitable types to `mailmap` keys ([`1bf3e88`](https://togithub.com/Byron/gitoxide/commit/1bf3e88))
    -   Add config section for mailmap.{blob,file}. ([`86c7fa1`](https://togithub.com/Byron/gitoxide/commit/86c7fa1))
    -   Merge branch 'configure-prepare-fetch' ([`281fda0`](https://togithub.com/Byron/gitoxide/commit/281fda0))
    -   Add `clone::PrepareFetch::with_in_memory_config_overrides()`. ([`b5c36b8`](https://togithub.com/Byron/gitoxide/commit/b5c36b8))
    -   Allow overriding Git configuration when cloning. ([`9833b45`](https://togithub.com/Byron/gitoxide/commit/9833b45))
    -   Merge branch 'push-yvzxzqrkkvry' ([`4917beb`](https://togithub.com/Byron/gitoxide/commit/4917beb))
    -   Fixup new unsafe interrupt handler ([`c23bb87`](https://togithub.com/Byron/gitoxide/commit/c23bb87))
    -   Mark `gix::interrupt::init_handler()` as unsafe ([`59b8104`](https://togithub.com/Byron/gitoxide/commit/59b8104))
    -   Reduce size of unsafe block in signal handler ([`d77bc0e`](https://togithub.com/Byron/gitoxide/commit/d77bc0e))
    -   Release gix-config v0.32.1 ([`cd26fd8`](https://togithub.com/Byron/gitoxide/commit/cd26fd8))
    -   Merge branch 'adjustments-for-cargo' ([`56588a9`](https://togithub.com/Byron/gitoxide/commit/56588a9))
    -   Fix import/prevent warning ([`ec0211a`](https://togithub.com/Byron/gitoxide/commit/ec0211a))

</details>

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
2024-01-02 03:24:42 +00:00
bors 61f07b2494 Auto merge of #13228 - rust-lang:renovate/alpine-3.x, r=epage
chore(deps): update alpine docker tag to v3.19

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

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| alpine | final | minor | `3.18` -> `3.19` |

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
2024-01-02 02:47:02 +00:00
bors 059ec6974f Auto merge of #13226 - ehuss:fix-empty-span, r=weihanglo
rustfix: Support inserting new lines.

If rustfix received a suggestion which inserts new lines without replacing existing lines, it would ignore the suggestion. This is because `parse_snippet` would immediately return if the `lines` to replace was empty.

The solution here is to just drop the code which messes with the original text line. `cargo fix` (and compiletest) currently do not use this. This was originally added back in the days when rustfix supported an interactive UI which showed color highlighting of what it looks like with the replacement. My feeling is that when we add something like this back in, I would prefer to instead use a real diff library and display instead of trying to do various text manipulation for display. This particular code has generally been buggy, and has been a problem several times.

The included test fails without this fix because the changes do not apply, and the code cannot compile.

This also includes a little bit of cleanup for the `parse_and_replace` test. My feeling is that this test could use further improvements.
2024-01-02 02:00:38 +00:00
bors 903a509919 Auto merge of #13220 - ehuss:fix_in_dependency, r=weihanglo
Fix fix::fix_in_dependency to not rely on rustc

This changes the `fix::fix_in_dependency` test so that it does not rely on the behavior of rustc.

This test is checking the behavior when rustc includes a suggestion diagnostic that modifies a file in CARGO_HOME from a dependency. rustc should not be emitting suggestions that point outside of the current crate, but there are some known bugs where it does this. #9938 added a workaround for this to avoid writing to CARGO_HOME.

However, the current test was relying on one of those bugs in rustc to exhibit its behavior. https://github.com/rust-lang/rust/pull/119204 is fixing that particular behavior. Instead of relying on issues in rustc, this PR changes the test so that the test creates a fake `rustc` executable that will emit a hard-coded JSON message that tells `cargo fix` to modify a file in CARGO_HOME. This should be stable as it is no longer relying on rustc.

Testing or validating this change is a little tricky. You have to essentially comment out [these three lines](4f70d1781a/src/cargo/ops/fix.rs (L654-L656)) from the original #9938 change, and verify that the test fails (it says "Fixed" in the output). With those three lines in place, it should pass.
2024-01-01 21:27:29 +00:00
renovate[bot] 37f4a971ca
chore(deps): update gix 2024-01-01 03:52:17 +00:00
renovate[bot] 647dc34c27
chore(deps): update alpine docker tag to v3.19 2024-01-01 01:19:21 +00:00
Eric Huss 3d3e1b3668 Handle Windows newlines.
Suggestions that come from rustc that are multi-line only use LF line
endings. But if the file is checked out on windows with CRLF
line-endings, then you end up with a mix of line endings that don't
match the "fixed.rs" file.

Tracking this at https://github.com/rust-lang/rust/issues/119482.
2023-12-31 16:20:41 -08:00
Eric Huss a21997f0cc rustfix: Support inserting new lines.
If rustfix received a suggestion which inserts new lines without
replacing existing lines, it would ignore the suggestion. This is
because `parse_snippet` would immediately return if the `lines` to
replace was empty.

The solution here is to just drop the code which messes with the
original text line. `cargo fix` (and compiletest) currently do not use
this. This was originally added back in the days when rustfix supported
an interactive UI which showed color highlighting of what it looks like
with the replacement. My feeling is that when we add something like this
back in, I would prefer to instead use a real diff library and display
instead of trying to do various text manipulation for display. This
particular code has generally been buggy, and has been a problem several
times.

The included test fails without this fix because the changes do not
apply, and the code cannot compile.
2023-12-31 10:18:22 -08:00
Eric Huss 029fe2bafc Add a primitive way to add new tests to parse_and_replace.
This adds an environment variable to make it easier to add new tests.
2023-12-31 09:58:37 -08:00
Eric Huss c54fa88ea4 Cleanup rustfix parse_and_replace test.
This is just some minor code cleanup for the parse_and_replace test,
there should not be any functional differences.
2023-12-31 09:56:20 -08:00
bors ef94adb927 Auto merge of #13224 - ehuss:fix-error-format, r=epage
cleanup: Remove error-format special-case in `cargo fix`

`cargo fix` had some special handling to deal with ensuring that the `--error-format=json` flag was passed to rustc. However, cargo was changed in https://github.com/rust-lang/cargo/pull/7450 to always pass that flag. This special handling is no longer necessary, so this PR removes it.
2023-12-31 02:20:45 +00:00
Eric Huss 1a8034cc80 cleanup: Remove error-format special-case in cargo fix
`cargo fix` had some special handling to deal with ensuring that the
`--error-format=json` flag was passed to rustc. However, cargo was
changed in https://github.com/rust-lang/cargo/pull/7450 to always pass
that flag. This special handling is no longer necessary, so this PR
removes it.
2023-12-30 18:18:45 -08:00
bors bc7e5cefca Auto merge of #13225 - ehuss:fix-jobserver-always, r=epage
`cargo fix`: always inherit the jobserver

https://github.com/rust-lang/cargo/pull/12951 changed `cargo fix` to ensure that `rustc` has access to the jobserver. However, it only did that for the final "verification" step. It was not set for any of the previous calls to rustc (which is up to ~5 calls).

I'm not sure if this was done intentionally, I did not see any discussion of this in #12951.

This isn't too important in the grand scheme of things, because `rustc` is not doing codegen, so the parallel behavior is currently not used. However, this removes an extraneous `warning: failed to connect to jobserver from environment variable` warning that is printed in cargo's log every time it runs rustc. It also might be relevant in the future if rustc enables the parallel frontend.
2023-12-31 01:17:27 +00:00
Eric Huss 448c437ef0 fix: cargo fix: always inherit the jobserver 2023-12-30 15:10:04 -08:00
Eric Huss 1ef1b7e313 Fix fix::fix_in_dependency to not rely on rustc 2023-12-29 12:56:23 -08:00
bors 2ed2dbd8ce Auto merge of #13221 - ehuss:bump-cargo-credential, r=epage
Bump cargo-credential to 0.4.3

This should fix the check-version-bump CI job. #13216 made some changes without bumping the version.
2023-12-29 20:48:16 +00:00
Eric Huss 1bab2005f3 Bump cargo-credential to 0.4.3 2023-12-29 12:44:31 -08:00
bors 4f70d1781a Auto merge of #13213 - stupendoussuperpowers:mulpack-features-git, r=epage
`cargo add` - fix for adding features from repository with multiple packages.

Fixes #13121

As discussed in the issue, when using `cargo add` to add a package with features from a git repository from one of it's members, the command might fail due to improper target for querying for said features.

This PR adds a test for this edge-case where we expect it to fail with current code. It also adds a fix for this, and updates the test to expect success.

While populating available features, the current code does a `Fuzzy` search which might lead to searching for features in a wrong member package. If we change it to an `Exact` query, we get back the proper member to search within.
2023-12-29 18:46:27 +00:00
bors 04b6aed4d5 Auto merge of #13216 - rustaceanclub:master, r=epage
Remove repetitive words
2023-12-29 13:01:22 +00:00
cui fliter 5c7fbd80f2 Remove repetitive words
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-12-29 13:55:24 +08:00
sanchit e46d80e24e Fixes #13121: Use Exact query during populating features. Update test
fix target output
2023-12-29 10:03:54 +05:30
bors 312ad26ca3 Auto merge of #13212 - Brooooooklyn:master, r=epage
Add cargo:rustc-cdylib-link-arg into RESERVED_PREFIXES list

After https://github.com/rust-lang/cargo/pull/12201 was merged, the `cargo:rustc-cdylib-link-arg` in build script no longer works
```rs
println!("cargo:rustc-cdylib-link-arg=-Wl");
println!("cargo:rustc-cdylib-link-arg=-undefined");
println!("cargo:rustc-cdylib-link-arg=dynamic_lookup");
```
2023-12-29 02:04:16 +00:00