-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Relax strictness of ControllerScriptInterfaceLegacy
methods.
#11474
Conversation
…ollerScriptEngineBase::isPedantic`
This should increase the effectiveness of catching abusive use of those APIs when using `--controller-pedantic`.
Postel's Law is controversial and there are legitimate reasons to reject it, but in this case, fault-intolerant behavior in live situation for obscure controller scripts would indeed do more harm than good.
I think all these flags are too easy to miss. IMHO we should use a single flag for controller development that combines |
Thank you for your insight. I agree with the controversial aspect of Postel's law, but in this case I find it appropriate. The reason I chose to introduce a separate flag was that I was worried that making mappings strict unconditionally was making it hard to debug pre-existing mappings. If a contributor just wants to fix a trivial bug in an old mapping that didn't follow the stricter requirements (eg use |
We could possibly discuss changing the behavior slightly, making |
anything for me to do here? |
Compared to So we may want to rename the flag: The other issue is more s philosophy thing. For this PR an optional flag maybe with a better name is good enough. What do you think? |
"Script tried to connect to (%1, %2) using `connectControl` which " | ||
"is deprecated. Use `makeConnection` instead!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Script tried to connect to (%1, %2) using `connectControl` which " | |
"is deprecated. Use `makeConnection` instead!") | |
"Script tried to connect to (%1, %2) using `connectControl` which " | |
"is deprecated. Use `makeConnection` or `makeUnbufferedConnection` instead!") |
I'm no sure if I missed an aspect, but from my point of view there are only two modes needed:
|
The Missing point is when users want to tweak a legacy mapping with errors. They can't use --controller-debug for looking into their original problem before fixing the pending issues. This is a barrier for user not familiar with coding and Mixxx. |
I don't think thats very helpful, nor does it really work since warnings accumulate while running the mapping and can't be determined at parse-time. I'm open to renaming the flag
Some of the |
Ok, than do the renaming to whatever fits to you and we can merge this as a good step. Thanks. |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. LGTM
Can you add this flag also to the manual?
Should address / fix #11473.
The primary issue is fixed in 7ab811c. The problem is that the refactorings in 2.4 caused invalid CO connections to throw an error instead of just warning on the commandline. Especially for user-facing stable APIs we should follow the Robustness principle. This PR makes that possible by introducing the
--controller-pedantic
flag that mapping developers should use while developing their mappings to make issues like this apparent.I also took the liberty to apply this conditional throwing code to more methods of the "legacy" API.