Skip to content
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

Log warning if deprecated control is used #11972

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

Holzhaus
Copy link
Member

This will make it easier to find uses of deprecated controls. Idea blatantly stolen from @Swiftb0y who suggested it here: #11960 (comment)

@Swiftb0y
Copy link
Member

should we raise the severity conditionally (eg add a member to ControlFlag and check similar to AllowInvalidKey) for C++ access?

Copy link
Member

@Swiftb0y Swiftb0y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. though its not my turn to merge IMO since it was my suggestion.

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thank you.

@daschuer daschuer merged commit 2975ec5 into mixxxdj:2.4 Sep 14, 2023
11 checks passed
@daschuer daschuer added this to the 2.4.0 milestone Sep 14, 2023
@daschuer
Copy link
Member

I think this causes a regresson, in case the original CO is not deprecteded but are just short hands for the bulky original:

warning [Main] ControlObject accessed via deprecated key "[Channel3]" "filterLow" - use "[EqualizerRack1_[Channel3]_Effect1]" "parameter1" instead
warning [Main] ControlObject accessed via deprecated key "[Channel3]" "filterMid" - use "[EqualizerRack1_[Channel3]_Effect1]" "parameter2" instead
warning [Main] ControlObject accessed via deprecated key "[Channel3]" "filterHigh" - use "[EqualizerRack1_[Channel3]_Effect1]" "parameter3" instead
warning [Main] ControlObject accessed via deprecated key "[Channel3]" "filterLowKill" - use "[EqualizerRack1_[Channel3]_Effect1]" "button_parameter1" instead
warning [Main] ControlObject accessed via deprecated key "[Channel3]" "filterMidKill" - use "[EqualizerRack1_[Channel3]_Effect1]" "button_parameter2" instead
warning [Main] ControlObject accessed via deprecated key "[Channel3]" "filterHighKill" - use "[EqualizerRack1_[Channel3]_Effect1]" "button_parameter3" instead
warning [Main] ControlObject accessed via deprecated key "[Channel1]" "filterLow" - use "[EqualizerRack1_[Channel1]_Effect1]" "parameter1" instead
warning [Main] ControlObject accessed via deprecated key "[Channel1]" "filterMid" - use "[EqualizerRack1_[Channel1]_Effect1]" "parameter2" instead
warning [Main] ControlObject accessed via deprecated key "[Channel1]" "filterHigh" - use "[EqualizerRack1_[Channel1]_Effect1]" "parameter3" instead
warning [Main] ControlObject accessed via deprecated key "[Channel1]" "filterLowKill" - use "[EqualizerRack1_[Channel1]_Effect1]" "button_parameter1" instead
warning [Main] ControlObject accessed via deprecated key "[Channel1]" "filterMidKill" - use "[EqualizerRack1_[Channel1]_Effect1]" "button_parameter2" instead
warning [Main] ControlObject accessed via deprecated key "[Channel1]" "filterHighKill" - use "[EqualizerRack1_[Channel1]_Effect1]" "button_parameter3" instead
warning [Main] ControlObject accessed via deprecated key "[Channel2]" "filterLow" - use "[EqualizerRack1_[Channel2]_Effect1]" "parameter1" instead
warning [Main] ControlObject accessed via deprecated key "[Channel2]" "filterMid" - use "[EqualizerRack1_[Channel2]_Effect1]" "parameter2" instead
warning [Main] ControlObject accessed via deprecated key "[Channel2]" "filterHigh" - use "[EqualizerRack1_[Channel2]_Effect1]" "parameter3" instead
warning [Main] ControlObject accessed via deprecated key "[Channel2]" "filterLowKill" - use "[EqualizerRack1_[Channel2]_Effect1]" "button_parameter1" instead
warning [Main] ControlObject accessed via deprecated key "[Channel2]" "filterMidKill" - use "[EqualizerRack1_[Channel2]_Effect1]" "button_parameter2" instead
warning [Main] ControlObject accessed via deprecated key "[Channel2]" "filterHighKill" - use "[EqualizerRack1_[Channel2]_Effect1]" "button_parameter3" instead
warning [Main] ControlObject accessed via deprecated key "[Channel4]" "filterLow" - use "[EqualizerRack1_[Channel4]_Effect1]" "parameter1" instead
warning [Main] ControlObject accessed via deprecated key "[Channel4]" "filterMid" - use "[EqualizerRack1_[Channel4]_Effect1]" "parameter2" instead
warning [Main] ControlObject accessed via deprecated key "[Channel4]" "filterHigh" - use "[EqualizerRack1_[Channel4]_Effect1]" "parameter3" instead
warning [Main] ControlObject accessed via deprecated key "[Channel4]" "filterLowKill" - use "[EqualizerRack1_[Channel4]_Effect1]" "button_parameter1" instead
warning [Main] ControlObject accessed via deprecated key "[Channel4]" "filterMidKill" - use "[EqualizerRack1_[Channel4]_Effect1]" "button_parameter2" instead
warning [Main] ControlObject accessed via deprecated key "[Channel4]" "filterHighKill" - use "[EqualizerRack1_[Channel4]_Effect1]" "button_parameter3" instead
warning [Main] ControlObject accessed via deprecated key "[Channel3]" "filterLow" - use "[EqualizerRack1_[Channel3]_Effect1]" "parameter1" instead
warning [Main] ControlObject accessed via deprecated key "[Channel3]" "filterMid" - use "[EqualizerRack1_[Channel3]_Effect1]" "parameter2" instead
warning [Main] ControlObject accessed via deprecated key "[Channel3]" "filterHigh" - use "[EqualizerRack1_[Channel3]_Effect1]" "parameter3" instead
warning [Main] ControlObject accessed via deprecated key "[Channel3]" "filterLowKill" - use "[EqualizerRack1_[Channel3]_Effect1]" "button_parameter1" instead
warning [Main] ControlObject accessed via deprecated key "[Channel3]" "filterMidKill" - use "[EqualizerRack1_[Channel3]_Effect1]" "button_parameter2" instead
warning [Main] ControlObject accessed via deprecated key "[Channel3]" "filterHighKill" - use "[EqualizerRack1_[Channel3]_Effect1]" "button_parameter3" instead
warning [Main] ControlObject accessed via deprecated key "[Channel1]" "filterLow" - use "[EqualizerRack1_[Channel1]_Effect1]" "parameter1" instead
warning [Main] ControlObject accessed via deprecated key "[Channel1]" "filterMid" - use "[EqualizerRack1_[Channel1]_Effect1]" "parameter2" instead
warning [Main] ControlObject accessed via deprecated key "[Channel1]" "filterHigh" - use "[EqualizerRack1_[Channel1]_Effect1]" "parameter3" instead
warning [Main] ControlObject accessed via deprecated key "[Channel1]" "filterLowKill" - use "[EqualizerRack1_[Channel1]_Effect1]" "button_parameter1" instead
warning [Main] ControlObject accessed via deprecated key "[Channel1]" "filterMidKill" - use "[EqualizerRack1_[Channel1]_Effect1]" "button_parameter2" instead
warning [Main] ControlObject accessed via deprecated key "[Channel1]" "filterHighKill" - use "[EqualizerRack1_[Channel1]_Effect1]" "button_parameter3" instead
warning [Main] ControlObject accessed via deprecated key "[Channel2]" "filterLow" - use "[EqualizerRack1_[Channel2]_Effect1]" "parameter1" instead
warning [Main] ControlObject accessed via deprecated key "[Channel2]" "filterMid" - use "[EqualizerRack1_[Channel2]_Effect1]" "parameter2" instead
warning [Main] ControlObject accessed via deprecated key "[Channel2]" "filterHigh" - use "[EqualizerRack1_[Channel2]_Effect1]" "parameter3" instead
warning [Main] ControlObject accessed via deprecated key "[Channel2]" "filterLowKill" - use "[EqualizerRack1_[Channel2]_Effect1]" "button_parameter1" instead
warning [Main] ControlObject accessed via deprecated key "[Channel2]" "filterMidKill" - use "[EqualizerRack1_[Channel2]_Effect1]" "button_parameter2" instead
warning [Main] ControlObject accessed via deprecated key "[Channel2]" "filterHighKill" - use "[EqualizerRack1_[Channel2]_Effect1]" "button_parameter3" instead
warning [Main] ControlObject accessed via deprecated key "[Channel4]" "filterLow" - use "[EqualizerRack1_[Channel4]_Effect1]" "parameter1" instead
warning [Main] ControlObject accessed via deprecated key "[Channel4]" "filterMid" - use "[EqualizerRack1_[Channel4]_Effect1]" "parameter2" instead
warning [Main] ControlObject accessed via deprecated key "[Channel4]" "filterHigh" - use "[EqualizerRack1_[Channel4]_Effect1]" "parameter3" instead
warning [Main] ControlObject accessed via deprecated key "[Channel4]" "filterLowKill" - use "[EqualizerRack1_[Channel4]_Effect1]" "button_parameter1" instead
warning [Main] ControlObject accessed via deprecated key "[Channel4]" "filterMidKill" - use "[EqualizerRack1_[Channel4]_Effect1]" "button_parameter2" instead
warning [Main] ControlObject accessed via deprecated key "[Channel4]" "filterHighKill" - use "[EqualizerRack1_[Channel4]_Effect1]" "button_parameter3" instead

Can we store a deprecated flag along with the alias to target that?

@Holzhaus
Copy link
Member Author

Holzhaus commented Sep 15, 2023

But these CO are deprecated, since Version 2.0.0. See https://manual.mixxx.org/2.3/en/chapters/appendix/mixxx_controls#control-[ChannelN]-filterLow

Let's just replace these occurrences with the recommended, non-deprecated alternative.

@Holzhaus
Copy link
Member Author

#11990

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants