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 matrix-sdk-crypto-wasm to 11.0.0 #4566

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

uhoreg
Copy link
Member

@uhoreg uhoreg commented Nov 28, 2024

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

@uhoreg uhoreg added T-Task Tasks for the team like planning Dependencies Pull requests that update a dependency file labels Nov 28, 2024
Copy link
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

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

Thanks, tough work.

@langleyd langleyd removed their request for review November 29, 2024 10:06
@@ -990,6 +992,31 @@ describe.each(Object.entries(CRYPTO_BACKENDS))("verification (%s)", (backend: st
aliceClient.setGlobalErrorOnUnknownDevices(false);
syncResponder.sendOrQueueSyncResponse(getSyncResponse([BOB_TEST_USER_ID]));
await syncPromise(aliceClient);
const crypto = aliceClient.getCrypto()!;
if (crypto instanceof RustCrypto) {
Copy link
Member

Choose a reason for hiding this comment

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

I really don't like that we're using instanceof for this - apart from breaking OO paradigms, it has a tendency to break in unpredictable ways if your modules get messed up and you end up with two different RustCrypto classes. If the app really needs to know what it is, an isRustCrypto()? Or implNeedsSenderDeviceKeys() (although maybe that's even worse).

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I originally tested it using backend, but then TypeScript would complain because I'm calling functions that are only defined for RustCrypto (onSyncCompleted and preprocessToDeviceMessages)

Copy link
Member

Choose a reason for hiding this comment

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

ah, of course. I guess cast it... or test for the existence of those functions?

@richvdh richvdh removed their request for review November 29, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Pull requests that update a dependency file T-Task Tasks for the team like planning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants