-
Notifications
You must be signed in to change notification settings - Fork 83
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
Refactor/do not consume profile #872
Conversation
8f2f01e
to
a525a5b
Compare
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
a525a5b
to
1e13e27
Compare
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
1e13e27
to
81f1846
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, but IMO now would probably be the best time to update all "clones" of Arc<dyn Profile>
. As previously the code would call Arc::clone(&profile)
whenever it needed to inject ledger/anoncreds.
e.g. in holder/state_machine.rs
's _store_credential
:
let ledger = Arc::clone(profile).inject_anoncreds_ledger_read();
let anoncreds = Arc::clone(profile).inject_anoncreds();
can now just be:
let ledger = profile.inject_anoncreds_ledger_read();
let anoncreds = profile.inject_anoncreds();
Codecov Report
@@ Coverage Diff @@
## main #872 +/- ##
==========================================
+ Coverage 8.68% 46.04% +37.35%
==========================================
Files 410 432 +22
Lines 32812 34324 +1512
Branches 7211 7609 +398
==========================================
+ Hits 2849 15803 +12954
+ Misses 29162 13521 -15641
- Partials 801 5000 +4199
Flags with carried forward coverage won't be shown. Click here to find out more.
|
^ i think if you do a search for could also probably argue that the signature could/should be updated to e.g. :
this would have no downside, as if the consumer really does need an But up to you whether you want to include that in this PR |
@gmulhearn thanks for review and comments, however I'd like to suggest to push the suggested updates further down the road as this #873 is building on top of this PR and generally eliminate profiles from non-testing portion of aries-vcx codebase. Profiles will still exist post-#873 however, so we can apply your suggestion afterwards. Right now addressing your suggestion would require many changes which would be subsequently removed by 873. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
yea my bad, forgot about the profile removal work coming soon. approved! |
No description provided.