badboy / mdbook-toc

A preprocessor for mdbook to add inline Table of Contents support.
Mozilla Public License 2.0
163 stars 20 forks source link

Build (without lock) fails – mdbook has undone their breaking update to their public `toml` dependency #45

Closed steffahn closed 1 year ago

steffahn commented 1 year ago

Here’s the revert in mdbook’s repo. Here’s the relevant PR in this repo that made mdbook-toc follow the change (to fix build errors at the time).

And the unsurprising compilation error

    Checking mdbook-toc v0.14.0 (/…/mdbook-toc)
error[E0277]: the trait bound `Config: From<Option<&toml::map::Map<std::string::String, toml::value::Value>>>` is not satisfied
  --> src/lib.rs:80:60
   |
80 |         let cfg = ctx.config.get_preprocessor(self.name()).try_into()?;
   |                                                            ^^^^^^^^ the trait `From<Option<&toml::map::Map<std::string::String, toml::value::Value>>>` is not implemented for `Config`
   |
   = note: required for `Option<&toml::map::Map<std::string::String, toml::value::Value>>` to implement `Into<Config>`
   = note: required for `Config` to implement `TryFrom<Option<&toml::map::Map<std::string::String, toml::value::Value>>>`
   = note: required for `Option<&toml::map::Map<std::string::String, toml::value::Value>>` to implement `TryInto<Config>`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `mdbook-toc` (lib) due to previous error
badboy commented 1 year ago

-_- we did the same dance a while ago.