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 install cargo-binstall failing with gix-ref v0.41.0 #1634

Closed
wasabrot opened this issue Feb 26, 2024 · 2 comments
Closed

cargo install cargo-binstall failing with gix-ref v0.41.0 #1634

wasabrot opened this issue Feb 26, 2024 · 2 comments

Comments

@wasabrot
Copy link

Hello -

When running 'cargo install cargo-binstall' in docker, the install brakes with a compile error due to gix-ref crate. An issue has already been recorded here: Issue-Tracker git-ref

Try with Dockerfile:

FROM rust:1.75-bookworm as build
RUN cargo install cargo-binstall 
# fails as well: --version 1.6.2

Error:

21.85    Compiling gix-ref v0.41.0
21.87    Compiling gix-filter v0.9.0
21.92    Compiling gix-pathspec v0.6.0
21.94    Compiling gix-pack v0.47.0
21.96    Compiling gix-traverse v0.37.0
22.00    Compiling gix-revision v0.26.1
22.02    Compiling serde-tuple-vec-map v1.0.1
22.06    Compiling gix-negotiate v0.12.0
22.08 error[E0599]: the method `context` exists for fn item `fn(&mut &[u8]) -> Result<SignatureRef<'_>, ErrMode<_>> {decode::<'_, _>}`, but its trait bounds were not satisfied
22.08    --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-ref-0.41.0/src/store/file/log/line.rs:142:46
22.08     |
22.08 142 |                 gix_actor::signature::decode.context(StrContext::Expected("<name> <<email>> <timestamp>".into())),
22.08     |                                              ^^^^^^^ method cannot be called due to unsatisfied trait bounds
22.08     |
22.08     = note: the following trait bounds were not satisfied:
22.08             `<for<'a> fn(&'a mut &[u8]) -> Result<SignatureRef<'_>, winnow::error::ErrMode<_>> {gix_actor::signature::decode::<'_, _>} as FnOnce<(&mut _,)>>::Output = Result<_, ErrMode<_>>`
22.08             which is required by `for<'a> fn(&'a mut &[u8]) -> Result<SignatureRef<'_>, winnow::error::ErrMode<_>> {gix_actor::signature::decode::<'_, _>}: winnow::Parser<_, _, _>`
22.08             `<&for<'a> fn(&'a mut &[u8]) -> Result<SignatureRef<'_>, winnow::error::ErrMode<_>> {gix_actor::signature::decode::<'_, _>} as FnOnce<(&mut _,)>>::Output = Result<_, ErrMode<_>>`
22.08             which is required by `&for<'a> fn(&'a mut &[u8]) -> Result<SignatureRef<'_>, winnow::error::ErrMode<_>> {gix_actor::signature::decode::<'_, _>}: winnow::Parser<_, _, _>`
22.08             `<&mut for<'a> fn(&'a mut &[u8]) -> Result<SignatureRef<'_>, winnow::error::ErrMode<_>> {gix_actor::signature::decode::<'_, _>} as FnOnce<(&mut _,)>>::Output = Result<_, ErrMode<_>>`
22.08             which is required by `&mut for<'a> fn(&'a mut &[u8]) -> Result<SignatureRef<'_>, winnow::error::ErrMode<_>> {gix_actor::signature::decode::<'_, _>}: winnow::Parser<_, _, _>`
22.08     = help: items from traits can only be used if the trait is in scope
22.08 help: the following trait is implemented but not in scope; perhaps add a `use` for it:
22.08     |
22.08 76  +     use winnow::parser::Parser;
22.08     |
22.08 
22.11    Compiling gix-index v0.29.0
22.17    Compiling gix-diff v0.40.0
22.18    Compiling rustc_version v0.4.0

Cloning cargo-binstall and compiling works, even with gix-ref v0.41.0; not sure what the issue actually is.

@NobodyXu
Copy link
Member

It's an upstream issue, it should work if you pass --locked to cargo-install.

@NobodyXu
Copy link
Member

Or you could use the official prebuilt version of cargo-binstall:

RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash

@NobodyXu NobodyXu closed this as completed Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants