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

Convert node_id to distinct integer (might be breaking for some users) #51

Merged
merged 3 commits into from
Jan 19, 2024

Conversation

mariusandra
Copy link
Collaborator

@mariusandra mariusandra commented Jan 18, 2024

This PR converts the nodeId variable used in scene apps from a string to a type NodeId* = distinct int. Comparing and passing integers around should be simpler and faster than strings. We also reduce the app's memory footprint (more efficiency), making it more possible to run on ESP-style devices.

Sadly this requires changing every app, including those created in the interface.

Happily, I have added a migration that does most changes automatically. Yet there may be some custom apps created by users that use this nodeId in different ways than I had in mind. For this latter group, I apologise for the disruption this brings. I'm going to try really hard not to have breaking changes in FrameOS, but a change like this seems necessary and will be worse later though, so... 🙃.

If you upgrade via docker, everything should be fine. If you're running FrameOS manually, run flask db upgrade after merging in the new changes.

Scene source before:

image

Scene source after:

image

@mariusandra mariusandra mentioned this pull request Jan 18, 2024
@mariusandra mariusandra merged commit 4841e47 into main Jan 19, 2024
1 check passed
@mariusandra mariusandra deleted the integer-node-id branch January 19, 2024 09:58
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.

None yet

1 participant