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

Simplify build of libvcx.so #575

Merged
merged 6 commits into from
Oct 6, 2022
Merged

Simplify build of libvcx.so #575

merged 6 commits into from
Oct 6, 2022

Conversation

left-arm
Copy link
Contributor

@left-arm left-arm commented Sep 19, 2022

Simplify the build of libvcx.

  • use an updated version of vdr-tools. This version changes only the build of the vdr-tools crates, and updates some dependencies. There are no code changes. Also removed any build scripts (build.rs) so vdr-tools doesn't define what and how it will link to. It defines its dependencies in Cargo.toml, nothing special here.
  • libvcx links vdr-tools as an ordinary dependency. One don't need to install libindy.so.
  • run of cargo build is enough to build libvcx.

@left-arm left-arm requested a review from a team as a code owner September 19, 2022 15:33
@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2022

Codecov Report

Merging #575 (6ad0dac) into main (78b3e42) will decrease coverage by 0.68%.
The diff coverage is n/a.

❗ Current head 6ad0dac differs from pull request most recent head 552e8ec. Consider uploading reports for the commit 552e8ec to get more accurate results

@@            Coverage Diff             @@
##             main     #575      +/-   ##
==========================================
- Coverage   59.78%   59.10%   -0.69%     
==========================================
  Files         139      198      +59     
  Lines       15620    19046    +3426     
  Branches     3627     4356     +729     
==========================================
+ Hits         9339    11257    +1918     
- Misses       2408     3458    +1050     
- Partials     3873     4331     +458     
Flag Coverage Δ
integration-aries-vcx 47.65% <ø> (-4.82%) ⬇️
unittests-agency-client 29.36% <ø> (+3.90%) ⬆️
unittests-aries-vcx 47.59% <ø> (-4.99%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aries_vcx/src/indy/primitives/mod.rs 42.62% <0.00%> (-5.91%) ⬇️
aries_vcx/tests/test_pool.rs 31.81% <0.00%> (-5.69%) ⬇️
...s_vcx/src/indy/proofs/verifier/verifier_libindy.rs 50.00% <0.00%> (-4.29%) ⬇️
aries_vcx/src/indy/anoncreds.rs 51.94% <0.00%> (-2.93%) ⬇️
aries_vcx/tests/test_connection.rs 45.98% <0.00%> (-1.68%) ⬇️
aries_vcx/src/indy/proofs/proof_request.rs 63.51% <0.00%> (-1.43%) ⬇️
aries_vcx/src/handlers/trust_ping/mod.rs 72.13% <0.00%> (-1.31%) ⬇️
aries_vcx/tests/test_creds_proofs.rs 61.60% <0.00%> (-1.04%) ⬇️
.../src/protocols/connection/invitee/state_machine.rs 66.28% <0.00%> (-0.94%) ⬇️
aries_vcx/tests/test_agency.rs 54.85% <0.00%> (-0.83%) ⬇️
... and 98 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@left-arm left-arm force-pushed the arm/static-libindy branch 3 times, most recently from 0f93d66 to 8603a48 Compare September 20, 2022 15:04
wrappers/ios/ci/build.sh Outdated Show resolved Hide resolved
@mirgee mirgee added ci dependencies Pull requests that update a dependency file labels Sep 23, 2022
@left-arm left-arm force-pushed the arm/static-libindy branch 15 times, most recently from dc76f20 to 526b127 Compare September 28, 2022 19:58
@left-arm left-arm force-pushed the arm/static-libindy branch 5 times, most recently from bdf2363 to 91a7245 Compare October 4, 2022 10:55
@left-arm left-arm requested a review from mirgee October 4, 2022 13:02
Patrik-Stas
Patrik-Stas previously approved these changes Oct 6, 2022
Copy link
Contributor

@Patrik-Stas Patrik-Stas left a comment

Choose a reason for hiding this comment

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

The PR is amazing cleanup, great job @left-arm 👍 I appreciate your patience working on this

Artem Mironov added 6 commits October 6, 2022 14:22
Vdr-tools linked as ordinary Rust crate and does not require any
additional installation steps.

Signed-off-by: Artem Mironov <artem.mironov@absa.africa>
Signed-off-by: Artem Mironov <artem.mironov@absa.africa>
Signed-off-by: Artem Mironov <artem.mironov@absa.africa>
Remove call of libindy::utils::logger::set_default_logger()
because it will eventially call

EnvLoggerBuilder::new()
  ...
  ...
  .try_init()

and try_init() initialize global variable inside create "log".

When libindy was linked dynamically, each libvcx.so and libindy.so
has a separate instance of that global variable, but with static
linking we got double initialization.

All calls vcx_set_default_logger() will fail.

Signed-off-by: Artem Mironov <artem.mironov@absa.africa>
Signed-off-by: Artem Mironov <artem.mironov@absa.africa>
Signed-off-by: Artem Mironov <artem.mironov@absa.africa>
@left-arm left-arm changed the title Statically link libvcx.so Simplify build of libvcx.so Oct 6, 2022
@mirgee mirgee merged commit ee5b905 into main Oct 6, 2022
@mirgee mirgee deleted the arm/static-libindy branch October 6, 2022 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants