spotifyd
spotifyd copied to clipboard
add documentation to configuration fields that are not allowed under some circumstances
For example: mixer, control and device only apply if the alsa_backend feature is enabled (I think, someone needs to check against this before starting to implement stuff). No idea how to do this in a clean way. Maybe a cfg_attr checking for the feature and only adding the fields to the SharedConfigValues struct if that is the case.
If the above method works, this should actually be a pretty easy enhancement :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi @SirWindfield . I wanted to help. But I'm not sure about the scope of the PR.
If the goal is to conditionally include fields (not only docs) to SharedConfigValues, it might be quite challenging, since I tried a bit and will affect other structs such as SpotifydConfig as well as changes in macro definitions.
Maybe I missunderstood the issue and the only intention is to have these fields hidden from the documentation when alsa-backend feature is not enabled. On which case, I think I can make a quick PR.
Let me know if I can help! :smiley:
I think the idea was to use cfg_attr(feature = "alsa_backend") for example on a field. That way, if the alsa backend is enabled, it would include the struct field, otherwise not. Since alsa-related code is only included if alsa is enabled, there shouldn't be any access to the fields anyway so it can be removed.
I am not sure if this is still a good idea though user-wise. It would force people to change their config, but I think it's actually good that way.
Hello @SirWindfield . It seems @CPerezz has not made any progress, but can I help and make a PR?
Hello @SirWindfield . It seems @CPerezz has not made any progress, but can I help and make a PR?
I have a PR pending for review. Forgot to link it... Let me do so
Right, thanks. And great work! 👍
is this still open?