PengZheng [Thu, 7 Apr 2022 10:30:37 +0000 (18:30 +0800)]
Minor indentation adjustment.
PengZheng [Thu, 7 Apr 2022 10:25:58 +0000 (18:25 +0800)]
Unify conan autogenerated find modules with Celix's own find modules.
Pepijn Noltes [Wed, 6 Apr 2022 18:00:54 +0000 (20:00 +0200)]
Merge pull request #409 from apache/feature/rename_zmq_and_jansson_targets_to_align_with_conan
Feature/rename zmq and jansson targets to align with conan
PengZheng [Wed, 6 Apr 2022 07:03:10 +0000 (15:03 +0800)]
Merge pull request #410 from apache/feature/rsa_doc_improvement
Minor doxygen document improvement.
PengZheng [Wed, 6 Apr 2022 07:00:41 +0000 (15:00 +0800)]
Minor doxygen document improvement.
PengZheng [Wed, 6 Apr 2022 03:04:57 +0000 (11:04 +0800)]
Merge pull request #407 from xuzhenbao/fix_configurable_listening_ip
make the listening ip of RSA configurable
Pepijn Noltes [Tue, 5 Apr 2022 19:25:55 +0000 (21:25 +0200)]
Fixes some cmake config and re-enables C++ RSA tests
Pepijn Noltes [Mon, 4 Apr 2022 17:20:10 +0000 (19:20 +0200)]
Fixes some naming issues in the embedded Find<pkg>.cmake files.
Pepijn Noltes [Mon, 4 Apr 2022 16:58:51 +0000 (18:58 +0200)]
Updates FindJansson.cmake to a lower case package name.
Conan generates a Findjansson.cmake (lower case), so the embedded FindJansson.cmake is updated to align with this.
Pepijn Noltes [Mon, 4 Apr 2022 16:56:15 +0000 (18:56 +0200)]
Updates FindZMQ.cmake and FindCZMQ.cmake conform the versions generated by conan.
PengZheng [Mon, 4 Apr 2022 08:05:41 +0000 (16:05 +0800)]
Merge pull request #401 from apache/feature/conan_support
Add basic Conan support
PengZheng [Mon, 4 Apr 2022 06:57:13 +0000 (14:57 +0800)]
Add version to recipe, add executable linking workaround for test_package.
Pepijn Noltes [Sun, 3 Apr 2022 17:40:08 +0000 (19:40 +0200)]
Reverts version handling in conanfile, applies undefined linker setup for macos and fixes openssl version
Pepijn Noltes [Sun, 3 Apr 2022 12:09:53 +0000 (14:09 +0200)]
Updates wrong link target and update conan cmake configure if no version is found
Pepijn Noltes [Sun, 3 Apr 2022 11:56:31 +0000 (13:56 +0200)]
Updates conanfile.py and jansson linking for macos setup
PengZheng [Wed, 30 Mar 2022 12:51:52 +0000 (20:51 +0800)]
Add missing -ldl
xuzhenbao [Wed, 30 Mar 2022 12:19:44 +0000 (20:19 +0800)]
add option for binding to the RSA_IP
PengZheng [Mon, 28 Mar 2022 05:57:08 +0000 (13:57 +0800)]
Add code coverage support in conan, and eliminate gcc warnings when using cpputest with build-in memory leak detector.
PengZheng [Mon, 28 Mar 2022 05:07:35 +0000 (13:07 +0800)]
Revert "Remove comments."
This reverts commit
9198422dd2eee7ef402f844e45c9af268b10dfa3.
PengZheng [Mon, 28 Mar 2022 03:19:12 +0000 (11:19 +0800)]
Remove comments.
PengZheng [Mon, 28 Mar 2022 03:18:12 +0000 (11:18 +0800)]
Remove unnecessary -DCPPUTEST_MEM_LEAK_DETECTION_DISABLED, and fix conan zeromq override warning.
PengZheng [Sun, 27 Mar 2022 10:07:29 +0000 (18:07 +0800)]
Disable cpputest's build-in memory_leak_detection completely when ASAN is enabled.
PengZheng [Sun, 27 Mar 2022 09:58:59 +0000 (17:58 +0800)]
Make clang sanitizer work with cpputest.
PengZheng [Sun, 27 Mar 2022 09:22:36 +0000 (17:22 +0800)]
Make clang sanitizer work with cpputest.
PengZheng [Sat, 26 Mar 2022 14:14:42 +0000 (22:14 +0800)]
Add virtualrunenv generator to facilitate integration with CLion.
xuzhenbao [Sat, 26 Mar 2022 13:08:21 +0000 (21:08 +0800)]
Merge branch 'apache:master' into fix_configurable_listening_ip
xuzhenbao [Sat, 26 Mar 2022 10:44:43 +0000 (18:44 +0800)]
make the rsa listening ip configurable
PengZheng [Sat, 26 Mar 2022 06:43:19 +0000 (14:43 +0800)]
Following recommended approach of using FindThreads.
See https://cmake.org/cmake/help/v3.2/module/FindThreads.html
PengZheng [Fri, 25 Mar 2022 15:27:45 +0000 (23:27 +0800)]
Minor comment update.
PengZheng [Fri, 25 Mar 2022 10:59:45 +0000 (18:59 +0800)]
Add back workaround of transitive private shared library dependency issue.
See https://github.com/conan-io/conan/issues/7192 for details. virtualrunenv doesn't help for cross-compilation.
PengZheng [Fri, 25 Mar 2022 10:51:22 +0000 (18:51 +0800)]
Revert "Fix transitive private shared library dependency."
This reverts commit
08c590c2b0fa218642a660331529f0b48d42c552.
PengZheng [Fri, 25 Mar 2022 08:54:12 +0000 (16:54 +0800)]
Fix transitive private shared library dependency.
See https://github.com/conan-io/conan/issues/7192 for details.
PengZheng [Fri, 25 Mar 2022 07:48:29 +0000 (15:48 +0800)]
Merge pull request #404 from apache/hotfix/array_list_equality
Fix broken array list equality on some 32-bit platforms where sizeof(…
PengZheng [Thu, 24 Mar 2022 13:15:15 +0000 (21:15 +0800)]
Add missing DEPS.
PengZheng [Tue, 22 Mar 2022 13:05:21 +0000 (21:05 +0800)]
Use old version range syntax to increase compatibility.
PengZheng [Tue, 22 Mar 2022 12:51:30 +0000 (20:51 +0800)]
Merge branch 'hotfix/array_list_equality' into conan_support
PengZheng [Tue, 22 Mar 2022 12:33:46 +0000 (20:33 +0800)]
Fix add/remove bugs reintroduced by
6975a4e1.
PengZheng [Tue, 22 Mar 2022 12:04:59 +0000 (20:04 +0800)]
Merge branch 'master' into hotfix/array_list_equality
PengZheng [Tue, 22 Mar 2022 11:02:05 +0000 (19:02 +0800)]
Merge branch 'hotfix/array_list_equality' into conan_support
PengZheng [Tue, 22 Mar 2022 10:58:41 +0000 (18:58 +0800)]
Fix -Wunused-variable warnings.
PengZheng [Tue, 22 Mar 2022 10:54:29 +0000 (18:54 +0800)]
Fix broken array list equality on some 32-bit platforms where sizeof(double)==8.
Unnecessary memset calls are also removed. celix_arrayList_sort by design cannot be used with array of doubles, for which a warning is added.
PengZheng [Tue, 22 Mar 2022 04:43:03 +0000 (12:43 +0800)]
Make usage of conan in test_package completely non-intrusive, move test_package under examples, and add minimum documentation.
PengZheng [Tue, 22 Mar 2022 02:35:04 +0000 (10:35 +0800)]
Turn off experimental CXX RSA by default.
PengZheng [Tue, 22 Mar 2022 01:53:37 +0000 (09:53 +0800)]
Merge pull request #403 from apache/hotfix/psa_memory_leak
Fix memory leaks in psa, reported by CI.
PengZheng [Mon, 21 Mar 2022 14:43:51 +0000 (22:43 +0800)]
Adjust option order of test_package to be consistent with that of Celix, add test_package for RSA.
PengZheng [Mon, 21 Mar 2022 05:33:41 +0000 (13:33 +0800)]
Merge branch 'hotfix/psa_memory_leak' into conan_support
PengZheng [Mon, 21 Mar 2022 05:27:32 +0000 (13:27 +0800)]
Fix memory leaks in psa, reported by CI.
PengZheng [Mon, 21 Mar 2022 04:14:44 +0000 (12:14 +0800)]
Add test_package for remaining pubsub components.
PengZheng [Sun, 20 Mar 2022 13:58:44 +0000 (21:58 +0800)]
Add test_package for pubsub and cxx_shell, add missing requirement for rapidjson.
PengZheng [Sat, 19 Mar 2022 14:41:48 +0000 (22:41 +0800)]
Add build_all option, remove irrelevant packaging options, add workaround for CMake shared library private linking issue.
For the CMake private linking issue, see https://github.com/conan-io/conan/issues/7192
PengZheng [Sat, 19 Mar 2022 08:36:20 +0000 (16:36 +0800)]
Add test_package for pushstreams, fix compilation error, and make FindCppUTest.cmake compatible with the one generated by conan.
PengZheng [Fri, 18 Mar 2022 14:07:48 +0000 (22:07 +0800)]
Add missing find_dependency in CelixConfig.cmake, and add test_package for etcdlib, launcher, and promises.
PengZheng [Fri, 18 Mar 2022 01:44:59 +0000 (09:44 +0800)]
Merge pull request #402 from apache/hotfix/framework_shutdown_deadlock
Fix a first-check-then-do race condition during framework shutdown.
PengZheng [Thu, 17 Mar 2022 14:53:34 +0000 (22:53 +0800)]
Add test_package for shell-related bundles, and remove irrelevant options from conan package ID calculation.
PengZheng [Thu, 17 Mar 2022 04:59:13 +0000 (12:59 +0800)]
Merge branch 'hotfix/framework_shutdown_deadlock' into conan_support
PengZheng [Thu, 17 Mar 2022 04:49:45 +0000 (12:49 +0800)]
Fix a first-check-then-do race condition during framework shutdown.
PengZheng [Thu, 17 Mar 2022 04:22:26 +0000 (12:22 +0800)]
Add test_package for syslog_writer.
PengZheng [Thu, 17 Mar 2022 02:23:41 +0000 (10:23 +0800)]
Fix incorrect order of cmake.definitions and cmake.configure, avoid intrusive usage of conan in CMakeLists.txt.
PengZheng [Wed, 16 Mar 2022 14:29:07 +0000 (22:29 +0800)]
Add test_package for the framework, http_admin and log_admin.
PengZheng [Wed, 16 Mar 2022 03:10:39 +0000 (11:10 +0800)]
Add missing license.
PengZheng [Tue, 15 Mar 2022 04:55:18 +0000 (12:55 +0800)]
Improve the modular structure of cmake project, update conanfile accordingly.
Replace the broken automatic dependency deduction in celix_subproject with automatic error detection. Use celix_subproject systematically to reflect the current modular structure, and thus allowing more to be opted out. Essential and non-essential usages are carefully differentiated: e.g., PUBSUB_PSA_WS uses HTTP_ADMIN essentially, while all bundles use log_helper non-essentially. Now it's possible to turn off all bundles.
Minor cmake style improvements, including: replacing add_dependencies with add_celix_bundle_dependencies; use ${CMAKE_INSTALL_INCLUDEDIR} instead of fixed `include`; replacing $<INSTALL_INTERFACE:> with INCLUDES DESTINATION.
conanfile.py is also updated according to the current project structure. The default options reflect a reasonably minimal and functionally stable configuration: framework without etcd, log_admin, http_admin, pubsub_pas_ws with no need of external discovery mechanism, rsa with preconfigured discovery.
PengZheng [Fri, 11 Mar 2022 14:51:15 +0000 (22:51 +0800)]
Fix bonjour shell compilation failure.
PengZheng [Wed, 9 Mar 2022 14:47:13 +0000 (22:47 +0800)]
Package modules improvements.
Avoid redefining libzip::libzip and support Jansson target for etcdlib.
PengZheng [Tue, 8 Mar 2022 10:08:59 +0000 (18:08 +0800)]
Add missing options and loosen libzip requirement.
PengZheng [Tue, 8 Mar 2022 03:17:46 +0000 (11:17 +0800)]
Fix misuse of find_package and find_dependency in CelixConfig.cmake.
Use find_dependency without REQUIRED to handle find_package(Celix) correctly (i.e., use Celix as an optional package).
PengZheng [Fri, 4 Mar 2022 13:56:20 +0000 (21:56 +0800)]
Use CelixConfig.cmake instead of conan's own mechanism, and add missing dependency.
PengZheng [Fri, 4 Mar 2022 04:51:03 +0000 (12:51 +0800)]
Add initial conan support.
There are still some rough edges in CMake in-project dependency management.
PengZheng [Fri, 4 Mar 2022 02:58:52 +0000 (10:58 +0800)]
Revert "cxx_remote_service_admin as a separate subproject."
This reverts commit
58a2f881d8f76647e8349ecb24f7c8dd55165ce1.
PengZheng [Thu, 3 Mar 2022 15:11:11 +0000 (23:11 +0800)]
Merge branch 'master' into conan_support
PengZheng [Thu, 3 Mar 2022 15:04:20 +0000 (23:04 +0800)]
Merge pull request #399 from PengZheng/tracker-improvements
Service tracker improvements
PengZheng [Tue, 1 Mar 2022 12:04:47 +0000 (20:04 +0800)]
Merge branch 'master' into conan_support
PengZheng [Tue, 1 Mar 2022 10:03:56 +0000 (18:03 +0800)]
Minor code comment cleanup.
PengZheng [Tue, 1 Mar 2022 08:28:32 +0000 (16:28 +0800)]
Using service directly does not support SOD by default.
To request such support, the caller has to explicitly set CELIX_SERVICE_USE_SOD flags. Other code review issues are also addressed.
PengZheng [Tue, 1 Mar 2022 04:48:38 +0000 (12:48 +0800)]
Merge branch 'master' into tracker-improvements
PengZheng [Tue, 1 Mar 2022 04:44:12 +0000 (12:44 +0800)]
cxx_remote_service_admin as a separate subproject.
It used GPLv3ed zmq by default, which cannot be included in most proprietary softwares deployed in embedded device.
Pepijn Noltes [Mon, 28 Feb 2022 20:54:32 +0000 (21:54 +0100)]
Merge pull request #400 from xuzhenbao/rs_error_code_fix
Improved error codes for remote services
PengZheng [Sat, 26 Feb 2022 03:14:14 +0000 (11:14 +0800)]
Use reference counting to protect against concurrently unregistering the same serviceId multiple times.
Reference counting together with atomic compare-and-swap make celix_serviceRegistry_unregisterService MT-safe.
xuzhenbao [Fri, 25 Feb 2022 12:27:28 +0000 (20:27 +0800)]
rename CELIX_FACILITY_NULL to CELIX_FACILITY_FRAMEWORK
PengZheng [Fri, 25 Feb 2022 12:08:48 +0000 (20:08 +0800)]
Use flags instead of bool to accommodate future API extension.
PengZheng [Thu, 24 Feb 2022 09:05:33 +0000 (17:05 +0800)]
Performance improvements for celix_bundleContext_useService(s)WithOptions.
Remove unnecessary celix_framework_waitForEmptyEventQueue from the indirect call path, while replace it with more efficient celix_framework_waitUntilNoPendingRegistration for the direct call path. Added framework->dispatcher.stats can also be used for diagnostic purpose.
PengZheng [Thu, 24 Feb 2022 06:38:48 +0000 (14:38 +0800)]
Service tracker performance optimization and bug fix.
Add options to allow call use callback directly from the caller thread instead of delegating to the Celix event loop. The default behaviour is kept to avoid introducing various ABBA deadlocks into existing bundles. A race condition, which leads to resource leak, is also fixed.
xuzhenbao [Wed, 23 Feb 2022 14:18:23 +0000 (22:18 +0800)]
Convert jsonRpc Error to Celix default error
PengZheng [Wed, 23 Feb 2022 13:37:25 +0000 (21:37 +0800)]
Further service tracker performance optimization preliminary.
celix_bundleContext_useService(s)WithOptions invoke service in the main event loop, which means any blocking service is blocking the whole world. Also, usleep(10) polling is expensive if high-resolution timer is enabled on Linux. This commit add support out of loop service calling to inner tracker implementation without modify current API behaviour.
PengZheng [Wed, 23 Feb 2022 12:55:38 +0000 (20:55 +0800)]
Revert "Service tracker performance optimization."
This reverts commit
11c1ca1eda59c78e5bd3499973c91793fbeabcab.
xuzhenbao [Wed, 23 Feb 2022 07:23:30 +0000 (15:23 +0800)]
change celix_errno.h according to code review
PengZheng [Tue, 22 Feb 2022 13:27:28 +0000 (21:27 +0800)]
Service tracker performance optimization.
Previously celix_bundleContext_useService(s)WithOptions invoke service in the main event loop, which means any blocking service is blocking the whole world. Also, usleep(10) polling is expensive if high-resolution timer is enabled on Linux. This commit fixes both of them.
PengZheng [Tue, 22 Feb 2022 06:59:41 +0000 (14:59 +0800)]
Merge remote-tracking branch 'origin/tracker-improvements' into tracker-improvements
PengZheng [Tue, 22 Feb 2022 06:53:16 +0000 (14:53 +0800)]
fix thread-safety bug introduced by
691dc6cb and broken tracker set callback.
One intent of
691dc6cb is to make bundleContext_retainServiceReference and bundleContext_retainServiceReference lockless. Unfortunately it introduced a race condition: if a dying reference (still in registry) get revived by another call of bundleContext_getServiceReferences before it's actually removed from the registry and destroyed, hazard happens.
The set callback of an all-service tracker, whose service name is empty, did not work as expected by CelixBundleContextServicesTests.TrackerOfAllServicesSetTest. Unnecessary set callbacks when closing trackers are eliminated.
PengZheng [Tue, 22 Feb 2022 06:53:16 +0000 (14:53 +0800)]
fix thread-safety bug introduced by
691dc6cb and broken tracker set callback.
One intent of
691dc6cb is to make bundleContext_retainServiceReference and bundleContext_retainServiceReference lockless. Unfortunately it introduced a race condition: if a dying reference (still in registry) get revived by another call of bundleContext_getServiceReferences before it's actually removed from the registry and destroyed, hazard happens.
The set callback of an all-service tracker, whose service name is empty, did not work as expected by CelixBundleContextServicesTests.TrackerOfAllServicesSetTest. Unnecessary set callbacks are eliminated.
xuzhenbao [Mon, 21 Feb 2022 08:54:44 +0000 (16:54 +0800)]
remove redundant code
xuzhenbao [Mon, 21 Feb 2022 06:30:10 +0000 (14:30 +0800)]
resloved conflict
xuzhenbao [Mon, 21 Feb 2022 06:18:22 +0000 (14:18 +0800)]
fix memory leak for interceptor callback return false
PengZheng [Sun, 20 Feb 2022 10:42:59 +0000 (18:42 +0800)]
Eliminate unnecessary locking and fix race condition when unregistering.
There is no need of locking when accessing read-only fields of serviceRegistration and serviceReference. Also a first-check-then-do race condition in serviceRegistration_unregister is fixed using atomic compare-and-swap.
PengZheng [Sat, 19 Feb 2022 13:57:05 +0000 (21:57 +0800)]
Simplify serviceReference implementation by making the embedded registration always accessible during its lifetime.
xuzhenbao [Thu, 17 Feb 2022 07:59:07 +0000 (15:59 +0800)]
service proxy handle interceptor exception
xuzhenbao [Thu, 17 Feb 2022 04:25:04 +0000 (12:25 +0800)]
record CELIX_START_USERERR deprecated
xuzhenbao [Thu, 17 Feb 2022 04:02:56 +0000 (12:02 +0800)]
Modify error code comments format
xuzhenbao [Wed, 16 Feb 2022 15:12:00 +0000 (23:12 +0800)]
resolve pull conflicts
xuzhenbao [Wed, 16 Feb 2022 15:12:00 +0000 (23:12 +0800)]
fix pull conflicts
xuzhenbao [Wed, 16 Feb 2022 14:59:32 +0000 (22:59 +0800)]
Get the invocation error of remote service function in client