spotifyd icon indicating copy to clipboard operation
spotifyd copied to clipboard

add documentation to configuration fields that are not allowed under some circumstances

Open mainrs opened this issue 6 years ago • 7 comments

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 :)

mainrs avatar Oct 17 '19 21:10 mainrs

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.

stale[bot] avatar Jan 13 '21 16:01 stale[bot]

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:

CPerezz avatar Jan 30 '21 01:01 CPerezz

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.

mainrs avatar Jan 30 '21 10:01 mainrs

Hello @SirWindfield . It seems @CPerezz has not made any progress, but can I help and make a PR?

Icelk avatar Feb 19 '21 19:02 Icelk

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

CPerezz avatar Feb 19 '21 19:02 CPerezz

Right, thanks. And great work! 👍

Icelk avatar Feb 19 '21 19:02 Icelk

is this still open?

MJWcodr avatar Aug 23 '23 06:08 MJWcodr