Skip to content

feat: split host api methods to separate out upgrade-script calls #118

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

Merged
merged 10 commits into from
May 1, 2025

Conversation

Julusian
Copy link
Member

@Julusian Julusian commented Mar 6, 2025

Preparation for bitfocus/companion#2345

This might want to be released as 2.0.0 instead of 1.12.0, as ideally modules should be making some changes when updating to this api version.

This is written to support expressions, but we could simply not support them for now. Always set isExpression: false, so that values are treated as literals.

Additionally, companion will need to start parsing any variables in feedback options (doing so reactively), to avoid breaking these feedbacks. I think it should be safe enough if we parse variables for any field which has useVariables: true. And for actions too. But only for modules using this version of the api, that should avoid any negative consequences.

TODO: Should CompanionFeedbackContext.parseVariablesInString become a no-op, as this will be always handled by companion now? Maybe for actions too? For this iteration, I have amended it to do a quick check for $(, as a shortcut. While not quite as good, this should avoid the unnecessary cost of the parse call, and avoids needing modules to make changes at this stage.

@Julusian Julusian changed the title wip feat: split host api methods to separate out upgrade-script calls Mar 6, 2025
@Julusian Julusian force-pushed the feat/parsing-options-in-companion branch from 3e3c05c to dc5e1bd Compare March 21, 2025 15:57
@Julusian Julusian force-pushed the feat/parsing-options-in-companion branch from dc5e1bd to f13f128 Compare May 1, 2025 15:36
@Julusian Julusian marked this pull request as ready for review May 1, 2025 16:51
@Julusian Julusian merged commit 19e0023 into main May 1, 2025
6 checks passed
@Julusian Julusian deleted the feat/parsing-options-in-companion branch May 1, 2025 16:53
Julusian added a commit that referenced this pull request May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant