Skip to content

Conversation

@oxide-renovate
Copy link
Contributor

@oxide-renovate oxide-renovate bot commented Nov 19, 2024

This PR contains the following updates:

Package Type Update Change
ruma-common (source) workspace.dependencies minor 0.13.0 -> 0.17.0

Release Notes

ruma/ruma (ruma-common)

v0.17.0: ruma-common 0.17.0

Compare Source

Breaking changes:

  • Merge the PartialOrdAsRefStr derive macro into OrdAsRefStr, so both traits are always implemented using the same logic.
  • Rename the PartialEqAsRefStr derive macro to EqAsRefStr and make it implement both PartialEq and Eq.
  • The StringEnum derive macro also implements Ord, PartialOrd, Eq and PartialEq using the AsRef<str> implementation of the enum.
  • The predefined push rules for legacy mentions PatternedPushRule::contains_user_name(), ConditionalPushRule::contains_display_name() and ConditionalPushRule::roomnotif() were removed, according to MSC4210. Their rule IDs are still available in PredefinedContentRuleId and PredefinedOverrideRuleId, and they are still supported in PatternedPushRule::applies_to() and ConditionalPushRule::applies(), for backwards-compatibility for clients.
  • Macros no longer support importing the ruma and ruma-events crate from the matrix-sdk-appservice crate. This crate was dropped 2 years ago.
  • Metadata was changed from a struct to a trait. It is a supertrait of OutgoingRequest and IncomingRequest, and its fields are now associated types or constants.
    • The authentication field of the Metadata struct is now an associated type named Authentication. The AuthScheme enum was changed from an enum to a trait. Its variants are now structs implementing the AuthScheme trait. The None variant was renamed to NoAuthentication and the ServerSignatures variant was moved to ruma-federation-api. The access_token argument of OutgoingRequest::try_into_http_request() is renamed to authentication_input and is generic over the Input associated type of the AuthScheme trait.
    • The history field of the Metadata struct is now an associated constant named PATH_BUILDER. The type of this constant is defined by the PathBuilder associated type, which must implement the PathBuilder trait. The considering argument of OutgoingRequest::try_into_http_request() is renamed to path_builder_input and is generic over the Input associated type of the PathBuilder trait. The Input of VersionHistory was changed from &'_ SupportedVersions to Cow<'_, SupportedVersions>.
    • The other fields of the Metadata struct are now associated constants with the same name converted to uppercase.
    • The metadata! macro generates the Metadata trait implementation for a type named Request by default. This type can be changed with an @for setting.
  • The http_headers module is now behind the api cargo feature.
  • OutgoingRequestAppserviceExt::try_into_http_request_with_user_id() is renamed to try_into_http_request_with_identity() and takes an AppserviceUserIdentity instead of a UserId. This allows to specify a device ID, according to MSC4326.
  • IntoHttpError::NeedsAuthentication is a newtype variant renamed to Authentication that accepts any error type.
  • Remove support for the following rules for the StringEnum, AsRefStr and FromString derive macros' rename_all attribute, because they either can be replaced by the (prefix = "prefix", rule = "rule") syntax or are unused as far as we know:
    • "PascalCase"
    • "SCREAMING-KEBAB-CASE"
    • "m.dotted.case"
    • "M_MATRIX_ERROR_CASE"
    • "m.lowercase"
    • "m.snake_case"
    • ".m.rule.snake_case"
    • "m.role.snake_case"

Bug fixes:

  • With the request and response attribute macros, the Content-Type header defaults to application/octet-stream instead of application/json if the raw_body attribute is set on a field.
  • Fix the check to make sure that all paths used to build VersionHistory contain the same number of variables. It was broken since the syntax was changed from :variable to {variable}.

Improvements:

  • Add org.matrix.msc4380 unstable feature support to /versions.
  • Add MatrixVersion::V1_16
  • Remove support for the org.matrix.hydra.11 room version and the corresponding unstable-hydra cargo feature. It should only have been used for development, and room version 12 should be used instead.
  • Metadata::make_endpoint_url() is also available as VersionHistory::make_endpoint_url().
  • PushCondition::ContainsDisplayName is deprecated, according to MSC4210.
  • Add SinglePath as a PathBuilder. It should be used for APIs that don't have a /versions endpoint and for endpoints that can't be versioned.
  • AuthScheme data can be extracted from incoming HTTP requests with AuthScheme::extract_authentication().
  • The StringEnum, AsRefStr and FromString derive macros allow to set a custom prefix alongside the rule to rename all the variants, like this: #[ruma_enum(rename_all(prefix = "m.", rule = "snake_case"))]. The previous syntax using #[ruma_enum(rename_all = "snake_case")] still works and assumes that the prefix is empty.

v0.16.0: ruma-common 0.16.0

Compare Source

Breaking changes:

  • PushCondition::applies, ConditionalPushRule::applies, AnyPushRuleRef::applies, AnyPushRule::applies, Ruleset::applies, Ruleset::get_actions, Ruleset::get_match all became async, to allow for lazy evaluation of push rules.
  • UserId parsing and deserialization are now compatible with all non-compliant user IDs in the wild by default, due to a clarification in the spec.
    • The compat-user-id cargo feature was removed.
    • UserId::validate_historical() and UserId::validate_strict() allow to check for spec compliance.
    • The (owned_)user_id! macros always validate against the strict grammar in the spec, regardless of the compat features that are enabled.
  • (owned_)room_id! macros disallow the NUL byte, due to a clarification in the spec.
  • (owned_)room_alias_id! macros disallow the NUL byte for the localpart, due to a clarification in the spec.
  • MatrixVersion does not implement Display anymore as it is not correct to convert V1_0 to a string. Instead MatrixVersion::as_str() can be used that only returns None for that same variant.
  • MatrixVersion::(into/from)_parts are no longer exposed as public methods. They were usually used to sort MatrixVersions, now the PartialOrd and Ord implementations can be used instead.
  • Protocol and ProtocolInit are generic on the protocol instance type.
  • Add support for endpoints that only allow appservices to call them, renaming AppserviceToken to AppserviceTokenOptional, with the new variant taking AppserviceToken's place.
  • The redact* functions in canonical_json take RedactionRules instead of RoomVersionId. This avoids undefined behavior for unknown room versions.
  • OutgoingRequest::try_into_http_request(), OutgoingRequestAppserviceExt::try_into_http_request_with_user_id() and Metadata::make_endpoint_url() take a SupportedVersions instead of a &[MatrixVersion].
  • The metadata macro allows to specify stable and unstable feature flags for the paths in history.
    • VersionHistory::new() takes a &'static [(Option<&'static str>, &'static str)] for the unstable paths and a &'static [(StablePathSelector, &'static str)] for the stable paths.
    • VersionHistory::unstable_paths() returns an impl Iterator<Item = (Option<&'static str>, &'static str)>.
    • VersionHistory::stable_paths() returns an impl Iterator<Item = (StablePathSelector, &'static str)>.
    • VersionHistory::stable_endpoint_for() was renamed to version_path().
    • VersioningDecision's Stable variant was renamed to Version and Unstable was renamed to Feature.
  • The syntax of variables in endpoint paths segments in the metadata macro has changed: the variable must now be surrounded by {} instead of being preceded by :. For example /_matrix/client/foo/{bar}. This matches the OpenAPI syntax and the new syntax supported by axum 0.8.
  • JoinRule and its associated types where imported from ruma-events into the room module.
  • space::SpaceRoomJoinRule was removed and replaced by room::JoinRuleSummary.
  • directory::PublicRoomJoinRule was moved and renamed to room::JoinRuleKind.
    • It can be constructed with JoinRule::kind() and JoinRuleSummary::kind().
  • Make PushConditionRoomCtx and PushConditionPowerLevelsCtx non-exhaustive.
  • The versions field of SupportedVersions is now a BTreeSet<MatrixVersion>, to make sure that the versions are always deduplicated and sorted.
  • NotificationPowerLevels now takes a NotificationPowerLevelsKey for the key, an enum that accepts any string.
    • The key field of PushCondition::SenderNotificationPermission uses the same type.
  • RoomId::new() was renamed to RoomId::new_v1(), as several formats are now supported for this type.
  • StateResolutionVersion::V2 now takes StateResolutionV2Rules as a unit field, to specify tweaks to be used when resolving state with version 2 of the state resolution algorithm.
    • This field can be accessed with StateResolutionVersion::v2_rules, returning None if state_res is not StateResolutionVersion::V2.
    • StateResolutionV2Rules has the following fields:
      • begin_iterative_auth_checks_with_empty_state_map, to determine whether to begin the first phase of iterative auth checks with an empty state map.
      • consider_conflicted_state_subgraph, to determine whether to include the conflicted state subgraph in the full conflicted state.

Bug fix:

  • Set the disposition of RoomVersionRules::MSC2870 as unstable.

Improvements:

  • Implement the Zeroize trait for the Base64 type.
  • ProtocolInstance has an instance_id field, due to a clarification in the spec.
  • The unstable-unspecified cargo feature was removed.
  • Add AnyKeyName as a helper type to use KeyId APIs without validating the key name.
  • Add IdentityServerBase64PublicKey as a helper type to decode identity server public keys encoded using standard or URL-safe base64.
  • RoomVersion was imported from ruma-state-res and renamed to RoomVersionRules, along with the following changes:
    • RoomVersionRules::new() was removed and replaced by RoomVersionId::rules().
    • The RoomDisposition enum was renamed to RoomVersionDisposition.
    • The event_format field was renamed to event_id_format and the EventFormat enum was renamed to EventIdFormat.
    • The tweaks in the authorization rules were extracted into the AuthorizationRules struct, which is available in the authorization field of RoomVersionRules.
    • The special_case_aliases_auth field was renamed to special_case_room_aliases.
    • The strict_canonicaljson field was renamed to strict_canonical_json.
    • The extra_redaction_checks field was renamed to special_case_room_redaction.
    • The allow_knocking field was renamed to knocking.
    • The restricted_join_rules field was renamed to restricted_join_rule.
    • RedactionRules was added under the redaction field.
    • SignaturesRules was added under the signatures field.
  • RoomVersionId has an MSC2870 variant for the org.matrix.msc2870 room version defined in MSC2870.
  • Add OutgoingRequest::is_supported() and VersionHistory::is_supported() to be able to know if a server advertises support for an endpoint.
  • Re-export ID_MAX_BYTES from ruma-identifiers-validation.
  • Implement From<PublicRoomsChunk> for RoomSummary.
  • Add content_field_redacts field to RedactionRules, which is used to determine whether the content or top-level redacts field should be used to determine what event an m.room.redaction event redacts.
  • Add SpaceChildOrder which allows to validate the order of an m.space.child event.
  • Add support for room version 12 and its unstable version org.matrix.hydra.11.
  • Add explicitly_privilege_room_creators and additional_room_creators to AuthorizationRules to indicate whether room creators are considered to have "infinite" power level and whether additional room creators can be specified with the content.additional_creators field of an m.room.create event respectively.
  • Add RoomPowerLevelsRules, to provide tweaks to how the power level of a user is determined, and add it to PushConditionPowerLevelsCtx via the rules field.
  • Add room_id_format to RoomVersionRules, to identify the format to use for room IDs depending on the room version.
  • Add RoomId::new_v2() for the new format of room IDs. RoomId::strip_sigil() allows to access the reference hash used in that format.
  • Add unstable support for in-app-only notifications as per MSC3768 under a new unstable-msc3768 feature.
  • Add room_create_event_id_as_room_id to AuthorizationRules to indicate whether the reference hash of the m.room.create event is used to construct the room ID. It has other implications, like the m.room.create event not having a room ID, and the m.room.create event not listed in the auth_events of a PDU.
  • Add require_room_create_room_id and allow_room_create_in_auth_events to EventFormatRules to indicate whether the room ID is required for m.room.create events and whether the event ID of the m.room.create is allowed in the auth_events, respectively.

v0.15.4: ruma-common 0.15.4

Compare Source

Bug fix:

  • Fix serde::default_on_error deserialization helper. It was working with serde_json::from_value but not other functions like serde_json::from_(str/slice). It now works with all 3 methods but is limited to deserializing JSON.

v0.15.3: ruma-common 0.15.3

Compare Source

Improvements:

  • Add RoomSummary that represents the summary of a room's state.
    • Implement From<RoomSummary> for PublicRoomsChunk
  • Add MatrixVersion::V1_15.
  • PublicRoomJoinRule now includes all possible join rule kinds, due to a clarification in Matrix 1.15.
  • Add serde::default_on_error() as a helper to ignore errors during deserialization.
  • Implement conversions between PublicRoomJoinRule and SpaceRoomJoinRule.
  • Add FeatureFlag as an enum whose variants are the flags of features supported by Ruma.
  • Add SupportedVersions, a type to parse /versions responses to get lists of supported versions and features.

v0.15.2: ruma-common 0.15.2

Compare Source

Bug fixes:

  • MatrixVersion::V1_0 now also matches Identity Service API versions r0.2.0 to r0.3.0.
  • Allow configure exhaustive types via RUMA_UNSTABLE_EXHAUSTIVE_TYPES environment variable

Improvements:

  • MatrixVersion implements PartialOrd and Ord. The variants are ordered by release date, with a newer version being greater than an older version.
  • Signatures implements IntoIterator
  • Implement PartialEqAsRefStr, Eq, PartialOrdAsRefStr, OrdAsRefStr for ruma_common::media::Method.
  • DeviceId::new() generates a string with 10 chars instead of 8.
  • Add ignore_invalid_vec_items, to assist deserialization of Vecs, where invalid items should be ignored.
  • Add MatrixVersion::V1_14.

v0.15.1: ruma-common 0.15.1

Compare Source

Improvements:

  • Add MatrixVersion::V1_13.

v0.15.0: ruma-common 0.15.0

Compare Source

Breaking changes:

  • #[serde(flatten)] on the only body field of a #[request] or #[response] struct is disallowed. #[ruma_api(body)] must be used instead.

Improvements:

  • The ruma_identifiers_storage compile-time cfg setting can also be configured by setting the RUMA_IDENTIFIERS_STORAGE environment variable at compile time. It has the benefit of not requiring to re-compile all the crates of the dependency chain when the value is changed.
  • The unstable-exhaustive-types cargo feature was replaced by the ruma_unstable_exhaustive_types compile-time cfg setting. Like all cfg settings, it can be enabled at compile-time with the RUSTFLAGS environment variable, or inside .cargo/config.toml. It can also be enabled by setting the RUMA_UNSTABLE_EXHAUSTIVE_TYPES environment variable.
  • HttpPusherData allows to set custom data for the pusher in the data field, due to a clarification in the spec.
    • The default_payload field that was behind the unstable-unspecified was removed. It can be added manually to the custom data.

v0.14.1: ruma-common 0.14.1

Compare Source

Bug fixes:

  • The KeyId::key_name method now returns the key name. In 0.14.0, key_name mistakenly returned the algorithm.

v0.14.0: ruma 0.14.0

Compare Source

  • Bump MSRV to 1.88

Please refer to the changelogs of:

  • ruma-client-api 0.22.0
  • ruma-common 0.17.0
  • ruma-events 0.32.0
  • ruma-federation-api 0.13.0
  • ruma-html 0.6.0
  • ruma-identity-service-api 0.13.0
  • ruma-push-gateway-api 0.13.0
  • ruma-state-res 0.15.0

Configuration

📅 Schedule: Branch creation - "after 8pm,before 6am" in timezone America/Los_Angeles, Automerge - "after 8pm,before 6am" in timezone America/Los_Angeles.

🚦 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.

@oxide-renovate
Copy link
Contributor Author

oxide-renovate bot commented Nov 19, 2024

⚠️ 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 --package ruma-common@0.13.0 --precise 0.17.0
    Updating crates.io index
    Updating git repository `https://github.com/matrix-org/matrix-rust-sdk.git`
From https://github.com/matrix-org/matrix-rust-sdk
 * [new ref]             cbb92cacce1d16673a949204e4f88b78e9917026 -> refs/commit/cbb92cacce1d16673a949204e4f88b78e9917026
error: failed to select a version for the requirement `ruma-common = "^0.13.0"`
candidate versions found which didn't match: 0.17.0
location searched: crates.io index
required by package `ruma v0.10.1`
    ... which satisfies dependency `ruma = "^0.10.1"` of package `microbot v0.1.0 (/tmp/renovate/repos/github/oxidecomputer/microbot/microbot)`

@oxide-renovate oxide-renovate bot force-pushed the renovate/ruma-common-0.x branch 2 times, most recently from baa4568 to 18037b6 Compare December 16, 2024 09:43
@oxide-renovate oxide-renovate bot changed the title Update Rust crate ruma-common to 0.14.1 Update Rust crate ruma-common to 0.15.0 Dec 16, 2024
@oxide-renovate oxide-renovate bot force-pushed the renovate/ruma-common-0.x branch from 18037b6 to b239c99 Compare December 31, 2024 04:12
@oxide-renovate oxide-renovate bot force-pushed the renovate/ruma-common-0.x branch from b239c99 to 2575857 Compare February 3, 2025 13:21
@oxide-renovate oxide-renovate bot changed the title Update Rust crate ruma-common to 0.15.0 Update Rust crate ruma-common to 0.15.1 Feb 3, 2025
@oxide-renovate oxide-renovate bot force-pushed the renovate/ruma-common-0.x branch from 2575857 to 1d4afda Compare April 7, 2025 09:22
@oxide-renovate oxide-renovate bot changed the title Update Rust crate ruma-common to 0.15.1 Update Rust crate ruma-common to 0.15.2 Apr 7, 2025
@oxide-renovate oxide-renovate bot force-pushed the renovate/ruma-common-0.x branch from 1d4afda to 118462c Compare July 7, 2025 09:10
@oxide-renovate oxide-renovate bot changed the title Update Rust crate ruma-common to 0.15.2 Update Rust crate ruma-common to 0.15.3 Jul 7, 2025
@oxide-renovate oxide-renovate bot force-pushed the renovate/ruma-common-0.x branch from 118462c to 42eba07 Compare July 9, 2025 03:26
@oxide-renovate oxide-renovate bot changed the title Update Rust crate ruma-common to 0.15.3 Update Rust crate ruma-common to 0.15.4 Jul 9, 2025
@oxide-renovate oxide-renovate bot force-pushed the renovate/ruma-common-0.x branch from 42eba07 to cf913ea Compare September 3, 2025 12:37
@oxide-renovate oxide-renovate bot changed the title Update Rust crate ruma-common to 0.15.4 Update Rust crate ruma-common to 0.16.0 Sep 3, 2025
@oxide-renovate oxide-renovate bot force-pushed the renovate/ruma-common-0.x branch from cf913ea to 6d541ba Compare November 20, 2025 13:36
@oxide-renovate oxide-renovate bot changed the title Update Rust crate ruma-common to 0.16.0 Update Rust crate ruma-common to 0.17.0 Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant