Skip to content

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

@sorenrade

Description

@sorenrade

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 : a91132d 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions