0.9 beta
Pre-releaseThe project continues to get to steadier releases, so here we are with 0.9 beta, just over 4 months after 0.8.2. The amount of changes is comparable with 0.8, and we haven't finished yet; expect a few more things to land before 0.9 gets out, hopefully in time for the very first Matrix Conference later in September!
Toolchain and compatibility
Quotient 0.9 will only build and run with Qt 6 - no Qt 5 any more (#709 by @TobiasFella). In fact, the oldest supported version is Qt 6.4, and we already use quite a few things introduced in that version. The compiler and standard library versions have been bumped up as well: it's GCC 13, Clang 16, MSVC :2022 - we now require solid C++20 support and first elements of C++23 are already used, too (#744 and #748 by @KitsuneRal). We still don't use C++ modules.
If things go as we'd like, 0.9 will be the last version using Olm for E2EE. Although still solid, Olm is now officially deprecated by the Matrix project in favour of Vodozemac, and that will likely be our new E2EE foundation, too. This will mean adding Rust to our dependencies - while this is unfortunate (we try to keep deps to a minimum, to facilitate porting), our project is not equipped to take over Olm or otherwise reimplement E2EE in C++. On the other hand, Rust code is usually very good at performance and memory footprint, which is what we at Quotient care about. As of this writing, valiant @TobiasFella already commenced the work - if you know something about Rust-C++ bindings, you're welcome to help.
Highlights
The most prominent feature added in this cycle is (finally!) cross-signing support (#630 and #765 by @TobiasFella, #755 by @KitsuneRal). Tobias has been driving and polishing it for quite some time, using NeoChat as the testbed - all thanks go to him for making it happen.
The library is now based on Matrix API 1.11 (#763 by @KitsuneRal), and thanks to that it is possible to support authenticated media requests (#776 by @KitsuneRal and #784 by @TobiasFella). You don't need to do anything in the client, the library will automatically add the access tokens to media requests if it detects a compliant homeserver.
While not a new feature, one major refactoring in the library stands out that started back in 0.8.x: taking the room member API from somewhat heavy, QObject
-based User
to the separate much lighter RoomMember
class. @nvrWhere has done most of the heavy-lifting - many thanks for that! With this refactoring the library won't make thousands of User
instances on the heap any more, one for almost each and every MXID it learns of, without much use for it as most room members are never interacted with or even displayed. Overall, that means faster processing of sync batches (especially initial syncs). Most of the new API was introduced in 0.8.x, with the old API deprecated; and in 0.9, this deprecated API will be entirely gone (#743 and #746 by @nvrWhere). If you're missing some calls, bring up an issue and we'll sort it out.
With the library entirely flying Qt 6 now, another refactoring is in progress, and will likely continue into post-0.9 cycle: using futures instead of signals for asynchronous communication, in particular in the context of network requests (aka jobs). Using job pointers and signal-slot connections has always had caveats: e.g. you have to take extra care to connect to the signal before it has any chance of being emitted; the job type is not passed in the signal (to avoid making every single job type a Q_OBJECT
, which would inflate build times greatly) so you have to use side channels to pass that type into the handler; signals for non-job single-shot processes (e.g. file downloads) need extra filtering for the identifier associated with the process (e.g. file path or a Matrix event); and so on. Futures provide a more straightforward, typesafe interface to achieve the same goal. To facilitate the transition, a new JobHandle
template class is introduced that behaves both as a future and as a QPointer
to the underlying job (#754 and #764 by @KitsuneRal). Eventually, we will likely stop using job pointers completely and switch to futures (especially as and when Qt gets better support for futures in QML).
Other notable changes
Quotient_ENABLE_E2EE
CMake flag is not there anymore; the library is always built with E2EE support, useConnection
facilities to turn it on/off (#741 by @TobiasFella)- With the new toolchains,
std::optional
is good enough thatOmittable
is not needed any more (#745 by @KitsuneRal) RoomMember
is a bit more convenient to use now (#747 by @KitsuneRal)- Matrix API structures are now exported with
QUOTIENT_API
(#749 by @KitsuneRal) - Cleanup/deprecation of old code and backport of
Room::requestedHistorySize()
from Quaternion (#750, #778 and #786 by @KitsuneRal) - The library doesn't run database queries twice any more (#751 by @TobiasFella)
- Auth data can have non-objects now (#752 by @KitsuneRal)
- Update membersTyping by @nvrWhere in #753
- E2EE tweaks and improvements (#756, #757, #758 and #761 by @TobiasFella)
- Small convenience facilities:
findIndirect()
range algorithm,editSubobject()
/replaceSubvalue()
for JSON manipulation,QUO_CHECK
,QUO_ALARM
andQUO_ALARM_X
macros for data checking (#760 by @KitsuneRal, with additional fixes in #778 already mentioned above) - Exposing member power levels in
RoomMember
(#768 by @nvrWhere, #769 by @KitsuneRal) - Deserialize CBOR data without one allocation per value (#772 by @vkrause)
- Add a promise/future pair to
PendingEventItem
(#767 by @KitsuneRal) - Code modernisation + newer Synapse for autotests (#775 by @KitsuneRal)
- Prepare libQuotient for operating without being able to reach the server (#777 by @TobiasFella)
- Unified event id accessor for pending and normal events (#787 by @nvrWhere)
New Contributors
Thanks, and congratulations with the first contribution, go to @teohhanhui for fixing a dead link to the NeoChat page (#785).
Full Changelog: 0.8.2...0.9-beta1