Cj-bc/homebrew-sonic-pi-tool

failed to select a version for the requirement `clap = "~2.20"`

aikomastboom opened this issue ยท 4 comments

$ brew install --HEAD Cj-bc/sonic-pi-tool/sonic-pi-tool
...
๐Ÿบ /usr/local/Cellar/rust/1.47.0: 12,057 files, 576.9MB
==> Installing cj-bc/sonic-pi-tool/sonic-pi-tool --HEAD
==> cargo install --force --root /usr/local/Cellar/sonic-pi-tool/HEAD --git https://github.com/lpil/sonic-pi-tool/
Last 15 lines from /Users/aiko/Library/Logs/Homebrew/sonic-pi-tool/01.sonic-pi-tool:
2020-11-23 15:13:44 +0100

cargo install --force --root /usr/local/Cellar/sonic-pi-tool/HEAD --git https://github.com/lpil/sonic-pi-tool/

Updating git repository `https://github.com/lpil/sonic-pi-tool/`

Installing sonic-pi-tool v0.1.0 (https://github.com/lpil/sonic-pi-tool/#62185f85)
Updating crates.io index
error: failed to compile sonic-pi-tool v0.1.0 (https://github.com/lpil/sonic-pi-tool/#62185f85), intermediate artifacts can be found at /private/tmp/cargo-installBdJAWh

Caused by:
failed to select a version for the requirement clap = "~2.20"
candidate versions found which didn't match: 2.33.3, 2.33.2, 2.33.1, ...
location searched: crates.io index
required by package sonic-pi-tool v0.1.0 (/Users/aiko/Library/Caches/Homebrew/cargo_cache/git/checkouts/sonic-pi-tool-647a8cc43a045f33/62185f8)

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

Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels.

Cj-bc commented

I'm searching for this, but might take some time

I think this is problem with sonic-pi-tool itself rather than this formula, because error seems occured while cargo install.
I'll try by myself on my mac later

Cj-bc commented

I understand the situation, but I wonder why this occurs...

-- FYI --

It seems like specified version of clap, which is dependency of sonic-pi-tool, is marked as yanked which means they won't be used as dependency if it isn't specified in cargo.lock.
And all versions that can match ~2.20 which means greater than 2.20.0 but less than 2.21.0 are all yanked so that cargo couldn't find any version.
But it's strange for this case because cargo.lock exists and it specifies specific version...

https://doc.rust-lang.org/cargo/reference/publishing.html

https://github.com/lpil/sonic-pi-tool/blob/62185f85fe632dfce309cd61f56be3e195fb08a0/Cargo.lock#L94

https://crates.io/crates/clap/versions

Cj-bc commented

I could reproduce that behavior on my mac and now it should be fixed!
The problem was that cargo install ignores lock file by default...

@aikomastboom can you try again now?

work for me too ๐Ÿ‘

==> Downloading https://github.com/lpil/sonic-pi-tool
Already downloaded: /Users/aiko/Library/Caches/Homebrew/downloads/ce9d7b5120fd0cc29fb0e822dae0105e037800a838135e1e331ff85c1592eff8--sonic-pi-tool
Warning: Cannot verify integrity of ce9d7b5120fd0cc29fb0e822dae0105e037800a838135e1e331ff85c1592eff8--sonic-pi-tool
A checksum was not provided for this resource.
For your reference the SHA-256 is: b8d34b1d05df8e463045bf34043ac101c1b0d581d9d511c1c0a8ffca6103a1ca
==> cargo install --locked --force --root /usr/local/Cellar/sonic-pi-tool/HEAD --git https://github.com/lpil/sonic-
๐Ÿบ  /usr/local/Cellar/sonic-pi-tool/HEAD: 5 files, 1MB, built in 45 seconds