-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix a plugin (re-)ordering bug (re: #200). #206
Conversation
This change fixes a bug introduced by commit 1988ab5 (re: klabhub#190) that causes any changes to the default plugin order, imposed in cic.run(), to be immediately reverted when handling adaptive plugins/parameters (see cic.handleAdaptives()). This change removes the call to c.order(), which reverts the plugin order, in favour of using c.pluginOrder directly.
@Nicroburst, can you confirm that this change fixes the behaviour you were observing? |
This fix is good, but I would advocate removing this behaviour of Instead, some sort of argument that explicitly says "give me the default order please" would be good. THis could have backwards compatibility issues for some scripts, possibly, though I doubt anyone uses What do you think? |
I agree. But maybe I'm the only one who is constantly tripped up by this c.order() business. It would be more useful (I think) if There could be a separate argument to 'reset' the order to the default order, or maybe you just make two calls to c.order(), e.g., Open question in my mind is whether |
If |
You're definitely not the only one tripped up by the current form. That's how the bug was waved through in the first place, none of us saw it because the function's behaviour is impure and implicit. |
Yep, this fixes the behaviour I was seeing. |
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.
Looks good.
For clarity, could you rename the cic.order function and call it cic.setPluginOrder to emphasize that it changes the order (even with no input list it resets to the default order), and update the comments accordingly?
(Otherwise we may run into the same problem again down the line).
This change fixes a bug introduced by commit 1988ab5 (re: #190)
that causes any changes to the default plugin order, imposed in
cic.run(), to be immediately reverted when handling adaptive
plugins/parameters (see cic.handleAdaptives()).
This change removes the call to c.order(), which reverts the plugin
order, in favour of using c.pluginOrder directly.