Skip to content

Pass RESP3 to modules and custom commands #1208

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 7 commits into from
May 23, 2025
Merged

Conversation

prvyk
Copy link
Contributor

@prvyk prvyk commented May 20, 2025

This PR changes command and module signatures so that we pass RespMemoryWriter to them instead of the ref tuple. This allows adjusting output to RESP3.

I considered the alternative of just passing an additional respProtocolVersion in the signature, and I think this is slightly nicer. We can erase some custom output code, authors get more output functions, and reallocation is handled for them. If they want the previous allocation behaviour (measure and then Rent exactly from the pool), they can get it by calling RespMemoryWriter.Realloc() themselves first.

…e> directly. This lets these functions be aware of current protocol and provides a wide range of output functions.
@badrishc badrishc requested review from TalZaccai and TedHartMS May 20, 2025 18:12
@badrishc badrishc removed the request for review from TedHartMS May 20, 2025 23:46
@TalZaccai TalZaccai requested a review from TedHartMS May 22, 2025 18:07
@TalZaccai TalZaccai merged commit 1db1f9e into microsoft:main May 23, 2025
26 checks passed
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.

4 participants