badboy / mdbook-mermaid

A preprocessor for mdbook to add mermaid support
Mozilla Public License 2.0
306 stars 32 forks source link

Installation Fails on Mac #30

Closed gakonst closed 1 year ago

gakonst commented 1 year ago

System

Darwin gak-8.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000 arm64

Expected Behavior:

https://github.com/badboy/mdbook-mermaid#installation cmd works

Steps to repro:

cargo install mdbook-mermaid

Error

error[E0432]: unresolved import `clap::crate_version`
 --> /Users/georgios/.cargo/registry/src/github.com-1ecc6299db9ec823/mdbook-mermaid-0.12.3/src/bin/mdbook-mermaid.rs:1:12
  |
1 | use clap::{crate_version, Arg, ArgMatches, Command};
  |            ^^^^^^^^^^^^^ no `crate_version` in the root

error: cannot determine resolution for the macro `crate_version`
  --> /Users/georgios/.cargo/registry/src/github.com-1ecc6299db9ec823/mdbook-mermaid-0.12.3/src/bin/mdbook-mermaid.rs:23:18
   |
23 |         .version(crate_version!())
   |                  ^^^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

For more information about this error, try `rustc --explain E0432`.
error: could not compile `mdbook-mermaid` due to 2 previous errors
error: failed to compile `mdbook-mermaid v0.12.3`, intermediate artifacts can be found at `/var/folders/32/np0rcmkd3nlfnfhwwmspzjlm0000gp/T/cargo-installIWNCmd`
perilainen commented 1 year ago

seems to work with: cargo install --locked mdbook-mermaid

badboy commented 1 year ago

Ah clap breakage. I'll push a fix.

gakonst commented 1 year ago

appreciate the quick fix!