Skip to content

Conversation

@Hywan
Copy link
Member

@Hywan Hywan commented Apr 4, 2025

This patch updates rand to 0.9. It brings several nice advantages:

  • it is compatible with the new Rust edition 2024,
  • it simplifies several signatures since try_fill is replaced by
    fill, there is no failure, thus removing many unwraps!

This patch also updates getrandom to 0.3.2 and improves
testing with Wasm and getrandom.


Hywan added a commit to Hywan/matrix-rust-sdk that referenced this pull request Apr 4, 2025
@poljar
Copy link
Contributor

poljar commented Apr 4, 2025

I'm afraid that this will have to wait for matrix-org/vodozemac#206 and its deps.

@codecov
Copy link

codecov bot commented Apr 4, 2025

Codecov Report

Attention: Patch coverage is 86.20690% with 4 lines in your changes missing coverage. Please review.

Project coverage is 85.81%. Comparing base (13ca27d) to head (d871b9b).
Report is 1235 commits behind head on main.

Files with missing lines Patch % Lines
crates/matrix-sdk-crypto/src/store/mod.rs 60.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4885      +/-   ##
==========================================
- Coverage   85.82%   85.81%   -0.02%     
==========================================
  Files         299      299              
  Lines       35233    35235       +2     
==========================================
- Hits        30239    30236       -3     
- Misses       4994     4999       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Hywan added 5 commits April 4, 2025 10:09
This patch updates `rand` to 0.9. It brings several nice advantages:

- it is compatible with the new Rust edition 2024,
- it simplifies several signatures since `try_fill` is replaced by
  `fill`, there is no failure.
This patch deduplicates `getrandom` where it was present in 2 versions.
It also updates `getrandom`  to 0.3.2.
@Hywan Hywan force-pushed the chore-update-rand branch from 65ad109 to d871b9b Compare April 4, 2025 08:09
@Hywan
Copy link
Member Author

Hywan commented Apr 4, 2025

Why?

rand exists in 2 versions in the deps tree with this PR, but I think waiting on vodozemac isn't blocking.

@Hywan Hywan changed the title chore(cargo): Update rand to 0.9 chore(cargo): Update rand to 0.9, and getrandom to 0.3.2 Apr 4, 2025
@Hywan
Copy link
Member Author

Hywan commented Apr 4, 2025

We have 2 versions of getrandom, the 0.3.2 from our crates, and 0.2.15 from:

  • chacha20poly1305 which still requires rand 0.6.4,
  • backoff, which still requires rand 0.8.5,
  • vodozemac which still requires rand 0.6.4,
  • ctr, same,
  • hkdf, same,
  • indexed_db_futures,

We have to move many crates…

@poljar
Copy link
Contributor

poljar commented Jul 17, 2025

Let's close this for now. We're going to collect merge conflicts for quite a bit here otherwise.

@poljar poljar closed this Jul 17, 2025
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.

2 participants