Skip to content

Prepare update to Rust SDK 0.1.36 #966

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 26, 2023
Merged

Conversation

jmartinesp
Copy link
Member

@jmartinesp jmartinesp commented Jul 26, 2023

This PR upgrades to the Rust SDK v0.1.36.

Additional changes:

  • Adapt NotificationData to work without the underlying event for invites.
  • Cancel fetchMembers when exiting the room.
  • Add sonatype maven repo to have immediate access to Rust SDK versions when they're published (no need to wait for maven central synchronisation).

@ElementBot
Copy link
Collaborator

ElementBot commented Jul 26, 2023

Warnings
⚠️

gradle/libs.versions.toml#L26 - A newer version of androidx.compose.compiler:compiler than 1.4.8 is available: 1.5.0

Generated by 🚫 dangerJS against f3b9c44

@jmartinesp jmartinesp requested a review from ganfra July 26, 2023 12:22
@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Patch coverage: 7.40% and project coverage change: -0.03% ⚠️

Comparison is base (145300f) 56.65% compared to head (f3b9c44) 56.62%.
Report is 20 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #966      +/-   ##
===========================================
- Coverage    56.65%   56.62%   -0.03%     
===========================================
  Files          978      978              
  Lines        24732    24745      +13     
  Branches      5012     5019       +7     
===========================================
  Hits         14012    14012              
- Misses        8501     8512      +11     
- Partials      2219     2221       +2     
Files Changed Coverage Δ
...raries/matrix/api/notification/NotificationData.kt 0.00% <0.00%> (ø)
.../android/libraries/matrix/impl/RustMatrixClient.kt 0.00% <0.00%> (ø)
...ies/matrix/impl/notification/NotificationMapper.kt 0.00% <0.00%> (ø)
...atrix/impl/notification/RustNotificationService.kt 0.00% <0.00%> (ø)
...cation/TimelineEventToNotificationContentMapper.kt 0.00% <0.00%> (ø)
...braries/matrix/impl/timeline/RustMatrixTimeline.kt 0.00% <0.00%> (ø)
...rix/impl/timeline/item/event/EventMessageMapper.kt 0.00% <0.00%> (ø)
...push/impl/notifications/NotifiableEventResolver.kt 0.00% <0.00%> (ø)
...push/impl/notifications/RoomGroupMessageCreator.kt 0.00% <0.00%> (ø)
...s/impl/timeline/components/TimelineItemEventRow.kt 55.50% <18.18%> (-0.39%) ⬇️
... and 2 more

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

@jmartinesp jmartinesp marked this pull request as ready for review July 26, 2023 12:48
@jmartinesp jmartinesp requested a review from a team as a code owner July 26, 2023 12:48
@github-actions
Copy link
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link:

@jmartinesp jmartinesp requested a review from bmarty July 26, 2023 13:18
Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

One small remark otherwise LGTM!

@@ -100,6 +101,8 @@ class RustMatrixTimeline(

init {
Timber.d("Initialize timeline for room ${matrixRoom.roomId}")

val rustTaskHandleBag = TaskHandleBag()
Copy link
Member

Choose a reason for hiding this comment

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

just call it taskHandleBag?

@jmartinesp jmartinesp enabled auto-merge (squash) July 26, 2023 14:02
@jmartinesp jmartinesp disabled auto-merge July 26, 2023 14:04
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

LGTM, nothing blocking. Thanks!

when (notificationEvent) {
is NotificationEvent.Timeline -> timelineEventToNotificationContentMapper.map(notificationEvent.event)
is NotificationEvent.Invite -> NotificationContent.StateEvent.RoomMemberContent(
userId = sessionId.value,
Copy link
Member

Choose a reason for hiding this comment

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

I am wondering why RoomMemberContent::userId is a String and not a UserId, but not blocking here.

@@ -42,6 +42,8 @@ import org.matrix.rustcomponents.sdk.MessageType as RustMessageType

class EventMessageMapper {

private val timelineEventContentMapper by lazy { TimelineEventContentMapper() }
Copy link
Member

Choose a reason for hiding this comment

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

I do not think that it is useful to use by lazy here. Is there a reason I am missing? (not blocking)

Copy link
Member Author

@jmartinesp jmartinesp Jul 26, 2023

Choose a reason for hiding this comment

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

Cyclical dependencies: TimelineEventContentMapper would have an EventMessageMapper, which would in turn have an TimelineEventContentMapper, etc.

We could try to extract this to refactor this logic, but I'd rather do it in another PR so we can merge and test this version.

@jmartinesp jmartinesp enabled auto-merge (squash) July 26, 2023 14:19
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@jmartinesp jmartinesp merged commit 05f7037 into develop Jul 26, 2023
@jmartinesp jmartinesp deleted the chore/upgrade-rust-sdk-0.1.36 branch July 26, 2023 14:22
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