Commit Graph

14309 Commits

Author SHA1 Message Date
Ivan Enderlin 034c1fcbcf chore: Disable default-features for decancer. 2026-02-05 09:02:29 +01:00
Ivan Enderlin f56f168b99 chore: Add more default-features = false to more deps. 2026-02-05 09:02:29 +01:00
Ivan Enderlin 386c5ee338 chore: Update camino to 1.2.2. 2026-02-05 09:02:29 +01:00
Ivan Enderlin 1b0b6a2f9a chore: Use the same version of quote, proc-macro2 and syn everywhere. 2026-02-05 09:02:29 +01:00
Ivan Enderlin d52d0d4a83 chore: xtask uses the workspace-defined clap.
Not only it uses the same version of `clap` everywhere, but it removes
7 dependencies.
2026-02-05 09:02:29 +01:00
Ivan Enderlin dc680b8594 chore: benchmarks uses the workspace-defined tokio. 2026-02-05 09:02:29 +01:00
Ivan Enderlin 44c2c01642 chore: Use default-features = false for all dependencies.
This patch adds `default-features = false` to all dependencies to avoid
fetching useless dependencies by default.

Numbers:

- `cargo check --workspace --tests` jumpbs from 725 to 715,
- `cargo tree --all-features --edges all --prefix none | rg -v '^$' |
  cut -d' ' -f 1 | sort | uniq | wc -l` jumps from 538 to 529.
2026-02-05 09:02:29 +01:00
Hugh Nimmo-Smith 7708087019 doc: clarify that IO_ELEMENT_MSC4388 is the unstable prefix 2026-02-04 20:45:00 +01:00
Ivan Enderlin 52014dc0bb chore(sdk): Log the pos and the timeout as part of the sync_once span.
This patch adds the `pos` and `timeout` value as new fields of the
`sync_once` span.

How to test it?

```sh
$ cargo nextest run --retries 0 --no-fail-fast -E "not test(ensure_no_max_concurrent)" -p matrix-sdk-ui --nocapture -- test_sync_all_states | rg sync_once
2026-02-04T14:02:17.043301Z DEBUG sync_once{conn_id="room-list" pos="0" timeout=0}:send{request_id="REQ-3" method=POST uri="http://127.0.0.1:49663/_matrix/client/unstable/org.matrix.simplified_msc3575/sync" request_size="647B" status=200 response_size="72B" request_duration=316.959µs}: matrix_sdk::http_client: Got response
2026-02-04T14:02:17.043783Z DEBUG sync_once{conn_id="room-list" pos="1" timeout=0}:send{request_id="REQ-4" method=POST uri="http://127.0.0.1:49663/_matrix/client/unstable/org.matrix.simplified_msc3575/sync" request_size="648B"}: matrix_sdk::http_client::native: Sending request num_attempt=1
2026-02-04T14:02:17.044093Z DEBUG sync_once{conn_id="room-list" pos="1" timeout=0}:send{request_id="REQ-4" method=POST uri="http://127.0.0.1:49663/_matrix/client/unstable/org.matrix.simplified_msc3575/sync" request_size="648B" status=200 response_size="72B" request_duration=283.75µs}: matrix_sdk::http_client: Got response
2026-02-04T14:02:17.044527Z DEBUG sync_once{conn_id="room-list" pos="2" timeout=0}:send{request_id="REQ-5" method=POST uri="http://127.0.0.1:49663/_matrix/client/unstable/org.matrix.simplified_msc3575/sync" request_size="648B"}: matrix_sdk::http_client::native: Sending request num_attempt=1
2026-02-04T14:02:17.044808Z DEBUG sync_once{conn_id="room-list" pos="2" timeout=0}:send{request_id="REQ-5" method=POST uri="http://127.0.0.1:49663/_matrix/client/unstable/org.matrix.simplified_msc3575/sync" request_size="648B" status=200 response_size="72B" request_duration=254.875µs}: matrix_sdk::http_client: Got response
2026-02-04T14:02:17.045245Z DEBUG sync_once{conn_id="room-list" pos="3" timeout=30000}:send{request_id="REQ-6" method=POST uri="http://127.0.0.1:49663/_matrix/client/unstable/org.matrix.simplified_msc3575/sync" request_size="648B"}: matrix_sdk::http_client::native: Sending request num_attempt=1
2026-02-04T14:02:17.045517Z DEBUG sync_once{conn_id="room-list" pos="3" timeout=30000}:send{request_id="REQ-6" method=POST uri="http://127.0.0.1:49663/_matrix/client/unstable/org.matrix.simplified_msc3575/sync" request_size="648B" status=200 response_size="72B" request_duration=247.417µs}: matrix_sdk::http_client: Got response
```
2026-02-04 16:24:37 +01:00
Benjamin Bouvier f3b9a01904 refactor(event cache): rename the read_lock_acquisition mutex 2026-02-04 16:24:23 +01:00
Benjamin Bouvier 2fb5a32db2 refactor(event cache): rename RoomEventCacheStateLockInner to RoomEventCacheState
There was nothing called `RoomEventCacheState` anymore, and the `Inner`
suffix is dubious, at best. Also, we can get rid of the `Lock`
component, since indeed it's locked, but it's a detail from the point of
view of the `RoomEventCacheState` itself. This makes for a shorter and
nicer name.
2026-02-04 16:24:23 +01:00
Benjamin Bouvier 9be5bc1977 feat(multiverse): render display names for messages and latest thread event 2026-02-04 14:27:10 +01:00
Jorge Martín 70dd02012b fix(ffi): Don't override the default package_name and cdylib_name values for Kotlin bindings
Otherwise, the bindings expect the generated JAR/AAR files to contain separate `.so` libraries for each crate
2026-02-04 10:53:29 +01:00
Jorge Martín f05e0b1b81 doc: Add missing changelog entry 2026-02-04 10:23:16 +01:00
Jorge Martín 7ffcf72483 fix(ffi): Remove UniFFI checksums in matrix-sdk crate
This was forgotten in a previous PR about removing the checksums for all crates exporting bindings.
2026-02-04 10:23:16 +01:00
Jorge Martín bb420360a4 Create reldev profile:
It allows having way smaller binaries while still being able to have proper backtraces: `reldbg` is great for iOS because it allows inline debugging using LLDB in Xcode, but it produces enormous binaries, while for Android we can't use that properly and we'd only be interested in having symbolicated backtraces, which this profile achieves with binaries an order of magnitude smaller.
2026-02-04 10:21:27 +01:00
Jorge Martín 9b6d54ef30 refactor: Enable debug-images feature for Sentry
This makes it possible to link a Sentry trace to the debug symbols so it can be symbolicated
2026-02-04 10:21:27 +01:00
Jorge Martín 9dc2901268 ci: Add dist profile
This is intended for reducing the binary size of the SDK distributed in Android/iOS bindings.

Its optimization level is 'binary size', it contains LTO optimizations and by default removes part of the debug info - the rest can be removed later if needed.
2026-02-04 10:21:27 +01:00
Benjamin Bouvier 50cc5f4102 refactor(pinned events): move pin_event/unpin_event from the Timeline to the Room
These make sense in general, and they will help getting rid of one of
the `PinnedEventsRoom` trait methods in a subsequent PR.
2026-02-04 09:59:47 +01:00
Benjamin Bouvier 1152eb6d37 refactor(room): move PinnedEventsRoom::load_event_with_relations to the Room object
The method is kept on the pinned loader trait at the moment, because
it's too inconvenient to remove it quite yet. This will happen in a
subsequent PR.
2026-02-04 09:39:18 +01:00
dependabot[bot] f270eda75d chore(deps): bump bytes from 1.11.0 to 1.11.1
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v1.11.0...v1.11.1)

---
updated-dependencies:
- dependency-name: bytes
  dependency-version: 1.11.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-04 10:23:35 +02:00
Jorge Martín 2b298fbb85 fix(ffi): Remove checksums in all crates using UniFFI
Previously, this was only applied to the FFI bindings crate, but it's not the only one affected by the issue with 32bit ARM checksum validations.
2026-02-04 09:06:06 +01:00
Benjamin Bouvier 40c6c330b0 chore(typos): fix new typos 2026-02-02 18:36:01 +01:00
dependabot[bot] 7c86e1b896 chore(deps): bump crate-ci/typos from 1.42.1 to 1.43.0
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.42.1 to 1.43.0.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.42.1...v1.43.0)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-version: 1.43.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-02 18:36:01 +01:00
dependabot[bot] 06700cdf38 chore(deps): bump CodSpeedHQ/action from 4.8.2 to 4.10.4
Bumps [CodSpeedHQ/action](https://github.com/codspeedhq/action) from 4.8.2 to 4.10.4.
- [Release notes](https://github.com/codspeedhq/action/releases)
- [Changelog](https://github.com/CodSpeedHQ/action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codspeedhq/action/compare/e736f0d2aeb36da38e9f08eca4dff7967408d154...fa0c9b1770f933c1bc025c83a9b42946b102f4e6)

---
updated-dependencies:
- dependency-name: CodSpeedHQ/action
  dependency-version: 4.10.4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-02 18:17:41 +01:00
Benjamin Bouvier 19234abf32 review(task_monitor): address comments, watchdog -> task_monitor, misc doc adjustments and renamings 2026-02-02 16:13:00 +01:00
Benjamin Bouvier 24d3ee4433 doc(common): add a note around unwind safety for the task monitor 2026-02-02 16:13:00 +01:00
Benjamin Bouvier 27965cf177 feat(multiverse): add a background job error observer in multiverse 2026-02-02 16:13:00 +01:00
Benjamin Bouvier 50b06e8e5b feat(ffi): add support for listening to background jobs errors 2026-02-02 16:13:00 +01:00
Benjamin Bouvier 3d5679954b refactor(event cache): use the task monitor for event cache long-running jobs 2026-02-02 16:13:00 +01:00
Benjamin Bouvier 561b04cab0 feat(client): have the Client hold one task monitor 2026-02-02 16:13:00 +01:00
Benjamin Bouvier 334bd04252 feat(common): allow aborting on drop for background tasks 2026-02-02 16:13:00 +01:00
Benjamin Bouvier 9195c000f3 feat(common): add a background task handler 2026-02-02 16:13:00 +01:00
Nashwan Azhari 28d1bd7ce3 doc: update Ruma doc links in get_profile example 2026-02-02 10:24:11 +01:00
Nashwan Azhari cb9690ecba doc: change matrix.org/docs/spec links to spec.matrix.org 2026-02-02 10:24:11 +01:00
Damir Jelić 2f7887d607 refactor(auth): Change the secure channel methods to operate more on strings
This will come in handy once we attempt to support MSC4388 as this MSC
changes how the client-server API operates. The rendezvous channel will
in the future operate on JSON messages where we'll include our sealed
ciphertext as a base64 encoded string.
2026-01-30 17:14:05 +01:00
Damir Jelić 837590d90e refactor(auth): Move the MSC4108-specific rendezvous channel implementation into a submodule 2026-01-30 17:14:05 +01:00
Damir Jelić 94bc870686 refactor(qr-login): Create a submodule for the rendezvous channel 2026-01-30 17:14:05 +01:00
Damir Jelić 911b559113 feat(crypto): Add support for the QR code data type defined in MSC4388 2026-01-30 16:37:17 +01:00
Ivan Enderlin 2ffe003136 doc(sdk) Add #6056 to the CHANGELOG.md. 2026-01-30 15:34:48 +01:00
Ivan Enderlin d348fe62f2 refactor(base): Use Iterator::find and Iterator::any. 2026-01-30 15:34:48 +01:00
Ivan Enderlin be2c1d44e0 feat(ffi) Add LatestEventValue::RemoteInvite. 2026-01-30 15:34:48 +01:00
Ivan Enderlin 8b26751a66 feat(ui): Add LatestEventValue::RemoteInvite.
This patch maps a `BaseLatestEventValue::RemoteInvite` to
`LatestEventValue::RemoteInvite`.
2026-01-30 15:34:48 +01:00
Ivan Enderlin 1dc1d2a3f0 feat(sdk): Add LatestEventValue::RemoteInvite.
This patch adds the `LatestEventValue::RemoteInvite` variant. The goal
of this is to be able to compute a `LatestEventValue` for an invite to
a room. Using `LatestEventValue::Remote` isn't possible because it's
usually built from the `RoomEventCache`. However, the `EventCache`
doesn't handle invites for one reason: invites only manipulate stripped
state-events, whist the `EventCache` manipulates non-stripped (state)
events.

The `LatestEvents` API receives a stream of `RoomInfoNotableUpdate`. It
reacts to update from the `RoomInfo`. It filters out all reasons except
`MEMBERSHIP`. When the `MEMBERSHIP` is updated, and the room' state is
`Invited`, then a `RemoteInvite` is computed.

The `Invite` type is updated to include the `inviter_id` in case the
`inviter` is missing. Indeed, we always know the user ID of the inviter,
this information isn't optional.
2026-01-30 15:34:48 +01:00
Ivan Enderlin 99b83b98b6 fix(base): Emit RoomInfoNotableUpdateReasons for invited and knocked rooms creation. 2026-01-30 15:34:48 +01:00
Ivan Enderlin 21448ab874 fix(sdk): Skip updates for missing rooms only.
This patch skips updates for missing rooms only, i.e. it doesn't early
return and then miss all other rooms.
2026-01-30 15:34:48 +01:00
Ivan Enderlin b203b43bb2 doc(sqlite): Add #6091 in the CHANGELOG.md. 2026-01-30 15:08:39 +01:00
Ivan Enderlin 09a1bf8ec2 fix(sqlite): Replace unwrap when using interact.
This patch replaces the `interact(…).unwrap()` by a proper error.

So far, `interact()` was only returning `InteractError::Panic`
despites `InteractError::Aborted` exists. With
https://github.com/deadpool-rs/deadpool/pull/461, we now get
`InteractError::Aborted` when the SDK is shutdown, sometimes. This
results in hitting the `unwrap` and having a panic again. This patch
solves the problem by changing the `unwrap` to a proper error. Note: in
case of `InteractError::Panic`, we continue to panic.

This patch makes sense with or without the merge of the PR on
`deadpool`.
2026-01-30 15:08:39 +01:00
Ivan Enderlin 7918a1817c doc(xtask): Add missing documentation for log and log sync. 2026-01-30 13:57:26 +01:00
Ivan Enderlin 43e1932691 feat(xtask): Introduce xtask log sync to visualise logs about sync.
This patch introduces a new family of commands: `xtask log`. The goal
is to manipulate logs, to extract the right amount of data we need to
solve specific problems. The first member of this family is `sync` to
visualise logs about the sync process. It presents the sync requests and
responses in a table, with a "timeline" _à la_ network profiler graph.
The code is rather simple, on purpose. The generated HTML reports are
lightweight, and fully standalone: no JavaScript, pure HTML and CSS, no
external resources. These reports can be shared or archived super
easily.

Features:

- requests/responses are grouped by connection ID
- permalink to specific request ID
- status have colours
- time is displayed in a human form
- duration is calculated from the log timestamps
- view syncs in a "tree-like" flavor, a "time graph", super quick to
  spot long requests
- each line can be "opened" to see details, so far only log line numbers
  to get more context manually
2026-01-30 13:57:26 +01:00