-
Notifications
You must be signed in to change notification settings - Fork 174
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
Make Daemon feature imply streaming feature #376
Conversation
0961852
to
f5e817a
Compare
I suppose that a possible reason for the current state of affairs is to notify the user in the case that they are missing the audio backend (rather than just the streaming feature) For that we can write a If that sounds good, I'll push it |
Sounds good. When I try to run the app with
Improve the error message (with compiler error) when user runs |
f5e817a
to
cbbc4bd
Compare
Just force pushed a commit for that. For reference,
|
Forbids compilation of one non functional feature combination Now, `cargo check --no-default-features --features streaming` (lacking an audio backend) returns a compilation error instead of silently producing a failing binary.
Remove runtime error, favouring compile time verification
cbbc4bd
to
b8274bd
Compare
Right now launching spotify_player with the
daemon
CLI flag results in a runtime error if the binary was compiled without the streaming feature. As far as I understand it, I do not see why not just do this. The README says it still indicates that it needs some audio backend but AFAIK there's no way to encode that in the feature system.Note: stumbled into this for the CI suite. There's tooling (aka
cargo hack
) that uses feature dependencies to build many options. This would stop compilation of binaries with the daemon feature without the streaming feature, reducing number of possible checks. Also just general less possible binaries.