crowdagger/crowbook

error[E0432]: unresolved import `text_view`

twirrim opened this issue · 2 comments

Steps to repeat

$ rustc -V
rustc 1.29.0 (aa3ca1994 2018-09-11)
$ cargo new cooktest
$ cd cooktest
$ vim Cargo.toml
....

append

[dependencies]
crowbook = {version = "0.11", default-features = false}

Then build

$ cargo build

Eventually I get:

   Compiling crowbook v0.11.4
error[E0432]: unresolved import `text_view`
  --> /home/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/crowbook-0.11.4/src/lib/html_dir.rs:28:5
   |
28 | use text_view::view_as_text;
   |     ^^^^^^^^^ Maybe a missing `extern crate text_view;`?

error[E0432]: unresolved import `text_view`
  --> /home/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/crowbook-0.11.4/src/lib/book.rs:37:5
   |
37 | use text_view::view_as_text;
   |     ^^^^^^^^^ Maybe a missing `extern crate text_view;`?

error[E0432]: unresolved import `text_view`
  --> /home/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/crowbook-0.11.4/src/lib/epub.rs:29:5
   |
29 | use text_view::view_as_text;
   |     ^^^^^^^^^ Maybe a missing `extern crate text_view;`?

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0432`.
error: Could not compile `crowbook`.

To learn more, run the command again with --verbose.

I don't think verbose provides any further useful information other than the rust command used to compile. I can add if you think it's worth it.

Your crowbook version is outdated.

[dependencies]
crowbook = {version = "0.14", default-features = false}

It works with 0.14.

Realised where I got that old version number from: https://docs.rs/crowbook/0.14.1/crowbook/
Submitted this: #58

But I can't help but think there ought to be a better way to do it than this. It seems silly work to have to bump up the version there every time you do a release.