Skip to content

PathBuf-related compilation errors #36

@atheriel

Description

@atheriel

Describe the bug

I'm getting compilation errors when installing 0.7.2 (and earlier releases as well):

cargo install whis-cli
    Updating crates.io index
  Installing whis-cli v0.7.2
    Updating crates.io index
    <snip>
   Compiling whis-cli v0.7.2
error[E0277]: can't compare `PathBuf` with `std::string::String`
  --> /home/aaron/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/whis-cli-0.7.2/src/commands/setup/local.rs:83:70
   |
83 |                         .find(|m| ParakeetModel.default_path(m.name) == *p)
   |                                                                      ^^ no implementation for `PathBuf == std::string::String`
   |
   = help: the trait `PartialEq<std::string::String>` is not implemented for `PathBuf`
   = help: the following other types implement trait `PartialEq<Rhs>`:
             `PathBuf` implements `PartialEq<&Path>`
             `PathBuf` implements `PartialEq<&std::ffi::OsStr>`
             `PathBuf` implements `PartialEq<Cow<'_, Path>>`
             `PathBuf` implements `PartialEq<Cow<'_, std::ffi::OsStr>>`
             `PathBuf` implements `PartialEq<OsString>`
             `PathBuf` implements `PartialEq<Path>`
             `PathBuf` implements `PartialEq<std::ffi::OsStr>`
             `PathBuf` implements `PartialEq`

error[E0277]: can't compare `PathBuf` with `std::string::String`
   --> /home/aaron/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/whis-cli-0.7.2/src/commands/setup/local.rs:142:69
    |
142 |                         .find(|m| WhisperModel.default_path(m.name) == *p)
    |                                                                     ^^ no implementation for `PathBuf == std::string::String`
    |
    = help: the trait `PartialEq<std::string::String>` is not implemented for `PathBuf`
    = help: the following other types implement trait `PartialEq<Rhs>`:
              `PathBuf` implements `PartialEq<&Path>`
              `PathBuf` implements `PartialEq<&std::ffi::OsStr>`
              `PathBuf` implements `PartialEq<Cow<'_, Path>>`
              `PathBuf` implements `PartialEq<Cow<'_, std::ffi::OsStr>>`
              `PathBuf` implements `PartialEq<OsString>`
              `PathBuf` implements `PartialEq<Path>`
              `PathBuf` implements `PartialEq<std::ffi::OsStr>`
              `PathBuf` implements `PartialEq`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `whis-cli` (bin "whis") due to 2 previous errors
error: failed to compile `whis-cli v0.7.2`, intermediate artifacts can be found at `/tmp/cargo-install2m7Hem`.

I suspect this is a rustc compatibility issue. I'm on 1.90 from last year. Is it intentional to require a very new toolchain?

To reproduce
Steps to reproduce:

  1. rustup default 1.90.0-x86_64-unknown-linux-gnu
  2. cargo install whis-cli

Expected behavior

No compiler errors.

Environment

  • OS: Ubuntu 24.04
  • Whis version: 0.7.2
  • Installation method: cargo install

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions