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

Compilation error: two versions of indicatif used #10

Closed
cherryblossom000 opened this issue Jan 24, 2023 · 1 comment
Closed

Compilation error: two versions of indicatif used #10

cherryblossom000 opened this issue Jan 24, 2023 · 1 comment

Comments

@cherryblossom000
Copy link

cherryblossom000 commented Jan 24, 2023

error[E0308]: mismatched types
  --> /Users/myusername/.cargo/registry/src/github.com-1ecc6299db9ec823/one2html-1.1.1/src/utils.rs:12:41
   |
12 |     let _state = happylog::set_progress(&bar);
   |                  ---------------------- ^^^^ expected struct `indicatif::progress_bar::ProgressBar`, found struct `ProgressBar`
   |                  |
   |                  arguments to this function are incorrect
   |
   = note: struct `ProgressBar` and struct `indicatif::progress_bar::ProgressBar` have similar names, but are actually distinct types
note: struct `ProgressBar` is defined in crate `indicatif`
  --> /Users/myusername/.cargo/registry/src/github.com-1ecc6299db9ec823/indicatif-0.16.2/src/progress_bar.rs:23:1
   |
23 | pub struct ProgressBar {
   | ^^^^^^^^^^^^^^^^^^^^^^
note: struct `indicatif::progress_bar::ProgressBar` is defined in crate `indicatif`
  --> /Users/myusername/.cargo/registry/src/github.com-1ecc6299db9ec823/indicatif-0.17.3/src/progress_bar.rs:21:1
   |
21 | pub struct ProgressBar {
   | ^^^^^^^^^^^^^^^^^^^^^^
   = note: perhaps two different versions of crate `indicatif` are being used?
note: function defined here
  --> /Users/myusername/.cargo/registry/src/github.com-1ecc6299db9ec823/happylog-0.2.0/src/console_emitter.rs:93:8
   |
93 | pub fn set_progress(pb: &ProgressBar) -> LogPBState {
   |        ^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0308`.
Full log
❯ cargo install --no-default-features one2html
    Updating crates.io index
  Installing one2html v1.1.1
   Compiling proc-macro2 v1.0.50
   Compiling quote v1.0.23
   Compiling unicode-ident v1.0.6
   Compiling syn v1.0.107
   Compiling version_check v0.9.4
   Compiling libc v0.2.139
   Compiling autocfg v1.1.0
   Compiling cfg-if v1.0.0
   Compiling memchr v2.3.4
   Compiling lazy_static v1.4.0
   Compiling num-traits v0.2.15
   Compiling radium v0.5.3
   Compiling getrandom v0.1.16
   Compiling serde v1.0.152
   Compiling serde_derive v1.0.152
   Compiling lexical-core v0.7.6
   Compiling nom v6.2.1
   Compiling once_cell v1.17.0
   Compiling unicode-width v0.1.10
   Compiling unicase v2.6.0
   Compiling ppv-lite86 v0.2.17
   Compiling bitflags v1.3.2
   Compiling rand_core v0.5.1
   Compiling proc-macro-error-attr v1.0.4
   Compiling siphasher v0.3.10
   Compiling rand_pcg v0.2.1
   Compiling rand_chacha v0.2.2
   Compiling phf_shared v0.8.0
   Compiling tracing-core v0.1.30
   Compiling rand v0.7.3
   Compiling proc-macro-error v1.0.4
   Compiling arrayvec v0.5.2
   Compiling funty v1.1.0
   Compiling static_assertions v1.1.0
   Compiling wyz v0.2.0
   Compiling tap v1.0.1
   Compiling ryu v1.0.12
   Compiling bitvec v0.19.6
   Compiling tracing-attributes v0.1.23
   Compiling phf_generator v0.8.0
   Compiling thread_local v1.1.4
   Compiling aho-corasick v0.7.15
   Compiling sharded-slab v0.1.4
   Compiling miniz_oxide v0.4.4
   Compiling regex-syntax v0.6.28
   Compiling pin-project-lite v0.2.9
   Compiling cc v1.0.78
   Compiling unicode-segmentation v1.10.0
   Compiling portable-atomic v0.3.19
   Compiling backtrace v0.3.59
   Compiling regex v1.4.6
   Compiling heck v0.3.3
   Compiling tracing-subscriber v0.2.25
   Compiling phf_codegen v0.8.0
   Compiling textwrap v0.11.0
   Compiling console v0.15.5
   Compiling atty v0.2.14
   Compiling strsim v0.8.0
   Compiling encoding_rs v0.8.31
   Compiling gimli v0.24.0
   Compiling log v0.4.17
   Compiling paste v1.0.11
   Compiling tracing v0.1.37
   Compiling adler v1.0.2
   Compiling number_prefix v0.4.0
   Compiling percent-encoding v2.2.0
   Compiling thiserror v1.0.38
   Compiling humansize v1.1.1
   Compiling eyre v0.6.8
   Compiling ansi_term v0.12.1
   Compiling askama_escape v0.10.3
   Compiling vec_map v0.8.2
   Compiling addr2line v0.15.2
   Compiling clap v2.34.0
   Compiling tracing-error v0.1.2
   Compiling structopt-derive v0.4.18
   Compiling palette v0.5.0
   Compiling mime_guess v2.0.4
   Compiling thiserror-impl v1.0.38
   Compiling rustc-demangle v0.1.21
   Compiling either v1.8.0
   Compiling object v0.24.0
   Compiling indenter v0.3.3
   Compiling owo-colors v1.3.0
   Compiling color-spantrace v0.1.6
   Compiling itertools v0.9.0
   Compiling indicatif v0.17.3
   Compiling phf v0.8.0
   Compiling approx v0.3.2
   Compiling enum-primitive-derive v0.2.2
   Compiling palette_derive v0.5.0
   Compiling terminal_size v0.1.17
   Compiling structopt v0.3.26
   Compiling widestring v0.4.3
   Compiling mime v0.3.16
   Compiling uuid v0.8.2
   Compiling bytes v0.5.6
   Compiling happylog v0.2.0
   Compiling console v0.14.1
   Compiling color-eyre v0.5.11
   Compiling indicatif v0.16.2
   Compiling sanitize-filename v0.3.0
   Compiling onenote_parser v0.3.1
   Compiling toml v0.5.11
   Compiling askama_shared v0.11.2
   Compiling askama_derive v0.10.5
   Compiling askama v0.10.5
   Compiling one2html v1.1.1
error[E0308]: mismatched types
  --> /Users/myusername/.cargo/registry/src/github.com-1ecc6299db9ec823/one2html-1.1.1/src/utils.rs:12:41
   |
12 |     let _state = happylog::set_progress(&bar);
   |                  ---------------------- ^^^^ expected struct `indicatif::progress_bar::ProgressBar`, found struct `ProgressBar`
   |                  |
   |                  arguments to this function are incorrect
   |
   = note: struct `ProgressBar` and struct `indicatif::progress_bar::ProgressBar` have similar names, but are actually distinct types
note: struct `ProgressBar` is defined in crate `indicatif`
  --> /Users/myusername/.cargo/registry/src/github.com-1ecc6299db9ec823/indicatif-0.16.2/src/progress_bar.rs:23:1
   |
23 | pub struct ProgressBar {
   | ^^^^^^^^^^^^^^^^^^^^^^
note: struct `indicatif::progress_bar::ProgressBar` is defined in crate `indicatif`
  --> /Users/myusername/.cargo/registry/src/github.com-1ecc6299db9ec823/indicatif-0.17.3/src/progress_bar.rs:21:1
   |
21 | pub struct ProgressBar {
   | ^^^^^^^^^^^^^^^^^^^^^^
   = note: perhaps two different versions of crate `indicatif` are being used?
note: function defined here
  --> /Users/myusername/.cargo/registry/src/github.com-1ecc6299db9ec823/happylog-0.2.0/src/console_emitter.rs:93:8
   |
93 | pub fn set_progress(pb: &ProgressBar) -> LogPBState {
   |        ^^^^^^^^^^^^

For more information about this error, try rustc --explain E0308.
error: could not compile one2html due to previous error
error: failed to compile one2html v1.1.1, intermediate artifacts can be found at /var/folders/4_/6kk1zdsj72zbhg5rk8z8tnfr0000gn/T/cargo-installn065ME

This occurred on stable v1.66.1 (cargo install --no-default-features one2html) and v1.69.0-nightly (cargo +nightly install one2html).

@cherryblossom000
Copy link
Author

My bad, opened this issue on the wrong repository

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

1 participant