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

Receive Array #1294

Merged
merged 4 commits into from
Dec 11, 2024
Merged

Receive Array #1294

merged 4 commits into from
Dec 11, 2024

Conversation

dragazo
Copy link

@dragazo dragazo commented Feb 14, 2022

Adds support for receiving builtin js arrays in When I receive blocks. This seems like it would have no side effects since builtin js arrays are not an allowed snap primitive.

Copy link
Collaborator

@brollb brollb left a comment

Choose a reason for hiding this comment

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

Thanks, @dragazo! I suspect this is to make things easier with the PyBlocks integration?

This change should be fine but should happen when the message is deserialized rather than in the process itself. The logic itself can get a little hairy when you get into how the serializer is used to deserialize these (it isn't completely decoupled from the IDE in Snap) but you should be able to avoid all that since this is a pretty minor high-level change :)

It would be nice to add a test, too. Not necessarily a deal-breaker since it is such a minor change but it would be nice to have it at least for regression testing.

@dragazo
Copy link
Author

dragazo commented Feb 19, 2022

@brollb Oh, btw I updated to move the logic to the deserializer, but haven't added tests yet. But this is ultra-non-critical, I know you're busy :)

This actually came up while extending the CloudVariables service, since listen events were trying to send back json from the db (apparently sending messages weren't going through the same conversions as rpc return values). But you're right it'll also allow pyblox clients to send arrays and structured data to netsblox clients.

@gsteinLTU
Copy link
Member

@dragazo Add object support?

@dragazo dragazo merged commit aa09c16 into master Dec 11, 2024
1 check passed
@dragazo dragazo deleted the receive-array branch December 11, 2024 03:25
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.

3 participants