Skip to content

Commit

Permalink
Merge pull request #2421 from acterglobal/ben-update-to-latest-rust
Browse files Browse the repository at this point in the history
Update to latest matrix-rust-sdk
  • Loading branch information
gnunicorn authored Dec 10, 2024
2 parents 8152995 + b25ff67 commit fba0384
Show file tree
Hide file tree
Showing 13 changed files with 646 additions and 500 deletions.
806 changes: 429 additions & 377 deletions Cargo.lock

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@ default-features = false
# not used directly but needed to enable specific features from ruma
# ATTENTION: _MUST_ stay in sync with the ruma-rev used by matrix-sdk!
[workspace.dependencies.ruma]
version = "0.11.1"
# version = "0.11.1"
git = "https://github.com/ruma/ruma"
rev = "c91499fc464adc865a7c99d0ce0b35982ad96711"

# - see comment above
[workspace.dependencies.ruma-common]
version = "0.14.1"
# version = "0.14.1"
git = "https://github.com/ruma/ruma"
rev = "c91499fc464adc865a7c99d0ce0b35982ad96711"

[workspace.dependencies.url]
version = "2.5.0"
Expand Down
42 changes: 24 additions & 18 deletions app/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
PODS:
- acter_flutter_sdk (0.0.1):
- Flutter
- app_badge_plus (1.1.5):
- app_badge_plus (1.1.6):
- Flutter
- app_links (0.0.2):
- Flutter
- app_settings (5.1.1):
- Flutter
- appcheck (1.0.3):
- Flutter
- camera_avfoundation (0.0.1):
- Flutter
- connectivity_plus (0.0.1):
Expand Down Expand Up @@ -55,16 +57,16 @@ PODS:
- file_picker (0.0.1):
- DKImagePickerController/PhotoGallery
- Flutter
- Firebase/CoreOnly (11.2.0):
- FirebaseCore (= 11.2.0)
- firebase_core (3.6.0):
- Firebase/CoreOnly (= 11.2.0)
- Firebase/CoreOnly (11.4.0):
- FirebaseCore (= 11.4.0)
- firebase_core (3.8.1):
- Firebase/CoreOnly (= 11.4.0)
- Flutter
- FirebaseCore (11.2.0):
- FirebaseCore (11.4.0):
- FirebaseCoreInternal (~> 11.0)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/Logger (~> 8.0)
- FirebaseCoreInternal (11.5.0):
- FirebaseCoreInternal (11.6.0):
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- Flutter (1.0.0)
- flutter_keyboard_visibility (0.0.1):
Expand Down Expand Up @@ -113,11 +115,11 @@ PODS:
- SDWebImage/Core (5.20.0)
- sensors_plus (0.0.1):
- Flutter
- Sentry/HybridSDK (8.36.0)
- sentry_flutter (8.9.0):
- Sentry/HybridSDK (8.40.1)
- sentry_flutter (8.10.1):
- Flutter
- FlutterMacOS
- Sentry/HybridSDK (= 8.36.0)
- Sentry/HybridSDK (= 8.40.1)
- share_plus (0.0.1):
- Flutter
- shared_preferences_foundation (0.0.1):
Expand All @@ -142,6 +144,7 @@ DEPENDENCIES:
- app_badge_plus (from `.symlinks/plugins/app_badge_plus/ios`)
- app_links (from `.symlinks/plugins/app_links/ios`)
- app_settings (from `.symlinks/plugins/app_settings/ios`)
- appcheck (from `.symlinks/plugins/appcheck/ios`)
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
- device_calendar (from `.symlinks/plugins/device_calendar/ios`)
Expand Down Expand Up @@ -198,6 +201,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/app_links/ios"
app_settings:
:path: ".symlinks/plugins/app_settings/ios"
appcheck:
:path: ".symlinks/plugins/appcheck/ios"
camera_avfoundation:
:path: ".symlinks/plugins/camera_avfoundation/ios"
connectivity_plus:
Expand Down Expand Up @@ -269,9 +274,10 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
acter_flutter_sdk: e60481171e46975418babb7d0ec8809eaacaaa03
app_badge_plus: 4ab1da0bfadc61b82507c3f48e63e559ed3080de
app_badge_plus: 060babf17a97011f0093739f0aa8bc65b2479233
app_links: e7a6750a915a9e161c58d91bc610e8cd1d4d0ad0
app_settings: 017320c6a680cdc94c799949d95b84cb69389ebc
appcheck: e1ab9d4e03736f03e0401554a134d1ed502d7629
camera_avfoundation: dd002b0330f4981e1bbcb46ae9b62829237459a4
connectivity_plus: 4c41c08fc6d7c91f63bc7aec70ffe3730b04f563
device_calendar: 9cb33f88a02e19652ec7b8b122ca778f751b1f7b
Expand All @@ -281,10 +287,10 @@ SPEC CHECKSUMS:
emoji_picker_flutter: fe2e6151c5b548e975d546e6eeb567daf0962a58
fc_native_video_thumbnail: 927d4dcfd4c7e9f2cc1a20bb52dfee83de3792c2
file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655
Firebase: 98e6bf5278170668a7983e12971a66b2cd57fc8c
firebase_core: 2bedc3136ec7c7b8561c6123ed0239387b53f2af
FirebaseCore: a282032ae9295c795714ded2ec9c522fc237f8da
FirebaseCoreInternal: f47dd28ae7782e6a4738aad3106071a8fe0af604
Firebase: cf1b19f21410b029b6786a54e9764a0cacad3c99
firebase_core: 418aed674e9a0b8b6088aec16cde82a811f6261f
FirebaseCore: e0510f1523bc0eb21653cac00792e1e2bd6f1771
FirebaseCoreInternal: d98ab91e2d80a56d7b246856a8885443b302c0c2
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086
Expand All @@ -305,11 +311,11 @@ SPEC CHECKSUMS:
screen_brightness_ios: 715ca807df953bf676d339f11464e438143ee625
SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8
sensors_plus: 7229095999f30740798f0eeef5cd120357a8f4f2
Sentry: f8374b5415bc38dfb5645941b3ae31230fbeae57
sentry_flutter: 0eb93e5279eb41e2392212afe1ccd2fecb4f8cbe
Sentry: e9215d7b17f7902692b4f8700e061e4f853e3521
sentry_flutter: 927eed60d66951d1b0f1db37fe94ff5cb7c80231
share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqflite_darwin: a553b1fd6fe66f53bbb0fe5b4f5bab93f08d7a13
sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
Expand Down
40 changes: 20 additions & 20 deletions app/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ PODS:
- FlutterMacOS
- file_selector_macos (0.0.1):
- FlutterMacOS
- Firebase/CoreOnly (11.2.0):
- FirebaseCore (= 11.2.0)
- firebase_core (3.6.0):
- Firebase/CoreOnly (~> 11.2.0)
- Firebase/CoreOnly (11.4.2):
- FirebaseCore (= 11.4.2)
- firebase_core (3.8.1):
- Firebase/CoreOnly (~> 11.4.0)
- FlutterMacOS
- FirebaseCore (11.2.0):
- FirebaseCoreInternal (~> 11.0)
- FirebaseCore (11.4.2):
- FirebaseCoreInternal (< 12.0, >= 11.4.2)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/Logger (~> 8.0)
- FirebaseCoreInternal (11.5.0):
- FirebaseCoreInternal (11.6.0):
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- flutter_local_notifications (0.0.1):
- FlutterMacOS
Expand Down Expand Up @@ -54,11 +54,11 @@ PODS:
- FlutterMacOS
- screen_retriever (0.0.1):
- FlutterMacOS
- Sentry/HybridSDK (8.36.0)
- sentry_flutter (8.9.0):
- Sentry/HybridSDK (8.40.1)
- sentry_flutter (8.10.1):
- Flutter
- FlutterMacOS
- Sentry/HybridSDK (= 8.36.0)
- Sentry/HybridSDK (= 8.40.1)
- share_plus (0.0.1):
- FlutterMacOS
- shared_preferences_foundation (0.0.1):
Expand Down Expand Up @@ -180,26 +180,26 @@ SPEC CHECKSUMS:
emoji_picker_flutter: 533634326b1c5de9a181ba14b9758e6dfe967a20
fc_native_video_thumbnail: 927d4dcfd4c7e9f2cc1a20bb52dfee83de3792c2
file_selector_macos: cc3858c981fe6889f364731200d6232dac1d812d
Firebase: 98e6bf5278170668a7983e12971a66b2cd57fc8c
firebase_core: e88f946a4601cb1854178cb07da241bba5a6508e
FirebaseCore: a282032ae9295c795714ded2ec9c522fc237f8da
FirebaseCoreInternal: f47dd28ae7782e6a4738aad3106071a8fe0af604
flutter_local_notifications: 3805ca215b2fb7f397d78b66db91f6a747af52e4
Firebase: 7fd5466678d964be78fbf536d8a3385da19c4828
firebase_core: e4a35c426636a2cce00a5163df7ba69bfd0cca57
FirebaseCore: 6b32c57269bd999aab34354c3923d92a6e5f3f84
FirebaseCoreInternal: d98ab91e2d80a56d7b246856a8885443b302c0c2
flutter_local_notifications: 4b427ffabf278fc6ea9484c97505e231166927a5
flutter_secure_storage_macos: 59459653abe1adb92abbc8ea747d79f8d19866c9
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
media_kit_libs_macos_video: b3e2bbec2eef97c285f2b1baa7963c67c753fb82
media_kit_native_event_loop: 81fd5b45192b72f8b5b69eaf5b540f45777eb8d5
media_kit_video: c75b07f14d59706c775778e4dd47dd027de8d1e5
package_info_plus: f5790acc797bf17c3e959e9d6cf162cc68ff7523
package_info_plus: 12f1c5c2cfe8727ca46cbd0b26677728972d9a5b
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
screen_brightness_macos: 2d6d3af2165592d9a55ffcd95b7550970e41ebda
screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38
Sentry: f8374b5415bc38dfb5645941b3ae31230fbeae57
sentry_flutter: 0eb93e5279eb41e2392212afe1ccd2fecb4f8cbe
share_plus: fd717ef89a2801d3491e737630112b80c310640e
Sentry: e9215d7b17f7902692b4f8700e061e4f853e3521
sentry_flutter: 927eed60d66951d1b0f1db37fe94ff5cb7c80231
share_plus: 1fa619de8392a4398bfaf176d441853922614e89
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqflite_darwin: a553b1fd6fe66f53bbb0fe5b4f5bab93f08d7a13
sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
tray_manager: 9064e219c56d75c476e46b9a21182087930baf90
url_launcher_macos: c82c93949963e55b228a30115bd219499a6fe404
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
Expand Down
2 changes: 1 addition & 1 deletion native/acter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "acter"
version = "0.1.0"
edition = "2021"
rust-version = "1.70"
rust-version = "1.81"
description = "SDK of the acter app"
homepage = "https://acter.global"
repository = "https://github.com/acterglobal/a3"
Expand Down
2 changes: 1 addition & 1 deletion native/acter/src/api/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub async fn make_client_config(
Ok((builder.homeserver_url(default_homeserver_url), user_id))
} else {
// we need to fallback to the testing/default scenario
return Ok((builder.server_name(user_id.server_name()), user_id));
Ok((builder.server_name(user_id.server_name()), user_id))
}
}

Expand Down
5 changes: 2 additions & 3 deletions native/acter/src/api/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,9 @@ impl Client {
.await?;
}

return path
.to_str()
path.to_str()
.map(|s| s.to_string())
.context("Path was generated from strings. Must be string");
.context("Path was generated from strings. Must be string")
}

pub async fn join_room(
Expand Down
18 changes: 10 additions & 8 deletions native/acter/src/platform/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use anyhow::{bail, Result};
use chrono::Local;
use lazy_static::lazy_static;
use log::{log_enabled, Level, LevelFilter, Log, Metadata, Record};
use matrix_sdk::{Client, ClientBuilder};
use matrix_sdk::{Client, ClientBuilder, SqliteEventCacheStore};
use matrix_sdk_base::{event_cache::store::EventCacheStoreError, store::StoreConfig};
use matrix_sdk_sqlite::{OpenStoreError, SqliteCryptoStore, SqliteStateStore};
use parse_env_filter::eager::{filters, Filter};
Expand Down Expand Up @@ -198,12 +198,10 @@ pub fn rotate_log_file() -> Result<String> {
match &*FILE_LOGGER.lock().unwrap() {
Some(dispatch) => {
for output in dispatch.rotate().iter() {
match output {
Some((old_path, new_path)) => {
return Ok(old_path.to_string_lossy().to_string());
}
None => {}
}
let Some((old_path, new_path)) = output else {
continue;
};
return Ok(old_path.to_string_lossy().to_string());
}
}
None => {
Expand Down Expand Up @@ -319,12 +317,16 @@ async fn make_store_config(
.crypto_store(SqliteCryptoStore::open(path, passphrase).await?);

let sql_state_store = SqliteStateStore::open(path, passphrase).await?;
let event_cache_store = SqliteEventCacheStore::open(path, passphrase).await?;
let Some(passphrase) = passphrase else {
return Ok(config.state_store(sql_state_store));
return Ok(config
.state_store(sql_state_store)
.event_cache_store(event_cache_store));
};

let event_cache_store = matrix_sdk_store_file_event_cache::wrap_with_file_cache_and_limits(
&sql_state_store,
event_cache_store,
media_cache_path,
passphrase,
#[cfg(target_os = "ios")]
Expand Down
1 change: 1 addition & 0 deletions native/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ templates = ["toml", "minijinja", "indexmap", "tokio-retry"]
# for ruma macros
client = []
server = []
unstable-exhaustive-types = []

[dependencies]
tokio = { version = "1", features = ["rt", "macros"] }
Expand Down
2 changes: 1 addition & 1 deletion native/file-event-cache/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ tokio = { version = "1.38.0", features = ["sync"], default-features = false, opt

[dev-dependencies]
anyhow = "1.0.79"
matrix-sdk-sqlite = { workspace = true }
matrix-sdk-sqlite = { workspace = true, features = ['event-cache'] }
matrix-sdk-test = { workspace = true }
matrix-sdk = { workspace = true, features = ["rustls-tls"] }
tempfile = "3.9.0"
Expand Down
Loading

0 comments on commit fba0384

Please sign in to comment.