nickgerace / gfold

CLI tool to help keep track of your Git repositories, written in Rust
https://crates.io/crates/gfold
Apache License 2.0
308 stars 20 forks source link

brew upgrade fails for 4.0.0 #201

Closed patryk-s closed 2 years ago

patryk-s commented 2 years ago

Upgrading fails via brew on macOS 12.13.1 (M1)

$ cargo --version
cargo 1.59.0
$ brew upgrade
==> Upgrading 1 outdated package:
nickgerace/nickgerace/gfold 3.0.0 -> 4.0.0
==> Downloading https://github.com/nickgerace/gfold/archive/refs/tags/4.0.0.tar.gz
Already downloaded: /Users/madeyoulook/Library/Caches/Homebrew/downloads/6cce67192febbafd684b46630662298e7cb5606c2eee8968621c887d340fbf78--gfold-4.0.0.tar.gz
==> Upgrading nickgerace/nickgerace/gfold
  3.0.0 -> 4.0.0

==> cargo install
Last 15 lines from /Users/madeyoulook/Library/Logs/Homebrew/gfold/01.cargo:
cargo
install
--locked
--root
/opt/homebrew/Cellar/gfold/4.0.0
--path
.

  Installing gfold v4.0.0 (/private/tmp/gfold-20220511-36324-uas33a/gfold-4.0.0)
    Updating crates.io index
error: failed to select a version for the requirement `libgit2-sys = "^0.13.3"`
candidate versions found which didn't match: 0.13.2+1.4.2, 0.13.1+1.4.2, 0.13.0+1.4.1, ...
location searched: crates.io index
required by package `git2 v0.14.3`
    ... which satisfies dependency `git2 = "^0"` (locked to 0.14.3) of package `gfold v4.0.0 (/private/tmp/gfold-20220511-36324-uas33a/gfold-4.0.0)`

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/nickgerace/homebrew-nickgerace/issues

Also, that last link for reporting issues does not work -- issues are turned off for that repo.

patryk-s commented 2 years ago

Actually, not brew related -- same thing for locked cargo install:

$ cargo install --locked gfold
    Updating crates.io index
  Installing gfold v4.0.0
error: failed to select a version for the requirement `libgit2-sys = "^0.13.3"`
candidate versions found which didn't match: 0.13.2+1.4.2, 0.13.1+1.4.2, 0.13.0+1.4.1, ...
location searched: crates.io index
required by package `git2 v0.14.3`
    ... which satisfies dependency `git2 = "^0"` (locked to 0.14.3) of package `gfold v4.0.0`
nickgerace commented 2 years ago

@patryk-s I noticed the issue has been closed. What was the solution to your problem? Perhaps, I can use the solution in documentation or the homebrew formula.

patryk-s commented 2 years ago

Sorry, closed it by mistake.

patryk-s commented 2 years ago

no idea why, but running this helps (this is after fetching the 4.0.0.tgz)

$ cargo update
    Updating crates.io index
    Updating git2 v0.14.3 -> v0.14.2
    Updating libgit2-sys v0.13.3+1.4.2 -> v0.13.2+1.4.2
$ cargo check
   Compiling libc v0.2.125
   Compiling proc-macro2 v1.0.38
    Checking cfg-if v1.0.0
   Compiling autocfg v1.1.0
   Compiling unicode-xid v0.2.3
[...]
    Checking git2 v0.14.2
    Checking toml v0.5.9
    Checking gfold v4.0.0 (/Users/ps/git/gfold-4.0.0)
    Finished dev [unoptimized + debuginfo] target(s) in 11.31s

I mean, helps with building from source, not for brew install.

nickgerace commented 2 years ago

I suspect an underlying crate was yanked. I'll investigate.

patryk-s commented 2 years ago

looks like this is a known problem in git2-rs

nickgerace commented 2 years ago

Good catch @patryk-s. I'll publish a patch release with a newer version of git2-rs.