(celix) branch feature/509-remove-deprecated-version updated: #509 Remove dup version typedef
This is an automated email from the ASF dual-hosted git repository. pnoltes pushed a commit to branch feature/509-remove-deprecated-version in repository https://gitbox.apache.org/repos/asf/celix.git The following commit(s) were added to refs/heads/feature/509-remove-deprecated-version by this push: new a051b04b #509 Remove dup version typedef a051b04b is described below commit a051b04b12168618b5fb65910ea74f12796b7af8 Author: Pepijn Noltes AuthorDate: Thu Feb 8 22:55:44 2024 +0100 #509 Remove dup version typedef --- libs/utils/include/celix_version.h | 5 - 1 file changed, 5 deletions(-) diff --git a/libs/utils/include/celix_version.h b/libs/utils/include/celix_version.h index e711baaf..70c78e12 100644 --- a/libs/utils/include/celix_version.h +++ b/libs/utils/include/celix_version.h @@ -41,11 +41,6 @@ extern "C" { * Functions are provided for creating and destroying version objects, comparing versions, and extracting the individual version components. */ -/** - * @brief The definition of the celix_version_t* abstract data type. - */ -typedef struct celix_version celix_version_t; - /** * @brief Create a new celix_version_t* using the supplied arguments. *
(celix) branch feature/509-remove-deprecated-version updated: #509 Add version and version_range type header
This is an automated email from the ASF dual-hosted git repository. pnoltes pushed a commit to branch feature/509-remove-deprecated-version in repository https://gitbox.apache.org/repos/asf/celix.git The following commit(s) were added to refs/heads/feature/509-remove-deprecated-version by this push: new 65e032cb #509 Add version and version_range type header 65e032cb is described below commit 65e032cbd3ff7ff988f1a4c691dcc7297693039e Author: Pepijn Noltes AuthorDate: Thu Feb 8 19:37:13 2024 +0100 #509 Add version and version_range type header --- libs/utils/include/celix_version.h| 3 +- libs/utils/include/celix_version_range.h | 18 +--- libs/utils/include/celix_version_range_type.h | 42 +++ libs/utils/include/celix_version_type.h | 41 ++ 4 files changed, 92 insertions(+), 12 deletions(-) diff --git a/libs/utils/include/celix_version.h b/libs/utils/include/celix_version.h index 34e67c25..e711baaf 100644 --- a/libs/utils/include/celix_version.h +++ b/libs/utils/include/celix_version.h @@ -21,8 +21,9 @@ #define CELIX_CELIX_VERSION_H #include -#include +#include +#include "celix_version_type.h" #include "celix_cleanup.h" #include "celix_utils_export.h" diff --git a/libs/utils/include/celix_version_range.h b/libs/utils/include/celix_version_range.h index 977dc71c..cddfbc78 100644 --- a/libs/utils/include/celix_version_range.h +++ b/libs/utils/include/celix_version_range.h @@ -18,25 +18,21 @@ */ -#ifndef CELIX_VERSION_RANGE_H_ -#define CELIX_VERSION_RANGE_H_ +#ifndef CELIX_VERSION_RANGE_H +#define CELIX_VERSION_RANGE_H #include -#include "celix_cleanup.h" -#include "celix_errno.h" -#include "celix_version.h" +#include "celix_version_range_type.h" +#include "celix_version_type.h" #include "celix_utils_export.h" +#include "celix_errno.h" +#include "celix_cleanup.h" #ifdef __cplusplus extern "C" { #endif -/** - * Type definition for the celix_version_range_t abstract data type. - */ -typedef struct celix_version_range celix_version_range_t; - /** * Creates a new celix_version_range_t*. * @@ -146,4 +142,4 @@ CELIX_UTILS_EXPORT bool celix_versionRange_createLDAPFilterInPlace(const celix_v } #endif -#endif /* CELIX_VERSION_RANGE_H_ */ +#endif /* CELIX_VERSION_RANGE_H */ diff --git a/libs/utils/include/celix_version_range_type.h b/libs/utils/include/celix_version_range_type.h new file mode 100644 index ..a2dd7ec2 --- /dev/null +++ b/libs/utils/include/celix_version_range_type.h @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + +#ifndef CELIX_VERSION_RANGE_TYPE_H +#define CELIX_VERSION_RANGE_TYPE_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @file celix_version_range_type.h + * @brief Header file for celix_version_range_t opaque type. Can be used for forward declaration. + */ + +/** + * Type definition for the celix_version_range_t abstract data type. + */ +typedef struct celix_version_range celix_version_range_t; + +#ifdef __cplusplus +} +#endif + +#endif /* CELIX_VERSION_RANGE_TYPE_H */ diff --git a/libs/utils/include/celix_version_type.h b/libs/utils/include/celix_version_type.h new file mode 100644 index ..dff2151b --- /dev/null +++ b/libs/utils/include/celix_version_type.h @@ -0,0 +1,41 @@ +/** + *Licensed to the Apache Software Foundation (ASF) under one + *or more contributor license agreements. See the NOTICE file + *distributed with this work for additional information + *regarding copyright ownership. The ASF licenses this file + *to you under the Apache License, Version 2.0 (the + *"License"); you may not use this file except in compliance + *with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + *Unless required by applicable law or agreed to in writing, + *software distributed under the License is distributed on an + *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + *specific language governing permissions and limitations + *under the License. + */ + +#ifndef CELIX_CELIX_VERSION_TYPE_H +#define
(celix) 02/02: #509 Replace version with celix_version usage a dfi test
This is an automated email from the ASF dual-hosted git repository. pnoltes pushed a commit to branch feature/509-remove-deprecated-version in repository https://gitbox.apache.org/repos/asf/celix.git commit ce00d0dfb6e312f1fb72f3251ff191935508ee77 Author: Pepijn Noltes AuthorDate: Thu Feb 8 19:24:48 2024 +0100 #509 Replace version with celix_version usage a dfi test --- libs/dfi/gtest/src/dyn_message_tests.cpp | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/libs/dfi/gtest/src/dyn_message_tests.cpp b/libs/dfi/gtest/src/dyn_message_tests.cpp index 85e5578b..851320ef 100644 --- a/libs/dfi/gtest/src/dyn_message_tests.cpp +++ b/libs/dfi/gtest/src/dyn_message_tests.cpp @@ -19,8 +19,7 @@ #include "gtest/gtest.h" -#include -#include "version.h" +#include "celix_version.h" extern "C" { @@ -37,24 +36,21 @@ extern "C" { #include "celix_err.h" #include "celix_version.h" -static void checkMessageVersion(dyn_message_type* dynMsg, const char* v){ - int status = 0; +static void checkMessageVersion(dyn_message_type* dynMsg, const char* v) { +int status = 0; - const char* version = dynMessage_getVersionString(dynMsg); - ASSERT_STREQ(v, version); +const char* version = dynMessage_getVersionString(dynMsg); +ASSERT_STREQ(v, version); const celix_version_t* msgVersion = nullptr; -celix_version_t* localMsgVersion = nullptr; - int cmpVersion = -1; - version_createVersionFromString(version,); +celix_version_t* localMsgVersion = celix_version_createVersionFromString(version); +int cmpVersion = -1; msgVersion = dynMessage_getVersion(dynMsg); - ASSERT_EQ(0, status); +ASSERT_EQ(0, status); cmpVersion = celix_version_compareTo(msgVersion, localMsgVersion); - ASSERT_EQ(cmpVersion,0); - version_destroy(localMsgVersion); - +ASSERT_EQ(cmpVersion, 0); +celix_version_destroy(localMsgVersion); } - static void msg_test1(void) { int status = 0; dyn_message_type *dynMsg = NULL;
(celix) 01/02: Merge remote-tracking branch 'origin/master' into feature/509-remove-deprecated-version
This is an automated email from the ASF dual-hosted git repository. pnoltes pushed a commit to branch feature/509-remove-deprecated-version in repository https://gitbox.apache.org/repos/asf/celix.git commit 2ea4904f43aad6c896db8a92c9cebcdae768742c Merge: a727b468 70548d61 Author: Pepijn Noltes AuthorDate: Thu Feb 8 19:16:32 2024 +0100 Merge remote-tracking branch 'origin/master' into feature/509-remove-deprecated-version # Conflicts: # bundles/remote_services/remote_service_admin_dfi/src/import_registration_dfi.c # libs/dfi/gtest/src/dyn_interface_tests.cpp # libs/dfi/gtest/src/dyn_message_tests.cpp .github/workflows/coverage.yml | 6 +- .github/workflows/ubuntu.yml | 2 +- CMakeLists.txt | 5 +- .../src/export_registration_dfi.c | 8 +- .../src/import_registration_dfi.c | 58 +- .../gtest/src/RsaJsonRpcUnitTestSuite.cc | 33 - .../rsa_rpc_json/src/rsa_json_rpc_endpoint_impl.c | 9 +- .../rsa_rpc_json/src/rsa_json_rpc_impl.c | 1 + .../rsa_rpc_json/src/rsa_json_rpc_proxy_impl.c | 25 +- cmake/CelixDeps.cmake.in | 1 - cmake/celix_project/CodeCoverage.cmake | 4 +- conanfile.py | 3 + libs/dfi/CMakeLists.txt| 12 +- libs/dfi/error_injector/CMakeLists.txt | 3 +- libs/dfi/error_injector/dfi/CMakeLists.txt | 1 - libs/dfi/error_injector/dfi/include/dfi_ei.h | 2 - libs/dfi/error_injector/dfi/src/dfi_ei.cc | 7 - .../error_injector/ffi}/CMakeLists.txt | 16 +- .../{dfi/include/dfi_ei.h => ffi/include/ffi_ei.h} | 16 +- libs/dfi/error_injector/ffi/src/ffi_ei.cc | 44 + libs/dfi/gtest/CMakeLists.txt | 30 +- libs/dfi/gtest/descriptors/example6.descriptor | 6 +- libs/dfi/gtest/descriptors/example7.descriptor | 13 + .../gtest/descriptors/invalids/garbage.descriptor | 1 + .../invalids/invalidExtraSection.descriptor| 15 + .../invalidInterfaceAnnotations.descriptor | 13 + .../invalids/invalidMetaType.descriptor| 2 +- ...tor => invalidMethodMissingEquality.descriptor} | 2 +- ...=> invalidMethodMissingFunctionName.descriptor} | 2 +- ...escriptor => invalidMethodMissingId.descriptor} | 2 +- ...descriptor => invalidMsgMissingName.descriptor} | 3 +- ...criptor => invalidMsgMissingNewline.descriptor} | 4 +- .../invalids/invalidMsgMissingVersion.descriptor | 3 +- ...ersion.descriptor => invalidMsgType.descriptor} | 4 +- .../invalids/invalidTypeMissingEquality.descriptor | 10 + ...> invalidTypeUnrecognizedSimpleType.descriptor} | 4 +- .../invalids/methodMissingHandle.descriptor| 13 + ...riptor => methodWithMultipleHandles.descriptor} | 4 +- .../invalids/methodWithTooManyArgs.descriptor | 10 + .../invalids/methodWithoutArguments.descriptor | 13 + .../descriptors/invalids/multiOutArgs.descriptor | 1 - ...tArgs.descriptor => multiPreOutArgs.descriptor} | 1 - .../gtest/descriptors/invalids/noName.descriptor | 12 + .../gtest/descriptors/invalids/noType.descriptor | 12 + ...idMetaType.descriptor => noTypeName.descriptor} | 4 +- .../invalids/outArgAtWrongPosition.descriptor | 8 + libs/dfi/gtest/src/dyn_closure_tests.cpp | 14 - libs/dfi/gtest/src/dyn_common_ei_tests.cc | 84 ++ libs/dfi/gtest/src/dyn_common_tests.cc | 149 libs/dfi/gtest/src/dyn_example_functions.c | 4 + libs/dfi/gtest/src/dyn_example_functions.h | 2 + libs/dfi/gtest/src/dyn_function_ei_tests.cc| 112 +++ libs/dfi/gtest/src/dyn_function_tests.cpp | 184 ++-- libs/dfi/gtest/src/dyn_interface_ei_tests.cc | 101 +++ libs/dfi/gtest/src/dyn_interface_tests.cpp | 264 -- libs/dfi/gtest/src/dyn_message_ei_tests.cc | 45 + libs/dfi/gtest/src/dyn_message_tests.cpp | 92 +- libs/dfi/gtest/src/dyn_type_ei_tests.cc| 192 libs/dfi/gtest/src/dyn_type_tests.cpp | 338 ++- libs/dfi/gtest/src/json_rpc_ei_tests.cc| 189 libs/dfi/gtest/src/json_rpc_test.c | 67 ++ .../src/json_rpc_test.h} | 41 +- libs/dfi/gtest/src/json_rpc_tests.cpp | 719 +++ libs/dfi/gtest/src/json_serializer_ei_tests.cc | 172 libs/dfi/gtest/src/json_serializer_tests.cpp | 242 - libs/dfi/include/dfi_log_util.h| 78 -- libs/dfi/include/dyn_function.h| 54 +- libs/dfi/include/dyn_interface.h | 67 +- libs/dfi/include/dyn_message.h | 51 +- libs/dfi/include/dyn_type.h| 128 +-- libs/dfi/include/json_rpc.h| 10
(celix) branch feature/509-remove-deprecated-version updated (a727b468 -> ce00d0df)
This is an automated email from the ASF dual-hosted git repository. pnoltes pushed a change to branch feature/509-remove-deprecated-version in repository https://gitbox.apache.org/repos/asf/celix.git from a727b468 Fix incorrect ENOMEM return in rsa_dfi add 3e61888b Replace dfi_log_util.h by celix_err.h. add 452bfb36 Make gcov play nicely with Conan2. add ba397036 #509 Remove embedded memstream from utils. add ccbd7b09 Add error injection for dyn_interface. add ad1fa88e Remove unnecessary null check (guaranteed by class invariant). add cced65cf Code deduplication and coverage improvements for dyn_common. add 45bc7d2f Add more tests for dyn_common.c add 2a0314d7 Add const qualifier to dyn_interface.h and apply early return to dynInterface_parse. add e27d73af Add const qualifier, apply early return error handling patterns, and improve interface ergonomic to dyn_interface. add 9e9b14f5 Improve ergonomics of dynInterface_methods. add b6d5e395 Apply const qualifier to dyn_type and improve ergonomics for functions that cannot fail. add 20ef8891 Merge branch 'master' into feature/dfi-cleanup add 04692bce Add dynType_parseOfName to avoid unnecessary string duplication during parsing. add 7936dca6 Extract common functionality of dyn_interface and dyn_message into dyn_descriptor and improve ergonomics of dyn_message API. add b7354954 Avoid explicit function pointer conversion. add d0c1ede2 Extend dynType_parseWithStreamOfName for code deduplication, and remove tail recursion from dynType_findType. add 179a3bf8 Merge branch 'master' into feature/dfi-cleanup add 24228794 Refactor dynType_parseComplex to return early on error and handle error of missing the closing brace. add 53c5da76 Remove tail recursion in dynType_alloc and add more parsing tests. add 0e790759 Merge branch 'master' into feature/dfi-cleanup add 32be748a Merge branch 'master' into feature/dfi-cleanup add 9758b649 Merge branch 'master' into feature/dfi-cleanup add 90dd0c07 Merge branch 'master' into feature/dfi-cleanup add 78b7d2d8 Refactor dynType_sequence_alloc and dynType_sequence_reserve. add 84b45788 Refactor other dynType_sequence methods. add dfc647c0 Merge branch 'master' into feature/dfi-cleanup add e84ac213 Make double-reference work for dynType, and improve dynType_print robustness and coverage. add a6e22f76 Upgrade to conan 1.62. add 1ff4bc15 Skip typedefs for reference when printing a dynType. add 0bde38e5 Only Skip typedefs already printed when printing a dynType. add e3562a5f Apply const qualifier to dynFunction. add bfc57bdd Refactor dynFunction_parse and dynFunction_parseWithStr. add 1c370b1e Add more tests for dynFunction_parse. add 86a90957 Code cleanup and testing coverage improvement of dynFunction. add 4c2b4d41 Treat unknown complex member as error when parsing and refactor json deserialization. add 4c6d4dbd More tests for `jsonSerializer_parseAny`. add b61b6bd4 Fix unit test error in TEST_F(JsonSerializerErrorInjectionTestSuite, SerilizationError). add 8e38c03f Fix compilation error linux-build-apt CI. add 58589ade Fix compilation error linux-build-apt CI. add 3f039d3e Add option to control whether to install Find modules defined by Celix, and skip it in conan build. add f6a42e85 Remove unnecessary find_dependency from CelixDeps.cmake.in. add e1dd1b88 Improve dyn_type deserialization. add 86db9e4e Upgrade to conan 1.62. add 62b42f2a Remove unnecessary find_dependency from CelixDeps.cmake.in. add 5afee1eb Merge pull request #720 from apache/hotfix/ci-build add 88d43dd7 Merge branch 'master' into feature/dfi-cleanup add 927926c8 Remove unnecessary recursions caused by type reference by name. add 782325e6 Improve dyn_type serialization. add 7f1391d4 Add more serialization tests. add 6fffb96b Support nullptr when serialize text. add 1220311c Optimize dyn_function's arguments handling. add 74f1243d Avoid list iteration in dynInterface_nrOfMethods. add 6223856e Add dynType_realType for code deduplication. add ba398d32 Remove unnecessary calloc and fix crash caused by pointer reference in jsonRpc_call. add 797e9755 Add some type checking to dyn_function. add 86249373 Update codecov-action. add 9b4501d2 Update codecov-action. add 29fa7d0f Merge pull request #722 from apache/hotfix/codecov-fix add f8966015 Merge branch 'master' into feature/dfi-cleanup add e34eb00b #723 Add triviality test for dynType so that definitions of dfi argument types can be given. add 823c131b Fix compilation error. add aebe9750 Merge triviality test for dynType into parsing. add 28db6c37 Perform more strict checking on interface method. add 56abd7d5 Optimize jsonRpc_handleReply. add d833f70b Fix issue caused by reference