Skip to content

Conversation

zecakeh
Copy link
Collaborator

@zecakeh zecakeh commented Jul 2, 2025

This is more or less ready, with all the changes that are required due to breaking changes in Ruma. I still need to fix a few tests. I will probably open other PRs soon to try to make this slightly smaller (but there is not much to do).

I tried to split the commits by source of the change, so I recommend to review this commit by commit. However after the first commit the code doesn't compile unless all the other commits are applied, so I recommend to squash everything when merging.

Note that currently Ruma is not ready for a release with those breaking changes, however it should be ready in a few weeks. Ruma should be ready for release when the support for room version 12 is added in the next few days.

This is supposed to be part of 3 PRs:

  1. This one, that bumps Ruma to a commit on main that has the same features that we already use in the SDK, while having the least amount of changes possible. (probably the biggest one).
  2. Bump to the latest commit before support for room version 12. Will have ~300 lines changed.
  3. Bump to the latest commit with support for room version 12.

@zecakeh zecakeh requested review from a team as code owners July 2, 2025 13:59
@zecakeh zecakeh requested review from poljar and removed request for a team July 2, 2025 13:59
@zecakeh zecakeh marked this pull request as draft July 2, 2025 14:00
@zecakeh zecakeh changed the title Bump Ruma Bump Ruma (breaking) Jul 3, 2025
@zecakeh zecakeh force-pushed the event-handler-type-prefix branch from 9730498 to d05861b Compare July 8, 2025 09:05
Copy link

codecov bot commented Jul 8, 2025

Codecov Report

Attention: Patch coverage is 74.89540% with 60 lines in your changes missing coverage. Please review.

Project coverage is 88.86%. Comparing base (d19616d) to head (02ccdc6).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...trix-sdk-ui/src/timeline/event_item/content/mod.rs 26.31% 28 Missing ⚠️
crates/matrix-sdk-base/src/room/room_info.rs 64.28% 9 Missing and 1 partial ⚠️
crates/matrix-sdk-base/src/room/create.rs 0.00% 5 Missing ⚠️
crates/matrix-sdk-base/src/store/memory_store.rs 50.00% 3 Missing and 1 partial ⚠️
...es/matrix-sdk-common/src/deserialized_responses.rs 25.00% 3 Missing ⚠️
crates/matrix-sdk-sqlite/src/state_store.rs 57.14% 3 Missing ⚠️
...tes/matrix-sdk-base/src/store/migration_helpers.rs 33.33% 2 Missing ⚠️
crates/matrix-sdk-base/src/utils.rs 0.00% 2 Missing ⚠️
crates/matrix-sdk/src/account.rs 0.00% 2 Missing ⚠️
crates/matrix-sdk/src/authentication/matrix/mod.rs 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5337      +/-   ##
==========================================
+ Coverage   88.83%   88.86%   +0.02%     
==========================================
  Files         333      333              
  Lines       91478    91356     -122     
  Branches    91478    91356     -122     
==========================================
- Hits        81264    81182      -82     
+ Misses       6387     6350      -37     
+ Partials     3827     3824       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zecakeh zecakeh force-pushed the event-handler-type-prefix branch from d05861b to dc253ad Compare July 8, 2025 09:40
@zecakeh zecakeh force-pushed the event-handler-type-prefix branch from dc253ad to 8423330 Compare July 13, 2025 10:36
None,
rendezvous_server.to_string(),
None,
&SupportedVersions { versions: Default::default(), features: Default::default() },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have an associated const for empty SupportedVersions upstream?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, it looks to me like we should call /versions first, otherwise when this becomes stable we won't know which version of the path to call.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we use the version when support for this endpoint initially was added as the fallback? I guess there's nothing wrong with calling /versions either since this side will know the homeserver URL anyways.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ruma doesn't support that currently, only the unstable path is used if no supported versions are provided. See ruma/ruma#2063.

@zecakeh zecakeh force-pushed the event-handler-type-prefix branch from 8423330 to 93e2549 Compare July 14, 2025 17:26
@jplatte
Copy link
Collaborator

jplatte commented Jul 14, 2025

I think you can rebase with -Xours (or -Xtheirs? whichever one uses your changes) and cargo fmt after to have an automated clean rebase.

@zecakeh zecakeh force-pushed the event-handler-type-prefix branch 3 times, most recently from 513eba6 to 68bbd48 Compare July 18, 2025 19:50
@zecakeh zecakeh marked this pull request as ready for review July 18, 2025 20:20
Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you very much for doing the bump. Bonus kudos for the pedantic changelog entries.

I left a question about the usage of the _Custom variant.

A couple of merge conflicts have snuck in. Could you also please get rid of them.

None,
rendezvous_server.to_string(),
None,
&SupportedVersions { versions: Default::default(), features: Default::default() },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we use the version when support for this endpoint initially was added as the fallback? I guess there's nothing wrong with calling /versions either since this side will know the homeserver URL anyways.

request_config: RequestConfig,
respect_login_well_known: bool,
server_versions: Option<Box<[MatrixVersion]>>,
server_versions: Option<BTreeSet<MatrixVersion>>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, makes much more sense than an array.

@zecakeh zecakeh force-pushed the event-handler-type-prefix branch from e8ceed0 to c183fdb Compare July 22, 2025 11:35
@zecakeh zecakeh requested a review from poljar July 22, 2025 11:36
### Breaking changes:

- `RoomPreview::info()` doesn't return a result anymore. All unknown join rules are handled in the
`JoinRule::Custom` variant.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR number please. Looks good otherwise.

@zecakeh zecakeh force-pushed the event-handler-type-prefix branch from c183fdb to 02ccdc6 Compare July 22, 2025 11:45
@poljar poljar merged commit 37626b5 into matrix-org:main Jul 22, 2025
45 checks passed
@zecakeh zecakeh deleted the event-handler-type-prefix branch July 22, 2025 12:02
@zecakeh zecakeh mentioned this pull request Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants