duesee/imap-next

0.2.0 build fails when included in a project

Closed this issue · 3 comments

When adding the v0.2.0 crate to a project, the build fails:

error[E0004]: non-exhaustive patterns: `Err(DecodeMessageError::MessagePoisoned { .. })` not covered
   --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/imap-next-0.2.0/src/receive.rs:109:39
    |
109 | ...                   match self.fragmentizer.decode_message(codec) {
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Err(DecodeMessageError::MessagePoisoned { .. })` not covered
    |
note: `Result<<C as Decoder>::Message<'_>, DecodeMessageError<'_, C>>` defined here
   --> /build/rustc-1.77.2-src/library/core/src/result.rs:502:1
   ::: /build/rustc-1.77.2-src/library/core/src/result.rs:511:5
    |
    = note: not covered
    = note: the matched value is of type `Result<<C as Decoder>::Message<'_>, DecodeMessageError<'_, C>>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
133 ~                                     },
134 +                                     Err(DecodeMessageError::MessagePoisoned { .. }) => todo!()
    |

For more information about this error, try `rustc --explain E0004`.
error: could not compile `imap-next` (lib) due to 1 previous error

This happens e.g. with the email-lib crate v0.25.0 for me.

Building the crate from this repository works though, even with the 0.2.0 commit checked out. (Btw, please use at least git tags in this repo.)

Turns out I needed to downgrade imap-codec to 2.0.0-alpha.4 for it to work. Okay, I get this is all still quite in flux. (Also the sync feature does not currently compile.)

UPDATE: Needed to activate the pool feature for the sync feature to compile correctly.

Hey @djmaze,

Sorry for the late reply. I'm not entirely sure what this issue is about because it seems to conflate email-lib with imap-next. From a first glance, email-lib now relies on imap-next 0.3.0. Could you please check again if this is still an issue for you?

Btw, please use at least git tags in this repo.

Aiai! We just implemented this in #289. Thanks for your suggesstion!

Sorry for the late reply. I'm not entirely sure what this issue is about because it seems to conflate email-lib with imap-next. From a first glance, email-lib now relies on imap-next 0.3.0. Could you please check again if this is still an issue for you

Yes, this has since been fixed.

Aiai! We just implemented this in #289. Thanks for your suggesstion!

Thank you!