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

Cannot compile #114

Closed
h3x4d3c1m4l opened this issue Aug 5, 2023 · 4 comments
Closed

Cannot compile #114

h3x4d3c1m4l opened this issue Aug 5, 2023 · 4 comments

Comments

@h3x4d3c1m4l
Copy link

h3x4d3c1m4l commented Aug 5, 2023

Hi! Unfortunately I can't get 0.10.0 and 0.10.1 to compile. The same error shows up on both Windows as well as macOS with the latest Rust version (1.71.1).

   Compiling mdbook v0.4.33
   Compiling mdbook-admonish v1.10.1
error[E0308]: mismatched types
  --> /Users/sander/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mdbook-admonish-1.10.1/src/book_config.rs:9:30
   |
9  |       let table: toml::Table = ctx
   |  ________________-----------___^
   | |                |
   | |                expected due to this
10 | |         .config
11 | |         .get_preprocessor("admonish")
12 | |         .context("No configuration for mdbook-admonish in book.toml")?
13 | |         .to_owned();
   | |___________________^ expected `Map<String, Value>`, found a different `Map<String, Value>`
   |
   = note: `Map<String, Value>` and `Map<String, Value>` have similar names, but are actually distinct types
note: `Map<String, Value>` is defined in crate `toml`
  --> /Users/sander/.cargo/registry/src/index.crates.io-6f17d22bba15001f/toml-0.5.11/src/map.rs:32:1
   |
32 | pub struct Map<K, V> {
   | ^^^^^^^^^^^^^^^^^^^^
note: `Map<String, Value>` is defined in crate `toml`
  --> /Users/sander/.cargo/registry/src/index.crates.io-6f17d22bba15001f/toml-0.7.6/src/map.rs:32:1
   |
32 | pub struct Map<K, V> {
   | ^^^^^^^^^^^^^^^^^^^^
   = note: perhaps two different versions of crate `toml` are being used?

For more information about this error, try `rustc --explain E0308`.
error: could not compile `mdbook-admonish` (lib) due to previous error
error: failed to compile `mdbook-admonish v1.10.1`, intermediate artifacts can be found at `/var/folders/1t/pcxhs0r11zjb8_l47w6wrzwh0000gn/T/cargo-install9dd3kl`
@tommilligan
Copy link
Owner

Thanks for reporting. Could you share the exact command you run to see this error?

The cause is definitely perhaps two different versions of crate toml are being used?, which points to either you needing to install with cargo install mdbook-admonish --locked or fixing your Cargo.toml if installing as a library.

Either way knowing your exact command would be useful for me to fix/clarify this for others 🙂

@h3x4d3c1m4l
Copy link
Author

h3x4d3c1m4l commented Aug 5, 2023

cargo install mdbook-admonish. Will try with --locked!

EDIT: works fine, thanks!!

@tommilligan
Copy link
Owner

Yep, so I think this is an unintentional breaking change in mdbook:

Looks to be being reverted, and the install can be mitigated with --locked, so closing as no further action required.

@tommilligan
Copy link
Owner

Should be mitigated fully now by #115 and released in 1.10.2

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