Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Compilation errors in src/dbus_mpris.rs #1144

Closed
4 of 6 tasks
gleb-chipiga opened this issue Dec 17, 2022 · 2 comments
Closed
4 of 6 tasks

Compilation errors in src/dbus_mpris.rs #1144

gleb-chipiga opened this issue Dec 17, 2022 · 2 comments
Labels
bug A functionality or parts of a program that do not work as intended

Comments

@gleb-chipiga
Copy link

Description
Compilation errors in src/dbus_mpris.rs

To Reproduce
cargo install spotifyd -F pulseaudio_backend,dbus_keyring,dbus_mpris
or
cargo install --git https://github.com/Spotifyd/spotifyd -F pulseaudio_backend,dbus_keyring,dbus_mpris

Logs

Click to show logs
   Compiling spotifyd v0.3.4 (/home/gleb/.cargo/git/checkouts/spotifyd-e8542734951960f8/db25d12)
error[E0407]: method `_type_static` is not a member of trait `Id`
   --> src/dbus_mpris.rs:361:17
    |
361 | /                 fn _type_static() -> Type
362 | |                 where
363 | |                     Self: Sized,
364 | |                 {
365 | |                     unreachable!("never called");
366 | |                 }
    | |_________________^ not a member of trait `Id`

error[E0407]: method `from_id_unchecked` is not a member of trait `Id`
   --> src/dbus_mpris.rs:368:17
    |
368 | /                 unsafe fn from_id_unchecked(_id: &str) -> Self
369 | |                 where
370 | |                     Self: Sized,
371 | |                 {
372 | |                     unreachable!("never called");
373 | |                 }
    | |_________________^ not a member of trait `Id`

error[E0404]: expected trait, found enum `PlayContextId`
   --> src/dbus_mpris.rs:350:41
    |
350 |             struct AnyContextId(Box<dyn PlayContextId>);
    |                                         ^^^^^^^^^^^^^ not a trait

error[E0404]: expected trait, found enum `PlayContextId`
   --> src/dbus_mpris.rs:375:18
    |
375 |             impl PlayContextId for AnyContextId {}
    |                  ^^^^^^^^^^^^^ not a trait

error[E0404]: expected trait, found enum `PlayableId`
   --> src/dbus_mpris.rs:378:34
    |
378 |                 Playable(Box<dyn PlayableId>),
    |                                  ^^^^^^^^^^ not a trait

Some errors have detailed explanations: E0404, E0407.
For more information about an error, try `rustc --explain E0404`.
error: could not compile `spotifyd` due to 5 previous errors
error: failed to compile `spotifyd v0.3.4 (https://github.com/Spotifyd/spotifyd#db25d12d)`, intermediate artifacts can be found at `/tmp/cargo-installDus362`

Compilation flags

  • dbus_mpris
  • dbus_keyring
  • alsa_backend
  • portaudio_backend
  • pulseaudio_backend
  • rodio_backend

Versions (please complete the following information):

  • OS: Ubuntu 22.04
  • Spotifyd: v0.3.4 and db25d12d
  • cargo: cargo 1.66.0 (d65d197ad 2022-11-15)
@gleb-chipiga gleb-chipiga added the bug A functionality or parts of a program that do not work as intended label Dec 17, 2022
@eladyn
Copy link
Member

eladyn commented Dec 17, 2022

Thank you for the report!

The issue here is that cargo, even though our Cargo.toml as well as Cargo.lock clearly states to use 0.11.5, decides to use version 0.11.6 of our dependency rspotify, which contains very welcome but breaking changes in this minor version bump. (It fixes the problem, why this ugly work-around code that's causing the error even has to exist.)

If you compile / install with --locked option, everything should be fine.

@apprehensions
Copy link

had this issue as well, its weird that option is required though..

This was referenced Mar 21, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug A functionality or parts of a program that do not work as intended
Projects
None yet
Development

No branches or pull requests

3 participants