pdfrip
pdfrip copied to clipboard
Fix indicatif compatibility with console
Fix build error
Build logs
cargo build --release
Updating `ustc` index
Locking 2 packages to latest compatible versions
Downgrading indicatif v0.18.0 -> v0.16.2 (available: v0.18.0)
Adding number_prefix v0.4.0
Compiling indicatif v0.16.2
error[E0432]: unresolved import `console::Term`
--> /build/.cargo/registry/src/04b7754156161b43/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
--> /build/.cargo/registry/src/04b7754156161b43/console-0.16.0/src/lib.rs:92:42
|
92 | user_attended, user_attended_stderr, Term, TermFamily, TermFeatures, TermTarget,
| ^^^^
note: the item is gated behind the `std` feature
--> /build/.cargo/registry/src/04b7754156161b43/console-0.16.0/src/lib.rs:90:7
|
90 | #[cfg(feature = "std")]
| ^^^^^^^^^^^^^^^
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`
--> /build/.cargo/registry/src/04b7754156161b43/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
--> /build/.cargo/registry/src/04b7754156161b43/console-0.16.0/src/lib.rs:96:44
|
96 | colors_enabled, colors_enabled_stderr, measure_text_width, pad_str, pad_str_with,
| ^^^^^^^^^^^^^^^^^^
note: the item is gated behind the `std` feature
--> /build/.cargo/registry/src/04b7754156161b43/console-0.16.0/src/lib.rs:94:7
|
94 | #[cfg(feature = "std")]
| ^^^^^^^^^^^^^^^
note: found an item that was configured out
--> /build/.cargo/registry/src/04b7754156161b43/console-0.16.0/src/lib.rs:98:19
|
98 | Color, Emoji, Style, StyledObject,
| ^^^^^
note: the item is gated behind the `std` feature
--> /build/.cargo/registry/src/04b7754156161b43/console-0.16.0/src/lib.rs:94:7
|
94 | #[cfg(feature = "std")]
| ^^^^^^^^^^^^^^^
error[E0432]: unresolved imports `console::measure_text_width`, `console::Style`
--> /build/.cargo/registry/src/04b7754156161b43/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
--> /build/.cargo/registry/src/04b7754156161b43/console-0.16.0/src/lib.rs:96:44
|
96 | colors_enabled, colors_enabled_stderr, measure_text_width, pad_str, pad_str_with,
| ^^^^^^^^^^^^^^^^^^
note: the item is gated behind the `std` feature
--> /build/.cargo/registry/src/04b7754156161b43/console-0.16.0/src/lib.rs:94:7
|
94 | #[cfg(feature = "std")]
| ^^^^^^^^^^^^^^^
note: found an item that was configured out
--> /build/.cargo/registry/src/04b7754156161b43/console-0.16.0/src/lib.rs:98:19
|
98 | Color, Emoji, Style, StyledObject,
| ^^^^^
note: the item is gated behind the `std` feature
--> /build/.cargo/registry/src/04b7754156161b43/console-0.16.0/src/lib.rs:94:7
|
94 | #[cfg(feature = "std")]
| ^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0432`.
error: could not compile `indicatif` (lib) due to 3 previous errors
Can confirm this fixes the build error
This patch is used downstream in
- https://github.com/Homebrew/homebrew-core/pull/241291