cargo install on latest stable fails. Looks like asyncgit 0.27 is not actually published.
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 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
Any workaround available ?
Assuming you mean you just want a way to get it to install? I can't remember which version I got to install. Maybe try cargo install gitui@^0.26 and if that doesn't work, cargo install --locked gitui@^0.26. Or, clone the repo, cd inside, and cargo install --path . for the latest version.