gitui-org / gitui-org/gitui

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

Aperta
#2,708 2 commenti 7 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
Rust
Stelle
22.5k
Fork
773
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

# 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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Confronta il codice sorgente di asyncgit 0.27.0 nel registro crates, in particolare src/sync/patches.rs, con il commit a91132d187b9d353ea1d2c0cb6790e44f7256eb0. Inizia eseguendo rustup update, seleziona Rust stabile e riproduci cargo install --locked gitui; poi esamina il percorso CI che usa invece cargo install --path .. Il lavoro è completato quando l’installazione dal registro riesce e CI copre questo metodo di installazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
git, rust
Ambito
build-system, cli
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.