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

chore: update core-crypto repo to rust 2024 edition [WPB-16113] #925

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

Conversation

coriolinus
Copy link
Contributor

What's new in this PR

Per edition guide.


PR Submission Checklist for internal contributors
  • The PR Title
    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@coriolinus coriolinus requested a review from a team as a code owner February 21, 2025 11:38
Copy link

github-actions bot commented Feb 21, 2025

🐰 Bencher Report

Branchprgn/chore/rust-2024
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
Commit add f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
18.78
Commit add f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
6.87
Commit add f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
9.42
Commit add f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
11.70
Commit add f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
14.96
Commit add f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
19.41
Commit add f(number clients)/cs1/mem/1002📈 view plot
🚷 view threshold
983.75
Commit add f(number clients)/cs1/mem/2📈 view plot
🚷 view threshold
6.93
Commit add f(number clients)/cs1/mem/202📈 view plot
🚷 view threshold
84.83
Commit add f(number clients)/cs1/mem/402📈 view plot
🚷 view threshold
221.36
Commit add f(number clients)/cs1/mem/602📈 view plot
🚷 view threshold
428.54
Commit add f(number clients)/cs1/mem/802📈 view plot
🚷 view threshold
675.71
Commit pending proposals f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
117.00
Commit pending proposals f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
28.19
Commit pending proposals f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
45.66
Commit pending proposals f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
60.50
Commit pending proposals f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
78.91
Commit pending proposals f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
94.51
Commit pending proposals f(pending size)/cs1/mem/1📈 view plot
🚷 view threshold
18.36
Commit pending proposals f(pending size)/cs1/mem/101📈 view plot
🚷 view threshold
116.35
Commit pending proposals f(pending size)/cs1/mem/21📈 view plot
🚷 view threshold
35.12
Commit pending proposals f(pending size)/cs1/mem/41📈 view plot
🚷 view threshold
56.18
Commit pending proposals f(pending size)/cs1/mem/61📈 view plot
🚷 view threshold
74.71
Commit pending proposals f(pending size)/cs1/mem/81📈 view plot
🚷 view threshold
94.62
Commit remove f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
28.59
Commit remove f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
6.85
Commit remove f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
8.97
Commit remove f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
11.80
Commit remove f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
17.26
Commit remove f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
22.15
Commit remove f(number clients)/cs1/mem/1002📈 view plot
🚷 view threshold
30.25
Commit remove f(number clients)/cs1/mem/2📈 view plot
🚷 view threshold
136.54
Commit remove f(number clients)/cs1/mem/202📈 view plot
🚷 view threshold
114.61
Commit remove f(number clients)/cs1/mem/402📈 view plot
🚷 view threshold
93.16
Commit remove f(number clients)/cs1/mem/602📈 view plot
🚷 view threshold
71.67
Commit remove f(number clients)/cs1/mem/802📈 view plot
🚷 view threshold
51.35
Commit update f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
136.54
Commit update f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
6.97
Commit update f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
33.37
Commit update f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
59.18
Commit update f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
86.51
Commit update f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
111.54
🐰 View full continuous benchmarking report in Bencher

@codecov-commenter
Copy link

codecov-commenter commented Feb 21, 2025

Codecov Report

Attention: Patch coverage is 87.68328% with 42 lines in your changes missing coverage. Please review.

Project coverage is 78.14%. Comparing base (b8b370d) to head (7d656ef).

Files with missing lines Patch % Lines
crypto/src/proteus.rs 77.04% 14 Missing ⚠️
crypto-ffi/src/generic/mod.rs 0.00% 8 Missing ⚠️
crypto-macros/src/entity_derive/parse.rs 86.84% 5 Missing ⚠️
crypto/src/group_store.rs 33.33% 4 Missing ⚠️
crypto/src/test_utils/x509.rs 72.72% 3 Missing ⚠️
crypto/src/mls/external_proposal.rs 0.00% 2 Missing ⚠️
...src/entities/platform/generic/mls/pending_group.rs 88.88% 2 Missing ⚠️
crypto/src/mls/conversation/decrypt.rs 94.73% 1 Missing ⚠️
crypto/src/mls/conversation/mod.rs 66.66% 1 Missing ⚠️
crypto/src/test_utils/proteus_utils.rs 66.66% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #925      +/-   ##
==========================================
+ Coverage   78.13%   78.14%   +0.01%     
==========================================
  Files         112      112              
  Lines       20280    20318      +38     
==========================================
+ Hits        15845    15878      +33     
- Misses       4435     4440       +5     
Files with missing lines Coverage Δ
crypto-ffi/src/generic/context/e2ei.rs 0.00% <ø> (ø)
crypto-ffi/src/generic/context/mod.rs 0.00% <ø> (ø)
crypto-ffi/src/generic/context/proteus.rs 0.00% <ø> (ø)
crypto-macros/src/lib.rs 88.37% <ø> (ø)
crypto/src/context.rs 69.23% <ø> (ø)
crypto/src/e2e_identity/conversation_state.rs 79.26% <ø> (ø)
crypto/src/e2e_identity/crypto.rs 81.57% <ø> (ø)
crypto/src/e2e_identity/enabled.rs 87.03% <ø> (ø)
crypto/src/e2e_identity/error.rs 0.00% <ø> (ø)
crypto/src/e2e_identity/identity.rs 91.44% <100.00%> (ø)
... and 67 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8b370d...7d656ef. Read the comment docs.

column_name = Some(meta.input.parse::<syn::LitStr>()?.value());
}
"hex" => transformation = Some(IdTransformation::Hex),
_ => return Err(syn::Error::new_spanned(meta.path, "unknown argument")),
Copy link
Member

Choose a reason for hiding this comment

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

I assume this is the result of cargo fix -- is this really necessary in our particular case?

}
},
_ => {
return Err(eyre!("Cryptobox isn't initialized"));
Copy link
Member

Choose a reason for hiding this comment

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

I prefer the old code.

Copy link
Member

@istankovic istankovic left a comment

Choose a reason for hiding this comment

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

I think we should not let cargo fix auto-convert if let expressions into matches, unless there is a good for it (I'd be surprised).

Also I'm not sure why we're updating dependencies in this PR.

@coriolinus coriolinus force-pushed the prgn/chore/rust-2024 branch 2 times, most recently from 4d443db to 7d656ef Compare February 21, 2025 14:39
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.

3 participants