Michael-F-Bryan / mdbook-epub

An experimental mdbook backend for creating EPUB documents.
https://michael-f-bryan.github.io/mdbook-epub/
Mozilla Public License 2.0
377 stars 46 forks source link

`cargo install mdbook-epub` is broken #74

Closed nnethercote closed 1 year ago

nnethercote commented 1 year ago

When I run cargo install mdbook-epub I get this compile error:

   Compiling mdbook-epub v0.4.31
error[E0277]: `?` couldn't convert the error to `Error`
  --> /Users/njn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mdbook-epub-0.4.31/src/config.rs:34:63
   |
34 |                 let mut cfg: Config = table.clone().try_into()?;
   |                                                               ^ the trait `From<toml::de::Error>` is not implemented for `Error`
   |
   = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
   = help: the following other types implement trait `From<T>`:
             <Error as From<SemVerError>>
             <Error as From<ReqParseError>>
             <Error as From<Box<ureq::Error>>>
             <Error as From<epub_builder::Error>>
             <Error as From<mdbook::errors::Error>>
             <Error as From<ureq::Error>>
             <Error as From<RenderError>>
             <Error as From<toml::de::Error>>
             <Error as From<std::io::Error>>
   = note: required for `Result<config::Config, Error>` to implement `FromResidual<Result<Infallible, toml::de::Error>>`

I see this with rust 1.71 and nightly 1.73.

This caused CI breakage for me here: https://github.com/nnethercote/perf-book/actions/runs/5572424446/jobs/10178452751. I will have to disable the epub build for the Rust perf-book because of this :(

blandger commented 1 year ago

Thank you for reporting. I will handle that and release new version.

blandger commented 1 year ago

@nnethercote Tested latest 0.4.32 version it was installed without errors on my linux.

........
   Compiling mdbook v0.4.32
   Compiling mdbook-epub v0.4.32
    Finished release [optimized] target(s) in 12.47s
  Installing /home/user/.cargo/bin/mdbook-epub
   Installed package `mdbook-epub v0.4.32` (executable `mdbook-epub`)
nnethercote commented 1 year ago

Thanks! I was able to re-enable ePub for the Rust perf-book.