Skip to content
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

Update Rust SDK to latest version #134

Merged
merged 7 commits into from
Jul 9, 2024

Conversation

uhoreg
Copy link
Member

@uhoreg uhoreg commented Jul 4, 2024

Looks like three different matrix-rust-sdk PRs introduced incompatible changes. This is my attempt to fix them. I'm certain that the fix for my PR is correct, but fairly sure that the sender_data fix is correct, and less sure that the CollectStrategy fix is sensible.

This introduces a change that will break js-sdk (yay for cascading breakage), so that will need to be updated.

Not sure why the test is failing. Seems to be unrelated to the changes here, so must be some change elsewhere. I'm guessing that it should be fine to update the expected values to the actual values, but someone who knows about why the discrepancy is there should verify.

@uhoreg uhoreg marked this pull request as ready for review July 5, 2024 15:34
@uhoreg uhoreg requested a review from a team as a code owner July 5, 2024 15:34
@uhoreg uhoreg requested a review from richvdh July 5, 2024 15:34
@richvdh
Copy link
Member

richvdh commented Jul 5, 2024

Fixes #132

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

Could you update the changelog pls?

/// Strategy to collect the devices that should receive room keys for the
/// current discussion.
///
/// See matrix_sdk_crypto::CollectStrategy
Copy link
Member

Choose a reason for hiding this comment

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

Please make these docs stand in their own right, so that the online doc (https://matrix-org.github.io/matrix-rust-sdk-crypto-wasm/classes/OlmMachine.html) is useful. (The fact that there are existing docs that just point to a Rust class is definitely bad.)

Copy link
Member Author

Choose a reason for hiding this comment

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

done

src/encryption.rs Show resolved Hide resolved
@richvdh richvdh linked an issue Jul 5, 2024 that may be closed by this pull request
Comment on lines 119 to 121
#[wasm_bindgen()]
#[derive(Debug, Clone, PartialEq, Eq)]
/// Strategy to collect the devices that should receive room keys for the
Copy link
Member

Choose a reason for hiding this comment

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

Please put the #[…] after the documentation. It's more Rust idiomatic to do so.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@uhoreg
Copy link
Member Author

uhoreg commented Jul 8, 2024

Could you update the changelog pls?

I've added a changelog. I'm not sure what the criteria are for which rust-sdk-crypto changes to highlight in the changelogs, so I just highlighted the one that causes the breaking change.

@uhoreg uhoreg requested a review from richvdh July 8, 2024 18:29
CHANGELOG.md Outdated Show resolved Hide resolved
@richvdh richvdh enabled auto-merge July 9, 2024 15:47
@richvdh richvdh merged commit 410a072 into matrix-org:main Jul 9, 2024
3 checks passed
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.

Update wasm bindings to latest rust-sdk
3 participants