[neomutt-devel] Latest Development

Richard Russon rich at flatcap.org
Tue Jul 17 12:55:39 CEST 2018


If you've been following out git repo, you're probably in a state of shock.

It's been a busy fortnight, dealing with some serious bugs (UPGRADE NOW)
and doing some major rearranging of the code.

Ages back we started moving all the shared utility code into a separate
library (libmutt).  The rules were simple.  The code had to be:

- Self-contained         -- only dependent on system libraries
- Independently testable -- we have some unit tests (acutest)
- Fully documented       -- doxygen: https://neomutt.org/code/mutt.html
- Robust                 -- check pointers, etc

After that came:
- libhcache -- Header cache
- libncrypt -- Encryption code (gpg,smime)
- libconn   -- Low-level socket code

These libraries depend on libmutt, but they aren't as independent;
they still contain references to NeoMutt and curses, etc.

Recently, we've added libemail for all the structs that represent an
email: Header, Body, Envelope, etc. and the associated code to deal with
them.

The final big change was to create libraries for each of the mailbox
types:
- libpop
- libnntp
- libmbox
- libmaildir
- libnotmuch

A lot of the work done by these mailboxes is controlled through the
Mailbox API: https://neomutt.org/code/structMxOps.html
However the code still contains a lot of #ifdef's for each mailbox type.
These need to be eliminated.

The next big changes are to: protos.h, globals.h and mutt.h

These HUGE monoliths of code contains thousands of prototypes and
definitions.  Such a collection is a terrible idea.  It obscures the
boundaries between components and means unnecessary recompiles.

To fix this, there are now a lot of new header files, matching the
source files.  The problem headers still exist, but now they're much
smaller.

By using iwyu, we've ensured that each source file has the correct
includes.  This makes it easier to find (and break up) dependencies.

    https://neomutt.org/dev/analysis#iwyu

To test the libraries, there's the library-test repo:

    https://github.com/neomutt/library-test

It contains stub code to call each of the libraries.
With a bit of work, it might soon be possible to write tests for the
individual mailbox types.

Finally, here's a (near future) picture of the architecture:

    https://flatcap.org/mutt/neo-arch1.svg

There's a LOT of work to do.
Unless you help, we'll never get there.

Cheers,
    Rich / FlatCap
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mailman.neomutt.org/pipermail/neomutt-devel-neomutt.org/attachments/20180717/1f780215/attachment.sig>


More information about the neomutt-devel mailing list