Skip to content

Dependencies don't build #2

Description

@sffc

I added pso-rs to my Cargo.toml, and when I try to build, I get these errors:

error[E0432]: unresolved import `console::Term`
  --> /Users/sffc/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/indicatif-0.16.2/src/state.rs:10:5
   |
10 | use console::Term;
   |     ^^^^^^^^^^^^^ no `Term` in the root
   |
note: found an item that was configured out
  --> /Users/sffc/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/console-0.16.1/src/lib.rs:92:42
   |
90 | #[cfg(feature = "std")]
   |       --------------- the item is gated behind the `std` feature
91 | pub use crate::term::{
92 |     user_attended, user_attended_stderr, Term, TermFamily, TermFeatures, TermTarget,
   |                                          ^^^^
help: consider importing this variant instead
   |
10 - use console::Term;
10 + use crate::state::ProgressDrawTargetKind::Term;
   |

error[E0432]: unresolved imports `console::measure_text_width`, `console::Style`
  --> /Users/sffc/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/indicatif-0.16.2/src/style.rs:1:15
   |
 1 | use console::{measure_text_width, Style};
   |               ^^^^^^^^^^^^^^^^^^  ^^^^^ no `Style` in the root
   |               |
   |               no `measure_text_width` in the root
   |
note: found an item that was configured out
  --> /Users/sffc/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/console-0.16.1/src/lib.rs:96:44
   |
94 | #[cfg(feature = "std")]
   |       --------------- the item is gated behind the `std` feature
95 | pub use crate::utils::{
96 |     colors_enabled, colors_enabled_stderr, measure_text_width, pad_str, pad_str_with,
   |                                            ^^^^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> /Users/sffc/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/console-0.16.1/src/lib.rs:98:19
   |
94 | #[cfg(feature = "std")]
   |       --------------- the item is gated behind the `std` feature
...
98 |     Color, Emoji, Style, StyledObject,
   |                   ^^^^^

error[E0432]: unresolved imports `console::measure_text_width`, `console::Style`
  --> /Users/sffc/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/indicatif-0.16.2/src/utils.rs:7:15
   |
 7 | use console::{measure_text_width, Style};
   |               ^^^^^^^^^^^^^^^^^^  ^^^^^ no `Style` in the root
   |               |
   |               no `measure_text_width` in the root
   |
note: found an item that was configured out
  --> /Users/sffc/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/console-0.16.1/src/lib.rs:96:44
   |
94 | #[cfg(feature = "std")]
   |       --------------- the item is gated behind the `std` feature
95 | pub use crate::utils::{
96 |     colors_enabled, colors_enabled_stderr, measure_text_width, pad_str, pad_str_with,
   |                                            ^^^^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> /Users/sffc/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/console-0.16.1/src/lib.rs:98:19
   |
94 | #[cfg(feature = "std")]
   |       --------------- the item is gated behind the `std` feature
...
98 |     Color, Emoji, Style, StyledObject,
   |                   ^^^^^

For more information about this error, try `rustc --explain E0432`.
error: could not compile `indicatif` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...

I fixed it locally by adding to my Cargo.toml file:

console = { version = "0.16", features = ["std"] }

even though I don't directly need the console crate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions