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

Bump matrix-sdk dependency to 0.8. #386

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dstu
Copy link

@dstu dstu commented Jan 6, 2025

This accommodates recent protocol changes and addresses #378.

This accommodates recent protocol changes and addresses ulyssa#378.
@vkleen
Copy link

vkleen commented Jan 6, 2025

It looks like a flake.nix needs to be updated as well like in #214.

Copy link

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

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

Hi! Rust SDK maintainer over here. Thanks for doing this PR, it's interesting for us to see how many breaking changes we've introduced, and this helped me realized a doc comment was wrong about compute_display_name(). I made a few suggestions below, but generally the code looks good to me.

src/notifications.rs Outdated Show resolved Hide resolved
src/worker.rs Outdated Show resolved Hide resolved
src/worker.rs Outdated Show resolved Hide resolved
src/worker.rs Outdated Show resolved Hide resolved
src/worker.rs Outdated Show resolved Hide resolved
@ulyssa
Copy link
Owner

ulyssa commented Jan 7, 2025

The changes here look good to me! I'm going to try this out locally a little bit first, but I think the only thing left that this needs is a run of cargo +nightly fmt to fix CI.

@dstu
Copy link
Author

dstu commented Jan 7, 2025

Hm, it looks like matrix-sdk 0.9 just got released (in the last 20 days). Happy to keep get this merged and then work on migrating to 0.9. But, if it's better to jump straight to 0.9, then I can transition to that.

@dstu
Copy link
Author

dstu commented Jan 9, 2025

It looks like a flake.nix needs to be updated as well like in #214.

I'm not familiar with Nix packaging. I took a cursory look and didn't see a quick path to addressing this that I understood. I don't see dependency hashes listed in flake.nix (which appears to be one of the things that #214 addressed). Is there anything in particular I should consult to get this taken care of?

@dstu
Copy link
Author

dstu commented Jan 9, 2025

The changes here look good to me! I'm going to try this out locally a little bit first, but I think the only thing left that this needs is a run of cargo +nightly fmt to fix CI.

Thanks, glad to hear it! This should be set.

@vkleen
Copy link

vkleen commented Jan 9, 2025

It looks like a flake.nix needs to be updated as well like in #214.

I'm not familiar with Nix packaging. I took a cursory look and didn't see a quick path to addressing this that I understood. I don't see dependency hashes listed in flake.nix (which appears to be one of the things that #214 addressed). Is there anything in particular I should consult to get this taken care of?

I think it should be enough to bump the rust nightly version in rustNightly = pkgs.rust-bin.nightly."...".default;. If there isn't a recent enough version to satisfy matrix-sdk, a nix flake update should fix that.

@dstu
Copy link
Author

dstu commented Jan 16, 2025

I think it should be enough to bump the rust nightly version in rustNightly = pkgs.rust-bin.nightly."...".default;. If there isn't a recent enough version to satisfy matrix-sdk, a nix flake update should fix that.

Thanks! This is done.

@almindor
Copy link

A bit of a tangent, but I noticed that iamb currently is very power hungry, it's in fact the higher power creep on my laptop. I delved a bit deeper and found that while the two main workers are efficient (e.g. the input handler and the sdk requests worker), there are a bunch of "forever" refresher workers that just sleep for a time (2-5s or so) and refresh entire sets of data.

I noticed that as part of matrix-sdk v0.8 they mention:

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.

Do I understand correctly that this could be used to replace the inefficient refreshers?

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.

5 participants