Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo installation is failing #45

Open
woodm1979 opened this issue May 27, 2021 · 17 comments
Open

cargo installation is failing #45

woodm1979 opened this issue May 27, 2021 · 17 comments
Assignees
Labels
bug Something isn't working

Comments

@woodm1979
Copy link

woodm1979 commented May 27, 2021

Hello!

First things first, THANK YOU SO MUCH for this excellent tool. I use it all the time.

I was trying to install the newer rust-based version of git-tidy and I'm hitting this issue:

▪ cargo install git-tidy
    Updating crates.io index
  Installing git-tidy v2.0.1
error: failed to compile `git-tidy v2.0.1`, intermediate artifacts can be found at `/tmp/cargo-installgtcftB`

Caused by:
  failed to select a version for the requirement `zeroize = "^0.9.3"`
  candidate versions found which didn't match: 1.3.0, 1.2.0, 1.1.1, ...
  location searched: crates.io index
  required by package `dialoguer v0.7.1`
      ... which is depended on by `git-tidy v2.0.1`

My rust is pretty poor. I'd love to help, but I don't have the skills. :-)

I'm strongly guessing that a newer version of dialoguer will solve the issue, but I genuinely don't know. (If this were python, I could help, but I haven't messed with rust at all.)

@alexfornuto
Copy link

@drewwyatt samesies.

@drewwyatt
Copy link
Owner

@woodm1979 AH! Somehow I missed the notification when you originally posted this. @alexfornuto thank you for commenting to put this back in my inbox. I'll try to take a look this weekend!

(thank you for the kind words! ❤️)

@drewwyatt drewwyatt self-assigned this Aug 6, 2021
@drewwyatt drewwyatt added the bug Something isn't working label Aug 6, 2021
@alexfornuto
Copy link

Well, now I feel a jerk for not also saying, it but at the time I hadn't yet installed your wonderful tool. Now I'm on the older version from Brew, and can echo the thanks for making it.

@drewwyatt
Copy link
Owner

@alexfornuto @woodm1979 Okay, so:

First: Thank you again for raising this issue! (I'll get the readme updated with these instructions too). ❤️

Second (the problem/fix/workaround): It looks like zeroize 1.4.1 now requires the "resolver" feature only available in newer versions of cargo. I tried fiddling with the dialoguer and indicatif versions to see if I could find a version that totally sidestepped this without requiring rewrites and sadly couldn't come up with anything.

The good news is that I was able to fix this by just updating cargo running rustup update. I think this should also work for y'all.

Longer term: I opened #46 and will try to update my home-brew tap this weekend.

@drewwyatt
Copy link
Owner

Update: readme has been updated

@woodm1979
Copy link
Author

Oh excellent. Thanks for checking in on this. I went ahead and updated everything using rustup update.

I seem to be having the same issue:

Warning: Giant wall of text incoming!

┌─[woodnt][hack][~]
└─▪ rustup update
info: syncing channel updates for 'stable-aarch64-apple-darwin'
info: latest update on 2021-07-29, rust version 1.54.0 (a178d0322 2021-07-26)
info: downloading component 'rust-src'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-std'
info: downloading component 'rustc'
 68.6 MiB /  68.6 MiB (100 %)  29.3 MiB/s in  2s ETA:  0s
info: downloading component 'rustfmt'
info: removing previous version of component 'rust-src'
info: removing previous version of component 'cargo'
info: removing previous version of component 'clippy'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: removing previous version of component 'rustfmt'
info: installing component 'rust-src'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-std'
 20.0 MiB /  20.0 MiB (100 %)  19.2 MiB/s in  1s ETA:  0s
info: installing component 'rustc'
 68.6 MiB /  68.6 MiB (100 %)  21.4 MiB/s in  3s ETA:  0s
info: installing component 'rustfmt'
info: checking for self-updates
info: downloading self-update

  stable-aarch64-apple-darwin updated - rustc 1.54.0 (a178d0322 2021-07-26) (from rustc 1.52.1 (9bc8c42bb 2021-05-09))

info: cleaning up downloads & tmp directories
┌─[woodnt][hack][~]
└─▪ cargo install git-tidy
    Updating crates.io index
  Installing git-tidy v2.0.1
error: failed to compile `git-tidy v2.0.1`, intermediate artifacts can be found at `/tmp/cargo-installHGhwyH`

Caused by:
  failed to select a version for the requirement `zeroize = "^0.9.3"`
  candidate versions found which didn't match: 1.4.1, 1.4.0, 1.3.0, ...
  location searched: crates.io index
  required by package `dialoguer v0.7.1`
      ... which is depended on by `git-tidy v2.0.1`
┌─[woodnt][hack][~]
└─▪ rustup update stable
info: syncing channel updates for 'stable-aarch64-apple-darwin'

  stable-aarch64-apple-darwin unchanged - rustc 1.54.0 (a178d0322 2021-07-26)

info: checking for self-updates
┌─[woodnt][hack][~]
└─▪ rustc --version
rustc 1.54.0 (a178d0322 2021-07-26)
┌─[woodnt][hack][~]
└─▪ cargo --version
cargo 1.54.0 (5ae8d74b3 2021-06-22)

I wonder if this is somehow because I'm on apple-silicon. I'm looking into this but again, my rust is pretty weak.

@alexfornuto
Copy link

My rust is non-existent, and I hope that this doesn't preclude me from using this tool.

❯ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: checking for self-updates

  stable-x86_64-unknown-linux-gnu unchanged - rustc 1.54.0 (a178d0322 2021-07-26)

info: cleaning up downloads & tmp directories
❯ rustc --version
rustc 1.54.0 (a178d0322 2021-07-26)
❯ cargo update
error: could not find `Cargo.toml` in `/home/alex` or any parent directory
❯ cargo install git-tidy
    Updating crates.io index
  Installing git-tidy v2.0.1
error: failed to compile `git-tidy v2.0.1`, intermediate artifacts can be found at `/tmp/cargo-installWw6n2S`

Caused by:
  failed to select a version for the requirement `zeroize = "^0.9.3"`
  candidate versions found which didn't match: 1.4.1, 1.4.0, 1.3.0, ...
  location searched: crates.io index
  required by package `dialoguer v0.7.1`
      ... which is depended on by `git-tidy v2.0.1`
❯ uname -a
Linux $HOSTNAME 4.19.0-17-cloud-amd64 #1 SMP Debian 4.19.194-2 (2021-06-21) x86_64 GNU/Linux

I tried to research the error about Cargo.toml, but the threaded responses from project maintainers did not seem user-friendly. Is cargo only supposed to handle Rust dependencies on a project level, versus applications available at the user level or greater?

@drewwyatt
Copy link
Owner

@alexfornuto @woodm1979 🤔 weeeeeiiiiird.

I wasn't able to get the home-brew tap updated this weekend but I promise to do my best to get that knocked out tonight or tomorrow evening. Is home-brew a viable option for both of you?

@alexfornuto
Copy link

Homebrew is a viable option for me.

@woodm1979
Copy link
Author

I can absolutely use the homebrew solution. I'm just trying to help with feedback and bug reports.

I searched around and others needed to upgrade dialoguer.
sdttttt/gcr#63
I didn't see anything else and certainly nothing that pointed at apple-silicon.

@drewwyatt
Copy link
Owner

drewwyatt commented Aug 10, 2021

@alexfornuto @woodm1979 just pushed an update to my homebrew tap. When y'all get a chance, can you give that a shot and report back? (I'm honestly not sure how home-brew caching works, you may need to run brew unstop dreww/att/tap, then brew tap drewwyatt/tap again or use flags when running upgrade like brew upgrade --force --fetch-HEAD git-tidy)

(that should install 2.0.1)

If it still doesn't work, I also pushed a Mac binary to the releases here if you are just looking to upgrade and need a workaround for now while I figure this out.

@drewwyatt
Copy link
Owner

Also, just in case it wasn't clear already: I really appreciate both of you! Thank you so much for using this, for helping with debugging, and for your patience while I figure this out! ❤️❤️❤️

@alexfornuto
Copy link

Here's hoping this update gets through, GitHub is currently having problems.

For context, the system I'm using is Debian Linux. I was able to get 2.0.1 installed, with a few extra steps:

❯ brew update
fatal: Couldn't find remote ref refs/heads/master
Error: Fetching /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/drewwyatt/homebrew-tap failed!
❯ brew unstop dreww/att/tap
Error: Unknown command: unstop
❯ brew untap dreww/att/tap
Error: Invalid tap name 'dreww/att/tap'
❯ brew tap drewwyatt/tap
❯ brew upgrade
❯ brew upgrade --force --fetch-HEAD git-tidy
Warning: drewwyatt/tap/git-tidy 1.0.0 already installed
❯ brew untap drewwyatt/tap
Error: Refusing to untap drewwyatt/tap because it contains the following installed formulae or casks:
git-tidy
❯ brew remove git-tidy
Uninstalling /home/linuxbrew/.linuxbrew/Cellar/git-tidy/1.0.0... (5 files, 3.8MB)
❯ brew untap drewwyatt/tap
Untapping drewwyatt/tap...
Untapped 2 formulae (58 files, 230.9KB).
❯ brew tap drewwyatt/tap
==> Tapping drewwyatt/tap
Cloning into '/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/drewwyatt/homebrew-tap'...
remote: Enumerating objects: 61, done.
remote: Counting objects: 100% (17/17), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 61 (delta 1), reused 17 (delta 1), pack-reused 44
Unpacking objects: 100% (61/61), done.
Tapped 1 formula (74 files, 296.6KB).
❯ brew install git-tidy
==> Installing git-tidy from drewwyatt/tap
==> Downloading https://github.com/drewwyatt/homebrew-tap/releases/download/git-tidy-2.0.1/git-tidy-2.0.1.x86_64_linux.bottle.t
==> Downloading from https://github-releases.githubusercontent.com/181093375/fcfb20ed-fde1-436e-a7a6-ceb94eb86c63?X-Amz-Algorit
######################################################################## 100.0%
==> Pouring git-tidy-2.0.1.x86_64_linux.bottle.tar.gz
🍺  /home/linuxbrew/.linuxbrew/Cellar/git-tidy/2.0.1: 7 files, 3MB
Removing: /home/alex/.cache/Homebrew/git-tidy--1.0.0.tar.gz... (8.0KB)
❯ git-tidy --version
git-tidy 2.0.1

@ehiggs
Copy link

ehiggs commented Nov 19, 2021

Hi, I'm on Ubuntu 21.10 and get this error with Rust 1.56.0:

❯ cargo install git-tidy
    Updating crates.io index
  Installing git-tidy v2.0.1
error: failed to compile `git-tidy v2.0.1`, intermediate artifacts can be found at `/tmp/cargo-installYlv8Ca`

Caused by:
  failed to select a version for the requirement `zeroize = "^0.9.3"`
  candidate versions found which didn't match: 1.4.3, 1.4.2, 1.4.1, ...
  location searched: crates.io index
  required by package `dialoguer v0.7.1`
      ... which satisfies dependency `dialoguer = "^0.7.1"` of package `git-tidy v2.0.1`

@drewwyatt
Copy link
Owner

@ehiggs I'm on vacation right now but can take a look ~the middle of next week. Sorry for the inconvenience!

@alexfornuto
Copy link

So I tried to install git-tidy in the Linux environment on my new Chromebook, and ended up back at this issue again through normal troubleshooting. I forgot where we left it here. Installation via cargo is still failing for the same reasons. What's the current status of the homebrew version?

@drewwyatt
Copy link
Owner

@alexfornuto so, i never got back to this 😬 . The good(?) news is that the homebrew version and the cargo version are functionally equivilant. The cargo version is (as you might expect) written in Rust, and the homebrew version is the previous version i wrote in Go. They both do exactly the same thing, though so installing from homebrew won't (yet) cause you to miss out on any features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants