apache / celix

Apache Celix is a framework for C and C++14 to develop dynamic modular software applications using component and in-process service-oriented programming.
https://celix.apache.org/
Apache License 2.0
160 stars 85 forks source link

Feature/604 global initialization of curl #610

Closed PengZheng closed 11 months ago

PengZheng commented 11 months ago

This PR fixes #604 by making libcurl an optional dependency of Celix::framework and moving curl initialization to Celix::launcher. All containers which contain bundles needing libcurl have been updated to use Celix::launcher as launcher rather than the one generated by add_celix_container.

As noted in #604, the framework no long makes any essential use of libcurl. Thus libcurl deserves no special treatment. IMO, we should make it clear that any such global environment setup should be done in a custom launcher, for which Celix::launcher serves as an example. Moreover, libcurl is considered a heavyweight component for resource-constrained environments, and making it an optional dependency facilitates the use of Celix for such environments.

To maintain backward compatibility, Celix::framework still requires libcurl and does the curl initialization by default. This behavior is controlled by Conan option framework_curlinit.

codecov-commenter commented 11 months ago

Codecov Report

Merging #610 (8ae3123) into master (eb30eb5) will decrease coverage by 0.04%. The diff coverage is 100.00%.

:exclamation: Current head 8ae3123 differs from pull request most recent head 90cf85c. Consider uploading reports for the commit 90cf85c to get more accurate results

@@            Coverage Diff             @@
##           master     #610      +/-   ##
==========================================
- Coverage   79.74%   79.71%   -0.04%     
==========================================
  Files         258      259       +1     
  Lines       34675    34681       +6     
==========================================
- Hits        27652    27645       -7     
- Misses       7023     7036      +13     
Files Changed Coverage Δ
libs/framework/src/celix_launcher.c 92.35% <ø> (ø)
...s/remote_services/topology_manager/tms_tst/main.cc 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more