frewsxcv / rust-crates-index

Rust library for retrieving and interacting with the crates.io index
https://docs.rs/crates-index/
Apache License 2.0
72 stars 37 forks source link

chore: update to gix v0.59 #162

Closed MarcoIeni closed 7 months ago

MarcoIeni commented 7 months ago

Right now cargo check -F git is broken.

Error:

error[E0599]: the method `context` exists for fn item `fn(&mut &[u8]) -> Result<SignatureRef<'_>, ErrMode<_>> {decode::<'_, _>}`, but its trait bounds were not satisfied
   --> /Users/marcoieni/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-ref-0.41.0/src/store/file/log/line.rs:142:46
    |
142 |                 gix_actor::signature::decode.context(StrContext::Expected("<name> <<email>> <timestamp>".into())),
    |                                              ^^^^^^^ method cannot be called due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `<for<'a> fn(&'a mut &[u8]) -> Result<SignatureRef<'_>, winnow::error::ErrMode<_>> {gix_actor::signature::decode::<'_, _>} as FnOnce<(&mut _,)>>::Output = Result<_, ErrMode<_>>`
            which is required by `for<'a> fn(&'a mut &[u8]) -> Result<SignatureRef<'_>, winnow::error::ErrMode<_>> {gix_actor::signature::decode::<'_, _>}: winnow::Parser<_, _, _>`
            `<&for<'a> fn(&'a mut &[u8]) -> Result<SignatureRef<'_>, winnow::error::ErrMode<_>> {gix_actor::signature::decode::<'_, _>} as FnOnce<(&mut _,)>>::Output = Result<_, ErrMode<_>>`
            which is required by `&for<'a> fn(&'a mut &[u8]) -> Result<SignatureRef<'_>, winnow::error::ErrMode<_>> {gix_actor::signature::decode::<'_, _>}: winnow::Parser<_, _, _>`
            `<&mut for<'a> fn(&'a mut &[u8]) -> Result<SignatureRef<'_>, winnow::error::ErrMode<_>> {gix_actor::signature::decode::<'_, _>} as FnOnce<(&mut _,)>>::Output = Result<_, ErrMode<_>>`
            which is required by `&mut for<'a> fn(&'a mut &[u8]) -> Result<SignatureRef<'_>, winnow::error::ErrMode<_>> {gix_actor::signature::decode::<'_, _>}: winnow::Parser<_, _, _>`
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
76  +     use winnow::parser::Parser;
    |

This PR seems to fix the issue.

If you accept this PR and merge it, can you release a new version, too, please? My crate doesn't compile for this reason.

Byron commented 7 months ago

This is interesting.

Is this something I did somehow? See also this issue that breaks similarly. It seems winnow is involved at least, but it's unclear if I could or should fix this or not.

It really seems that gix 0.58 is now broken after releasing gix 0.59. Maybe one of these newly released crates isn't a major version, but pulls in a more recent winnow patch release that can be breaking unless the code is prepared?

CC @epage .

Byron commented 7 months ago

A new release was created: https://github.com/frewsxcv/rust-crates-index/releases/tag/v2.6.0 , I hope that helps.

Byron commented 7 months ago

Please note that I yanked this release as gix 0.59 was yanked as well. There was simply no other way to fix this (somewhat quickly) :/.