go-imap icon indicating copy to clipboard operation
go-imap copied to clipboard

Merge extensions into the main code base

Open foxcpp opened this issue 4 years ago • 2 comments

Comments in #260 outline a number of issues caused by an attempt to keep extensions independent of the main go-imap code. This includes two extensions being unable to extend the same command. I propose to ditch the idea of external extensions or at least seriously reconsider how it works for go-imap v2.

There is number of important IMAP extensions, notably IDLE, UIDPLUS and CONDSTORE. I think they should be supported by go-imap itself. This will simply make implementing its support on the server and client sides simpler.

Subtasks

  • [ ] Revise the command parser in accordance with RFC 4466.
  • [ ] Define Server-Backend interface suitable for use with multiple extensions at the same time.
  • [ ] Define Client interface suitable for use with multiple extensions at the same time (e.g. UIDPLUS + CONDSTORE).
  • [ ] Merge certain (probably all) extensions into the main code base. or
  • [ ] Define new interfaces for use by external extensions.

Extensions to consider for merge

... pretty much every small extension, currently maintained in a separate repository, see https://github.com/emersion/go-imap#extensions ...

References

  • Collected Extensions to IMAP4 ABNF RFC 4466

foxcpp avatar Dec 15 '19 15:12 foxcpp

Note that this isn't necessarily a breaking change, we can add new symbols as long as we don't break the current API.

emersion avatar Dec 18 '19 17:12 emersion

👍 I would welcome having (all) extensions in one repo.

arnisoph avatar Jan 15 '20 19:01 arnisoph

Closing because v2 does this from the start.

emersion avatar Mar 23 '23 10:03 emersion