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

✨ Add support for VANISHED responses #329

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Conversation

nevans
Copy link
Collaborator

@nevans nevans commented Sep 25, 2024

VANISHED responses are required by two different extensions: QRESYNC and UIDONLY.

  • Add a new response data type: VanishedData, which wraps SequenceSet and the EARLIER modifier.
  • Update the parser to handle the VANISHED response => VanishedData
  • Update #expunge and #uid_expunge to return VANISHED (without the EARLIER modifier) responses, when they are present.
    • There is a TODO note on this: For consistency, if either of the above extensions are enabled, we should return an empty VanishedResponse when the commands have no result. Currently, an empty array is returned.

Although neither extension is completely supported yet, they can both be (partially) used in a way that doesn't crash... so I think this is a reasonable chunk to extract into its own PR, rather than wait for a PR for either of them to be 100% ready.

nevans and others added 5 commits September 25, 2024 12:53
This is similar to ActiveSupport's Array#extract!.

Yields all of the unhandled #responses for a single response type.
Removes and returns the responses for which the block returns a true
value.

Extracting responses is synchronized with other threads.  The lock is
released before returning.
This updates the parser to handle the VANISHED response, and adds a new
response data class: VanishedData.
Both the `QRESYNC` and `UIDONLY` extensions replace `EXPUNGE` responses
with `VANISHED` responses.  This updates the #expunge and #uid_expunge
commands to return VanishedData, rather than a (misleading) empty array.
@nevans
Copy link
Collaborator Author

nevans commented Sep 25, 2024

Note that this PR is based on #330.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant