[profanity] 0.10.0 Roadmap

Michael Vetter jubalh at iodoru.org
Tue Jun 16 15:30:15 CEST 2020


Hi folks,

I wanted to share some thoughts regarding the next release (0.10.0).
I think a cleanup release would be nice. Some thoughts:

* I think src/xmpp.message.c needs some cleanup. It's not as easy as it
  could be to add support for new messages. _handle_carbon _handle_chat
  etc need to get decoupled more. Some of those functions do things for
  other functions some are independent some do things twice. We should
  have cleaner main functions with individual helper functions that can
  be used from all the main functions.

* src/event/server_events.c has a part with plenty of ifdefs.
  It makes it quite hard to read and even more to adapt. It's easy to
  actually change all the lines which you also compile but forget about
  the others. Once a new encryption method gets added it will get even
  worse. We need to find a way to improve this. DebXWoody encountered
  this problem too (probably when he started implementing OX) and has
  created WIP PR [1] for that purpose.

* There are some stanza related functions that we have in Profanity and
  were not part of libstrophe 0.9.3. Some of them are libstrophe git
  but not in a release. Another function was added by pasis recently
  which DebXWoody needed for OX. Pasis mentioned in his last mail
  already the merge of libmesode functionality into libstrophe. I think
  this is a important step so we don't have to do double work.
  I assume that then libstrophe will get a new release (before
  profanity 0.10.0 comes out). Which means I also plan to remove the
  custom stanza functions and we depend on that latest version of
  libstrophe for those functions.

* For the sql database we use some glib date functions. We use a
  workaround there to still rely on an older version of glib, because I
  wanted profanity 0.9.x to still build on Debian stable. I plan to
  remove the workaround and only use latest glib functions bumping glib
  quite some numbers (dont remember the details).

* UI: I cleaned up UI related functions for the last release already.
  But there are some cases in src/ui/windows.c that still could be
  improved. About some of them I wasn't sure and before breaking
  something I left it as it was. Maybe we can revisit this.
  There are/were plenty of functions which did the same thing, just a
  bit different, and were all copy pasted.
  Also in the past we used to have jid, message, encryption method each
  as separate parameters. Some time ago ProfMessage was introduced
  (which might also need splitting into two structs) and most functions
  habe been adapted. But I'm not sure wheter all were.

* Converting of old config files. We have some code being run on
  startup that makes it possible to import config files from before
  0.4.7 times. I think we could also remove this. Worst case people
  need to do the setup again ;p

* Prefer glib functions: Plenty of times we use strdup() and other
  functions when we actually have glib. Even worse we mix things so
  that a function allocates memory using glib and then free it with
  `free()`. We also mix gchar and char. This must have grown over time
  and we should take care to not introduce it in new code and at best
  fix all the old cases.

I think these changes would be nice goals and I bet we find a lot more
on the way. I think this could be the main goals for 0.10.0

Additionally people certainly will want new features and create PRs for
them. It might be that OX is getting into or OMEMO file file transfer.
And maybe more things that contributors are interested in.

But all in all I think it might be a good idea to spend some time on
improving. Especially now when it seems there are more developers
present than ever before. So it means many eyes reviewing and detecing
bugs. And it means one can discuss solutions when one doesn't fine a
nice one. In the past I implemented several things were I wasn't sure
whether I used a good solution ;)

Let me know what you think about this plan, other ideas etc.

Best,
Michael

1: https://github.com/profanity-im/profanity/pull/1363


More information about the profanity mailing list