go-imap
go-imap copied to clipboard
Merge extensions into the main code base
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
-
IDLE RFC 2177, Implementation Rationale: Fundamental for useful clients and servers implementations.
-
ENABLE RFC 53161, Implementation Rationale: Heavily used by other extensions
-
CHILDREN RFC 3348, Implementation Rationale: Too small to be kept separate.
-
SPECIAL-USE RFC 6154, Implementation Rationale: Too small to be kept separate.
-
UNSELECT RFC 3691, Implementation Rationale: Too small to be kept separate.
... 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
Note that this isn't necessarily a breaking change, we can add new symbols as long as we don't break the current API.
👍 I would welcome having (all) extensions in one repo.
Closing because v2 does this from the start.