Update Rust crate matrix-sdk to 0.8.0 #14

Open
renovatebot wants to merge 1 commit from renovate/matrix-sdk-0.x into main
Collaborator

This PR contains the following updates:

Package Type Update Change
matrix-sdk dependencies minor 0.7.1 -> 0.8.0

Release Notes

matrix-org/matrix-rust-sdk (matrix-sdk)

v0.8.0: matrix-sdk 0.8.0

Compare Source

What's Changed

Bug Fixes
  • Add more invalid characters for room aliases.

  • Match the right status code in Client::is_room_alias_available.

  • Fix a bug where room keys were considered to be downloaded before backups were
    enabled. This bug only affects the
    BackupDownloadStrategy::AfterDecryptionFailure, where no attempt would be
    made to download a room key, if a decryption failure with a given room key
    would have been encountered before the backups were enabled.

Documentation
  • Improve documentation of Client::observe_events.
Features
  • Add create_room_alias function.

  • Client::cross_process_store_locks_holder_name is used everywhere:

  • StoreConfig::new() now takes a
    cross_process_store_locks_holder_name argument.

  • StoreConfig no longer implements Default.

  • BaseClient::new() has been removed.

  • BaseClient::clone_with_in_memory_state_store() now takes a
    cross_process_store_locks_holder_name argument.

  • BaseClient no longer implements Default.

  • EventCacheStoreLock::new() no longer takes a key argument.

  • BuilderStoreConfig no longer has
    cross_process_store_locks_holder_name field for Sqlite and
    IndexedDb.

  • EncryptionSyncService and Notification are using Client::cross_process_store_locks_holder_name.

  • Allow passing a custom RequestConfig to an upload request.

  • Retry uploads if they've failed with transient errors.

  • Implement EventHandlerContext for tuples.

  • Introduce a mechanism similar to Client::add_event_handler and
    Client::add_room_event_handler but with a reactive programming pattern. Add
    Client::observe_events and Client::observe_room_events.

// Get an observer.
let observer =
    client.observe_events::<SyncRoomMessageEvent, (Room, Vec<Action>)>();

// Subscribe to the observer.
let mut subscriber = observer.subscribe();

// Use the subscriber as a `Stream`.
let (message_event, (room, push_actions)) = subscriber.next().await.unwrap();

When calling observe_events, one has to specify the type of event (in the
example, SyncRoomMessageEvent) and a context (in the example, (Room, Vec<Action>), respectively for the room and the push actions).

  • Implement unwedging for media uploads.

  • Send state from state sync and not from timeline to widget (#​4254)

  • Allow aborting media uploads.

  • Add RoomPreviewInfo::num_active_members.

  • Use room directory search as another data source.

  • Check if the user is allowed to do a room mention before trying to send a call
    notify event.
    (#​4271)

  • Add Client::cross_process_store_locks_holder_name().

  • Add a PreviouslyVerified variant to VerificationLevel indicating that the
    identity is unverified and previously it was verified.

  • New UserIdentity::pin method.

  • New ClientBuilder::with_decryption_trust_requirement method.

  • New ClientBuilder::with_room_key_recipient_strategy method

  • New Room.set_account_data and Room.set_account_data_raw RoomAccountData
    setters, analogous to the GlobalAccountData

  • New RequestConfig.max_concurrent_requests which allows to limit the maximum
    number of concurrent requests the internal HTTP client issues (all others have
    to wait until the number drops below that threshold again)

  • Implement proper redact handling in the widget driver. This allows the Rust
    SDK widget driver to support widgets that rely on redacting.

Refactor
  • [breaking] Rename DisplayName to RoomDisplayName.

  • Improve is_room_alias_format_valid so it's more strict.

  • Remove duplicated fields in media event contents.

  • Use SendHandle for media uploads too.

  • Move event_cache_store/ to event_cache/store/ in matrix-sdk-base.

  • Move linked_chunk from matrix-sdk to matrix-sdk-common.

  • Move Event and Gap into matrix_sdk_base::event_cache.

  • Move formatted_caption_from to the SDK, rename it.

  • Tidy up and start commenting the widget code.

  • Get rid of ProcessingContext and inline it in its callers.

  • Get rid of unused limits parameter when constructing a WidgetMachine.

  • Use a specialized mutex for locking access to the state store and
    being_sent.

  • Renamed VerificationLevel::PreviouslyVerified to
    VerificationLevel::VerificationViolation.

  • [breaking] Replace the Notification type from Ruma in SyncResponse and
    Client::register_notification_handler by a custom one.

  • [breaking] The ambiguity maps in SyncResponse are moved to JoinedRoom
    and LeftRoom.

  • [breaking] Room::can_user_redact and Member::can_redact are split
    between *_redact_own and *_redact_other.

  • [breaking] AmbiguityCache contains the room member's user ID.

  • [breaking] Replace impl MediaEventContent with &impl MediaEventContent in
    Media::get_file/Media::remove_file/Media::get_thumbnail/Media::remove_thumbnail

  • [breaking] A custom sliding sync proxy set with
    ClientBuilder::sliding_sync_proxy now takes precedence over a discovered
    proxy.

  • [breaking] Client::get_profile was moved to Account and renamed to
    Account::fetch_user_profile_of. Account::get_profile was renamed to
    Account::fetch_user_profile.

  • [breaking] The HttpError::UnableToCloneRequest error variant has been
    removed because it was never used or generated by the SDK.

  • [breaking] The Error::InconsistentState error variant has been removed
    because it was never used or generated by the SDK.

  • [breaking] The widget capabilities in the FFI now need two additional
    flags: update_delayed_event, send_delayed_event.

  • [breaking] Room::event now takes an optional RequestConfig to allow
    for tweaking the network behavior.

  • [breaking] The instant module was removed, use the ruma::time module
    instead.

  • [breaking] Add ClientBuilder::sqlite_store_with_cache_path to build a
    client that stores caches in a different directory to state/crypto.

  • [breaking] The body parameter in get_media_file has been replaced with
    a filename parameter now that Ruma has a filename() method.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [matrix-sdk](https://github.com/matrix-org/matrix-rust-sdk) | dependencies | minor | `0.7.1` -> `0.8.0` | --- ### Release Notes <details> <summary>matrix-org/matrix-rust-sdk (matrix-sdk)</summary> ### [`v0.8.0`](https://github.com/matrix-org/matrix-rust-sdk/releases/tag/matrix-sdk-0.8.0): matrix-sdk 0.8.0 [Compare Source](https://github.com/matrix-org/matrix-rust-sdk/compare/0.7.1...matrix-sdk-0.8.0) #### What's Changed ##### Bug Fixes - Add more invalid characters for room aliases. - Match the right status code in `Client::is_room_alias_available`. - Fix a bug where room keys were considered to be downloaded before backups were enabled. This bug only affects the `BackupDownloadStrategy::AfterDecryptionFailure`, where no attempt would be made to download a room key, if a decryption failure with a given room key would have been encountered before the backups were enabled. ##### Documentation - Improve documentation of `Client::observe_events`. ##### Features - Add `create_room_alias` function. - `Client::cross_process_store_locks_holder_name` is used everywhere: - `StoreConfig::new()` now takes a `cross_process_store_locks_holder_name` argument. - `StoreConfig` no longer implements `Default`. - `BaseClient::new()` has been removed. - `BaseClient::clone_with_in_memory_state_store()` now takes a `cross_process_store_locks_holder_name` argument. - `BaseClient` no longer implements `Default`. - `EventCacheStoreLock::new()` no longer takes a `key` argument. - `BuilderStoreConfig` no longer has `cross_process_store_locks_holder_name` field for `Sqlite` and `IndexedDb`. - `EncryptionSyncService` and `Notification` are using `Client::cross_process_store_locks_holder_name`. - Allow passing a custom `RequestConfig` to an upload request. - Retry uploads if they've failed with transient errors. - Implement `EventHandlerContext` for tuples. - Introduce a mechanism similar to `Client::add_event_handler` and `Client::add_room_event_handler` but with a reactive programming pattern. Add `Client::observe_events` and `Client::observe_room_events`. ```rust // Get an observer. let observer = client.observe_events::<SyncRoomMessageEvent, (Room, Vec<Action>)>(); // Subscribe to the observer. let mut subscriber = observer.subscribe(); // Use the subscriber as a `Stream`. let (message_event, (room, push_actions)) = subscriber.next().await.unwrap(); ``` When calling `observe_events`, one has to specify the type of event (in the example, `SyncRoomMessageEvent`) and a context (in the example, `(Room, Vec<Action>)`, respectively for the room and the push actions). - Implement unwedging for media uploads. - Send state from state sync and not from timeline to widget ([#&#8203;4254](https://github.com/matrix-org/matrix-rust-sdk/pull/4254)) - Allow aborting media uploads. - Add `RoomPreviewInfo::num_active_members`. - Use room directory search as another data source. - Check if the user is allowed to do a room mention before trying to send a call notify event. ([#&#8203;4271](https://github.com/matrix-org/matrix-rust-sdk/pull/4271)) - Add `Client::cross_process_store_locks_holder_name()`. - Add a `PreviouslyVerified` variant to `VerificationLevel` indicating that the identity is unverified and previously it was verified. - New `UserIdentity::pin` method. - New `ClientBuilder::with_decryption_trust_requirement` method. - New `ClientBuilder::with_room_key_recipient_strategy` method - New `Room.set_account_data` and `Room.set_account_data_raw` RoomAccountData setters, analogous to the GlobalAccountData - New `RequestConfig.max_concurrent_requests` which allows to limit the maximum number of concurrent requests the internal HTTP client issues (all others have to wait until the number drops below that threshold again) - Implement proper redact handling in the widget driver. This allows the Rust SDK widget driver to support widgets that rely on redacting. ##### Refactor - \[**breaking**] Rename `DisplayName` to `RoomDisplayName`. - Improve `is_room_alias_format_valid` so it's more strict. - Remove duplicated fields in media event contents. - Use `SendHandle` for media uploads too. - Move `event_cache_store/` to `event_cache/store/` in `matrix-sdk-base`. - Move `linked_chunk` from `matrix-sdk` to `matrix-sdk-common`. - Move `Event` and `Gap` into `matrix_sdk_base::event_cache`. - Move `formatted_caption_from` to the SDK, rename it. - Tidy up and start commenting the widget code. - Get rid of `ProcessingContext` and inline it in its callers. - Get rid of unused `limits` parameter when constructing a `WidgetMachine`. - Use a specialized mutex for locking access to the state store and `being_sent`. - Renamed `VerificationLevel::PreviouslyVerified` to `VerificationLevel::VerificationViolation`. - \[**breaking**] Replace the `Notification` type from Ruma in `SyncResponse` and `Client::register_notification_handler` by a custom one. - \[**breaking**] The ambiguity maps in `SyncResponse` are moved to `JoinedRoom` and `LeftRoom`. - \[**breaking**] `Room::can_user_redact` and `Member::can_redact` are split between `*_redact_own` and `*_redact_other`. - \[**breaking**] `AmbiguityCache` contains the room member's user ID. - \[**breaking**] Replace `impl MediaEventContent` with `&impl MediaEventContent` in `Media::get_file`/`Media::remove_file`/`Media::get_thumbnail`/`Media::remove_thumbnail` - \[**breaking**] A custom sliding sync proxy set with `ClientBuilder::sliding_sync_proxy` now takes precedence over a discovered proxy. - \[**breaking**] `Client::get_profile` was moved to `Account` and renamed to `Account::fetch_user_profile_of`. `Account::get_profile` was renamed to `Account::fetch_user_profile`. - \[**breaking**] The `HttpError::UnableToCloneRequest` error variant has been removed because it was never used or generated by the SDK. - \[**breaking**] The `Error::InconsistentState` error variant has been removed because it was never used or generated by the SDK. - \[**breaking**] The widget capabilities in the FFI now need two additional flags: `update_delayed_event`, `send_delayed_event`. - \[**breaking**] `Room::event` now takes an optional `RequestConfig` to allow for tweaking the network behavior. - \[**breaking**] The `instant` module was removed, use the `ruma::time` module instead. - \[**breaking**] Add `ClientBuilder::sqlite_store_with_cache_path` to build a client that stores caches in a different directory to state/crypto. - \[**breaking**] The `body` parameter in `get_media_file` has been replaced with a `filename` parameter now that Ruma has a `filename()` method. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMS41IiwidXBkYXRlZEluVmVyIjoiMzkuMTEuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
renovatebot added 1 commit 2024-11-19 16:05:32 +00:00
Update Rust crate matrix-sdk to 0.8.0
Some checks failed
renovate/artifacts Artifact file update failure
/ build-container (push) Failing after 23s
b0fc55b77c
Author
Collaborator

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path Cargo.toml --workspace
    Updating crates.io index
error: failed to select a version for `libsqlite3-sys`.
    ... required by package `sqlx-sqlite v0.7.3`
    ... which satisfies dependency `sqlx-sqlite = "=0.7.3"` of package `sqlx v0.7.3`
    ... which satisfies dependency `sqlx = "^0.7.3"` of package `matrix-meshtastic-bridge v0.1.0 (/tmp/renovate/repos/gitea/finn/matrix-meshtastic-bridge)`
versions that meet the requirements `^0.27.0` are: 0.27.0

the package `libsqlite3-sys` links to the native library `sqlite3`, but it conflicts with a previous package which links to `sqlite3` as well:
package `libsqlite3-sys v0.28.0`
    ... which satisfies dependency `libsqlite3-sys = "^0.28.0"` of package `rusqlite v0.31.0`
    ... which satisfies dependency `rusqlite = "^0.31.0"` of package `matrix-sdk-sqlite v0.8.0`
    ... which satisfies dependency `matrix-sdk-sqlite = "^0.8.0"` of package `matrix-sdk v0.8.0`
    ... which satisfies dependency `matrix-sdk = "^0.8.0"` of package `matrix-meshtastic-bridge v0.1.0 (/tmp/renovate/repos/gitea/finn/matrix-meshtastic-bridge)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the `links = "sqlite3"` value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

failed to select a version for `libsqlite3-sys` which could resolve this conflict

### ⚠️ Artifact update problem Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens: - any of the package files in this branch needs updating, or - the branch becomes conflicted, or - you click the rebase/retry checkbox if found above, or - you rename this PR's title to start with "rebase!" to trigger it manually The artifact failure details are included below: ##### File name: Cargo.lock ``` Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path Cargo.toml --workspace Updating crates.io index error: failed to select a version for `libsqlite3-sys`. ... required by package `sqlx-sqlite v0.7.3` ... which satisfies dependency `sqlx-sqlite = "=0.7.3"` of package `sqlx v0.7.3` ... which satisfies dependency `sqlx = "^0.7.3"` of package `matrix-meshtastic-bridge v0.1.0 (/tmp/renovate/repos/gitea/finn/matrix-meshtastic-bridge)` versions that meet the requirements `^0.27.0` are: 0.27.0 the package `libsqlite3-sys` links to the native library `sqlite3`, but it conflicts with a previous package which links to `sqlite3` as well: package `libsqlite3-sys v0.28.0` ... which satisfies dependency `libsqlite3-sys = "^0.28.0"` of package `rusqlite v0.31.0` ... which satisfies dependency `rusqlite = "^0.31.0"` of package `matrix-sdk-sqlite v0.8.0` ... which satisfies dependency `matrix-sdk-sqlite = "^0.8.0"` of package `matrix-sdk v0.8.0` ... which satisfies dependency `matrix-sdk = "^0.8.0"` of package `matrix-meshtastic-bridge v0.1.0 (/tmp/renovate/repos/gitea/finn/matrix-meshtastic-bridge)` Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the `links = "sqlite3"` value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links. failed to select a version for `libsqlite3-sys` which could resolve this conflict ```
Some checks failed
renovate/artifacts Artifact file update failure
/ build-container (push) Failing after 23s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/matrix-sdk-0.x:renovate/matrix-sdk-0.x
git checkout renovate/matrix-sdk-0.x

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout main
git merge --no-ff renovate/matrix-sdk-0.x
git checkout renovate/matrix-sdk-0.x
git rebase main
git checkout main
git merge --ff-only renovate/matrix-sdk-0.x
git checkout renovate/matrix-sdk-0.x
git rebase main
git checkout main
git merge --no-ff renovate/matrix-sdk-0.x
git checkout main
git merge --squash renovate/matrix-sdk-0.x
git checkout main
git merge --ff-only renovate/matrix-sdk-0.x
git checkout main
git merge renovate/matrix-sdk-0.x
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: finn/matrix-meshtastic-bridge#14
No description provided.