gitui-org / gitui-org/gitui

cargo install on latest stable fails. Looks like asyncgit 0.27 is not actually published.

Offen
#2,708 2 Kommentare 7 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Rust
Sterne
22.5k
Forks
773
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

# Cause

The source for asyncgit 0.27.0 on crates.io differs from the source (also 0.27.0) in this repo. This lifetime fix : a91132d187b9d353ea1d2c0cb6790e44f7256eb0 is not present [here](https://docs.rs/crate/asyncgit/latest/source/src/sync/patches.rs) on crates.io.

I think the problem is not caught by CI since it installs from a cloned repo instead of from the crates registry. I've had similar issues building gitui with `cargo install gitui` in the past. Maybe it's worth creating another job that does that method of installing instead of `cargo install --path .`

I can't live without Gitui. Thank you for a great project!

# Bug

**Describe the bug**
Cargo install with the latest stable toolchain fails due to the following error:

```
Compiling asyncgit v0.27.0
error[E0621]: explicit lifetime required in the type of `patch`
--> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/asyncgit-0.27.0/src/sync/patches.rs:66:2
|
66 | Ok(res)
| ^^^^^^^ lifetime `'a` required
|
help: add explicit lifetime `'a` to the type of `patch`
|
44 | patch: &'a git2::Patch<'a>,
| +++++++++

For more information about this error, try `rustc --explain E0621`.
error: could not compile `asyncgit` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `gitui v0.27.0`, intermediate artifacts can be found...
```

**To Reproduce**
Steps to reproduce the behavior:
rustup update
rustup default stable
cargo install --locked gitui

**Expected behavior**
Compilation

**Context (please complete the following information):**
- OS/Distro: Ubuntu 25
- GitUI Version: 0.27
- Rust version: 1.89

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Vergleiche den asyncgit-Quellcode 0.27.0 in der crates registry, insbesondere src/sync/patches.rs, mit dem Commit a91132d187b9d353ea1d2c0cb6790e44f7256eb0. Beginne mit rustup update, wähle stabiles Rust aus und reproduziere cargo install --locked gitui; untersuche anschließend den CI-Pfad, der stattdessen cargo install --path . verwendet. Erledigt ist die Aufgabe, wenn die Installation aus der Registry erfolgreich ist und CI diese Installationsmethode abdeckt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
git, rust
Bereich
build-system, cli
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.