Byron/crates-io-cli

Dep package `prodash` doesn't compile: error[E0599]: no method named `send` found for struct `futures_channel::mpsc::Sender<termion::event::Key>` in the current scope

behnam opened this issue · 1 comments

With latest stable rustc/cargo:

~$ cargo --version
cargo 1.47.0 (f3c7e066a 2020-08-28)
~$ rustc --version
rustc 1.47.0 (18bf6b4f0 2020-10-07)

Installing crates-io-cli fails b/c of prodash failure.

~$ cargo install crates-io-cli
    Updating crates.io index
  Installing crates-io-cli v3.3.0
   Compiling libc v0.2.80
   Compiling cfg-if v0.1.10
   Compiling autocfg v1.0.1
   Compiling lazy_static v1.4.0
   Compiling log v0.4.11
   Compiling proc-macro2 v1.0.24
   Compiling version_check v0.9.2
   Compiling unicode-xid v0.2.1
   Compiling syn v1.0.48
   Compiling memchr v2.3.4
   Compiling slab v0.4.2
   Compiling byteorder v1.3.4
   Compiling pkg-config v0.3.19
   Compiling fnv v1.0.7
   Compiling bitflags v1.2.1
   Compiling scopeguard v1.1.0
   Compiling futures-core v0.3.7
   Compiling maybe-uninit v2.0.0
   Compiling pin-project-lite v0.1.11
   Compiling futures v0.1.30
   Compiling semver-parser v0.7.0
   Compiling bytes v0.5.6
   Compiling serde v1.0.117
   Compiling once_cell v1.4.1
   Compiling futures-io v0.3.7
   Compiling itoa v0.4.6
   Compiling getrandom v0.1.15
   Compiling proc-macro-hack v0.5.19
   Compiling futures-sink v0.3.7
   Compiling core-foundation-sys v0.7.0
   Compiling cfg-if v1.0.0
   Compiling pin-utils v0.1.0
   Compiling pin-project-internal v0.4.27
   Compiling unicode-width v0.1.8
   Compiling ppv-lite86 v0.2.9
   Compiling tinyvec v0.3.4
   Compiling matches v0.1.8
   Compiling getrandom v0.2.0
   Compiling crc32fast v1.2.1
   Compiling hashbrown v0.9.1
   Compiling smallvec v1.4.2
   Compiling cache-padded v1.1.1
   Compiling percent-encoding v2.1.0
   Compiling ryu v1.0.5
   Compiling remove_dir_all v0.5.3
   Compiling httparse v1.3.4
   Compiling native-tls v0.2.4
   Compiling parking v2.0.0
   Compiling either v1.6.1
   Compiling const_fn v0.4.2
   Compiling event-listener v2.5.1
   Compiling adler v0.2.3
   Compiling numtoa v0.1.0
   Compiling try-lock v0.2.3
   Compiling serde_derive v1.0.117
   Compiling waker-fn v1.1.0
   Compiling fastrand v1.4.0
   Compiling atomic-waker v1.0.0
   Compiling parking v1.0.6
   Compiling serde_json v1.0.59
   Compiling httpdate v0.3.2
   Compiling nix v0.18.0
   Compiling tower-service v0.3.0
   Compiling cassowary v0.3.0
   Compiling encoding_rs v0.8.24
   Compiling regex-syntax v0.6.21
   Compiling unicode-segmentation v1.6.0
   Compiling linked-hash-map v0.5.3
   Compiling quick-error v1.2.3
   Compiling mime v0.3.16
   Compiling dtoa v0.4.6
   Compiling scoped-tls v1.0.0
   Compiling async-task v3.0.0
   Compiling humantime v2.0.1
   Compiling base64 v0.12.3
   Compiling take_mut v0.2.2
   Compiling horrorshow v0.8.3
   Compiling strsim v0.8.0
   Compiling ansi_term v0.11.0
   Compiling curl v0.4.34
   Compiling vec_map v0.8.2
   Compiling dia-semver v8.0.1
   Compiling adler32 v1.2.0
   Compiling ipnet v2.3.0
   Compiling fallible-streaming-iterator v0.1.9
   Compiling bytesize v1.0.1
   Compiling rle-decode-fast v1.0.1
   Compiling fallible-iterator v0.2.0
   Compiling scoped-tls v0.1.2
   Compiling termcolor v1.1.0
   Compiling glob v0.3.0
   Compiling encode_unicode v0.3.6
   Compiling open v1.4.0
   Compiling urlencoding v1.1.1
   Compiling tracing-core v0.1.17
   Compiling thread_local v1.0.1
   Compiling lock_api v0.3.4
   Compiling lock_api v0.4.1
   Compiling futures-channel v0.3.7
   Compiling standback v0.2.11
   Compiling unicase v2.6.0
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling time v0.2.22
   Compiling crossbeam-utils v0.7.2
   Compiling memoffset v0.5.6
   Compiling crossbeam-epoch v0.8.2
   Compiling indexmap v1.6.0
   Compiling num-traits v0.2.14
   Compiling miniz_oxide v0.4.3
   Compiling semver v0.9.0
   Compiling futures-task v0.3.7
   Compiling instant v0.1.8
   Compiling textwrap v0.11.0
   Compiling http v0.2.1
   Compiling unicode-bidi v0.3.4
   Compiling concurrent-queue v1.2.2
   Compiling unicode-normalization v0.1.13
   Compiling itertools v0.9.0
   Compiling humantime v1.3.0
   Compiling lru-cache v0.1.2
   Compiling tokio-sync v0.1.8
   Compiling heck v0.3.1
   Compiling rustc_version v0.2.3
   Compiling async-channel v1.5.1
   Compiling tracing v0.1.21
   Compiling want v0.3.0
   Compiling futures-lite v0.1.11
   Compiling aho-corasick v0.7.14
   Compiling csv-core v0.1.10
   Compiling idna v0.2.0
   Compiling quote v1.0.7
   Compiling smallvec v0.6.13
   Compiling regex-automata v0.1.9
   Compiling http-body v0.3.1
   Compiling jobserver v0.1.21
   Compiling libflate v0.1.27
   Compiling iovec v0.1.4
   Compiling num_cpus v1.13.0
   Compiling net2 v0.2.35
   Compiling socket2 v0.3.15
   Compiling security-framework-sys v0.4.3
   Compiling core-foundation v0.7.0
   Compiling atty v0.2.14
   Compiling termion v1.5.5
   Compiling parking_lot_core v0.8.0
   Compiling time v0.1.44
   Compiling xattr v0.2.2
   Compiling filetime v0.2.12
   Compiling parking_lot_core v0.7.2
   Compiling dirs v1.0.5
   Compiling parking_lot_core v0.6.2
   Compiling parking_lot v0.9.0
   Compiling blocking v0.4.7
   Compiling mime_guess v2.0.3
   Compiling url v2.1.1
   Compiling regex v1.4.2
   Compiling tokio-executor v0.1.10
   Compiling crossbeam-queue v0.2.3
   Compiling flate2 v1.0.18
   Compiling cc v1.0.61
   Compiling const-random-macro v0.1.11
   Compiling rmp v0.8.9
   Compiling bytes v0.4.12
   Compiling rand_core v0.5.1
   Compiling mio v0.6.22
   Compiling clap v2.33.3
   Compiling env_logger v0.7.1
   Compiling security-framework v0.4.4
   Compiling parking_lot v0.11.0
   Compiling tui v0.9.5
   Compiling tar v0.4.30
   Compiling term v0.5.2
   Compiling parking_lot v0.10.2
   Compiling bstr v0.2.14
   Compiling toml v0.5.7
   Compiling serde_urlencoded v0.6.1
   Compiling tokio-timer v0.2.13
   Compiling tokio-current-thread v0.1.7
   Compiling crossbeam-deque v0.7.3
   Compiling async-compression v0.3.5
   Compiling rmpv v0.4.5
   Compiling rmp-serde v0.14.4
   Compiling const-random v0.1.11
   Compiling rand_chacha v0.2.2
   Compiling tokio-io v0.1.13
   Compiling tokio v0.2.22
   Compiling mio-uds v0.6.8
   Compiling libz-sys v1.1.2
   Compiling openssl-sys v0.9.58
   Compiling libgit2-sys v0.12.14+1.1.0
   Compiling libsqlite3-sys v0.17.3
   Compiling curl-sys v0.4.38+curl-7.73.0
   Compiling ctrlc v3.1.7
   Compiling prettytable-rs v0.8.0
   Compiling tui-react v0.4.1
   Compiling globset v0.4.6
   Compiling csv v1.1.3
   Compiling tokio-threadpool v0.1.18
   Compiling ahash v0.3.8
   Compiling rand v0.7.3
   Compiling tokio-codec v0.1.2
   Compiling pin-project-internal v1.0.1
   Compiling time-macros-impl v0.1.1
   Compiling async-trait v0.1.41
   Compiling structopt-derive v0.4.13
   Compiling tokio-fs v0.1.7
   Compiling dashmap v3.11.10
   Compiling tokio-util v0.3.1
   Compiling tempfile v3.1.0
   Compiling pin-project v1.0.1
   Compiling time-macros v0.1.1
   Compiling pin-project v0.4.27
   Compiling tokio-reactor v0.1.12
   Compiling futures-util v0.3.7
   Compiling tracing-futures v0.2.4
   Compiling tokio-tls v0.3.1
   Compiling tokio-uds v0.2.7
   Compiling tokio-udp v0.1.6
   Compiling tokio-tcp v0.1.4
   Compiling structopt v0.3.20
   Compiling tokio v0.1.22
   Compiling git2 v0.13.12
   Compiling tokio-core v0.1.17
   Compiling criner-waste-report v0.1.4
   Compiling tokio-curl v0.1.11
   Compiling crates-index-diff v7.1.2
   Compiling h2 v0.2.7
   Compiling smol v0.1.18
   Compiling piper v0.1.3
   Compiling prodash v4.1.0
error[E0599]: no method named `send` found for struct `futures_channel::mpsc::Sender<termion::event::Key>` in the current scope
   --> /Users/behnam/.cargo/registry/src/github.com-1ecc6299db9ec823/prodash-4.1.0/src/tui/engine.rs:147:37
    |
147 |             smol::block_on(key_send.send(key)).ok();
    |                                     ^^^^ method not found in `futures_channel::mpsc::Sender<termion::event::Key>`
    |
   ::: /Users/behnam/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-channel-0.3.7/src/mpsc/mod.rs:125:1
    |
125 | pub struct Sender<T>(Option<BoundedSenderInner<T>>);
    | ----------------------------------------------------
    | |
    | doesn't satisfy `_: futures_util::SinkExt<_>`
    | doesn't satisfy `_: futures_util::sink::Sink<_>`
    |
    = note: the method `send` exists but the following trait bounds were not satisfied:
            `futures_channel::mpsc::Sender<termion::event::Key>: futures_util::sink::Sink<_>`
            which is required by `futures_channel::mpsc::Sender<termion::event::Key>: futures_util::SinkExt<_>`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `prodash`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `crates-io-cli v3.3.0`, intermediate artifacts can be found at `/var/folders/27/zbpxp72j1kxbyz2xj6jrfq380000gn/T/cargo-installnfxgAo`

Caused by:
  build failed

I've filed a bug report with prodash already. (Byron/prodash#5) However, this project probably wants to extend CI or Cargo Locks to ensure this doesn't happen.

Byron commented

Thanks for letting me know.

The issue was caused by criner-cli depending on a very old version of prodash, which seems to have caused trouble in conjunction with future_util.
A re-release of all involved crates, criner, criner-cli, crates-io-cli, seems to have fixed the issue.