Open Bug 1707547 (imap-js) Opened 4 years ago Updated 8 months ago

[meta] implement IMAP in JavaScript

Categories

(MailNews Core :: Networking: IMAP, task)

Tracking

(Not tracked)

People

(Reporter: mkmelin, Unassigned)

References

(Depends on 20 open bugs)

Details

(Keywords: meta)

Depends on: 1762688
Depends on: 1762689
Depends on: 1762690

When re-implementing, please make sure to not follow the old interaction design of the C++ IMAP component, which was forced by limitations in XPCOM at this time 24 years ago.

  • C++ IMAP uses native OS threads to avoid blocking the UI. In today's JS, we can use await, which is far far easier to use. Threads caused all kinds of headaches, esp. when passing information, and when waiting for results.
  • C++ IMAP was driven by internal URLs. These are not the URLs you see in the web browser, but they used URLs as a kind of "async function callback", because XPCOM didn't have callback functions at the time when this IMAP component was designed. This URL-driven mechanism caused very very wierd and difficult call stacks that are very hard to follow and debug. Again, await solves the problem very nicely.
  • C++ IMAP returned the email message as URL, and the message is the URL response. In a new design, you would probably simply make an async function which returns the message as function result.
Depends on: 1816348
Depends on: 1816349
Depends on: 1816350
Depends on: 1818365
Depends on: 1818380
Depends on: 1818382
Depends on: 1818384

There are also regressions of bug 1762688 (bug 1818247, bug 1818253, bug 1818272) which you might want to add here.

Depends on: 1818247, 1818253, 1818272
Depends on: 1818589
Regressions: 1818589
No longer regressions: 1818589
Depends on: 1818663
Depends on: 1818671
Depends on: 1818675
Depends on: 1818676
Depends on: 1818677
Depends on: 1818705
Depends on: 1818706
Depends on: 1818716
Depends on: 1818943
Depends on: 1818945
Regressions: 1819110
Regressions: 1819113
Depends on: 1819186
Depends on: 1819199
Depends on: 1819223
Depends on: 1819246
Depends on: 1819312
Depends on: 1819318
Depends on: 1819418
Depends on: 1819574
Depends on: 1820000
No longer regressions: 1819113
Depends on: 1840324
Depends on: 1889084
You need to log in before you can comment on or make changes to this bug.