You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celix.apache.org by "pnoltes (via GitHub)" <gi...@apache.org> on 2023/10/01 15:48:54 UTC

[PR] Feature/509 update cxx support to cxx14 (celix)

pnoltes opened a new pull request, #665:
URL: https://github.com/apache/celix/pull/665

   This PR removes the C++17 string_view support from the `utils` and `framework` libraries. 
   This is task in #509.
   
   The removal ensures easier C++ support, as the string_view integration required numerous `#ifdef` directives to guarantee API compatibility with C++14. It also mandated that we compile and run tests with both C++14 and C++17 flags.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Feature/509 update cxx support to cxx14 (celix)

Posted by "pnoltes (via GitHub)" <gi...@apache.org>.
pnoltes merged PR #665:
URL: https://github.com/apache/celix/pull/665


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Feature/509 update cxx support to cxx14 (celix)

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #665:
URL: https://github.com/apache/celix/pull/665#issuecomment-1742124588

   ## [Codecov](https://app.codecov.io/gh/apache/celix/pull/665?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#665](https://app.codecov.io/gh/apache/celix/pull/665?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (dc84bf9) into [master](https://app.codecov.io/gh/apache/celix/commit/fedbff5e60a11421cff239581e42bfdb0283d032?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (fedbff5) will **decrease** coverage by `1.23%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head dc84bf9 differs from pull request most recent head 7204f73. Consider uploading reports for the commit 7204f73 to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #665      +/-   ##
   ==========================================
   - Coverage   81.61%   80.39%   -1.23%     
   ==========================================
     Files         260      260              
     Lines       34677    34544     -133     
   ==========================================
   - Hits        28303    27770     -533     
   - Misses       6374     6774     +400     
   ```
   
   
   | [Files](https://app.codecov.io/gh/apache/celix/pull/665?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...es/rsa\_spi/include/celix/rsa/EndpointDescription.h](https://app.codecov.io/gh/apache/celix/pull/665?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-YnVuZGxlcy9jeHhfcmVtb3RlX3NlcnZpY2VzL3JzYV9zcGkvaW5jbHVkZS9jZWxpeC9yc2EvRW5kcG9pbnREZXNjcmlwdGlvbi5o) | `90.90% <ø> (ø)` | |
   | [libs/framework/include/celix/Bundle.h](https://app.codecov.io/gh/apache/celix/pull/665?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGlicy9mcmFtZXdvcmsvaW5jbHVkZS9jZWxpeC9CdW5kbGUuaA==) | `100.00% <ø> (ø)` | |
   | [libs/framework/include/celix/BundleContext.h](https://app.codecov.io/gh/apache/celix/pull/665?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGlicy9mcmFtZXdvcmsvaW5jbHVkZS9jZWxpeC9CdW5kbGVDb250ZXh0Lmg=) | `100.00% <ø> (ø)` | |
   | [libs/framework/include/celix/FrameworkUtils.h](https://app.codecov.io/gh/apache/celix/pull/665?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGlicy9mcmFtZXdvcmsvaW5jbHVkZS9jZWxpeC9GcmFtZXdvcmtVdGlscy5o) | `100.00% <ø> (ø)` | |
   | [libs/framework/include/celix/ServiceRegistration.h](https://app.codecov.io/gh/apache/celix/pull/665?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGlicy9mcmFtZXdvcmsvaW5jbHVkZS9jZWxpeC9TZXJ2aWNlUmVnaXN0cmF0aW9uLmg=) | `96.49% <ø> (-0.15%)` | :arrow_down: |
   | [...amework/include/celix/ServiceRegistrationBuilder.h](https://app.codecov.io/gh/apache/celix/pull/665?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGlicy9mcmFtZXdvcmsvaW5jbHVkZS9jZWxpeC9TZXJ2aWNlUmVnaXN0cmF0aW9uQnVpbGRlci5o) | `100.00% <ø> (ø)` | |
   | [libs/framework/include/celix/TrackerBuilders.h](https://app.codecov.io/gh/apache/celix/pull/665?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGlicy9mcmFtZXdvcmsvaW5jbHVkZS9jZWxpeC9UcmFja2VyQnVpbGRlcnMuaA==) | `100.00% <ø> (ø)` | |
   | [libs/framework/include/celix/Trackers.h](https://app.codecov.io/gh/apache/celix/pull/665?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGlicy9mcmFtZXdvcmsvaW5jbHVkZS9jZWxpeC9UcmFja2Vycy5o) | `91.24% <ø> (-0.76%)` | :arrow_down: |
   | [libs/framework/include/celix/UseServiceBuilder.h](https://app.codecov.io/gh/apache/celix/pull/665?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGlicy9mcmFtZXdvcmsvaW5jbHVkZS9jZWxpeC9Vc2VTZXJ2aWNlQnVpbGRlci5o) | `100.00% <ø> (ø)` | |
   | [libs/utils/include/celix/Filter.h](https://app.codecov.io/gh/apache/celix/pull/665?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGlicy91dGlscy9pbmNsdWRlL2NlbGl4L0ZpbHRlci5o) | `100.00% <ø> (ø)` | |
   | ... and [2 more](https://app.codecov.io/gh/apache/celix/pull/665?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | |
   
   ... and [6 files with indirect coverage changes](https://app.codecov.io/gh/apache/celix/pull/665/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Feature/509 update cxx support to cxx14 (celix)

Posted by "PengZheng (via GitHub)" <gi...@apache.org>.
PengZheng commented on code in PR #665:
URL: https://github.com/apache/celix/pull/665#discussion_r1348225256


##########
conanfile.py:
##########
@@ -47,8 +47,6 @@ class CelixConan(ConanFile):
         "enable_address_sanitizer": False,
         "enable_undefined_sanitizer": False,
         "enable_thread_sanitizer": False,
-        "enable_testing_dependency_manager_for_cxx11": False,

Review Comment:
   The `description` above should also be updated.



##########
libs/framework/gtest/CMakeLists.txt:
##########
@@ -15,8 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
-set(CMAKE_CXX_STANDARD 17)

Review Comment:
   But in `framework/CMakeLists.txt`:
   
   ```CMake
       if (ENABLE_TESTING AND CELIX_CXX17) #framework tests are C++17
           add_library(framework_cut STATIC ${FRAMEWORK_SRC})
   
   ```
   
   If `framework/gtest` is now C++14, then `framework/CMakeLists.txt` should be updated.



##########
libs/utils/gtest/CMakeLists.txt:
##########
@@ -38,10 +31,16 @@ add_executable(test_utils
         src/ThreadsTestSuite.cc
         src/CelixErrnoTestSuite.cc
         src/CelixUtilsAutoCleanupTestSuite.cc
-        ${CELIX_UTIL_TEST_SOURCES_FOR_CXX_HEADERS}
 )
 
-target_link_libraries(test_utils PRIVATE utils_cut Celix::utils GTest::gtest GTest::gtest_main libzip::zip)
+add_library(test_utils_cxx17tests STATIC
+        src/ArrayListTestSuite.cc #Uses constexpr
+        src/HashMapTestSuite.cc   #Uses constexpr
+)
+target_link_libraries(test_utils_cxx17tests PRIVATE utils_cut Celix::utils GTest::gtest GTest::gtest_main)
+target_compile_features(test_utils_cxx17tests PRIVATE cxx_std_17)

Review Comment:
   Should it be protected by `if (CELIX_CXX17)`?



##########
libs/utils/gtest/CMakeLists.txt:
##########
@@ -38,10 +31,16 @@ add_executable(test_utils
         src/ThreadsTestSuite.cc
         src/CelixErrnoTestSuite.cc
         src/CelixUtilsAutoCleanupTestSuite.cc
-        ${CELIX_UTIL_TEST_SOURCES_FOR_CXX_HEADERS}
 )
 
-target_link_libraries(test_utils PRIVATE utils_cut Celix::utils GTest::gtest GTest::gtest_main libzip::zip)
+add_library(test_utils_cxx17tests STATIC
+        src/ArrayListTestSuite.cc #Uses constexpr
+        src/HashMapTestSuite.cc   #Uses constexpr
+)
+target_link_libraries(test_utils_cxx17tests PRIVATE utils_cut Celix::utils GTest::gtest GTest::gtest_main)

Review Comment:
   Is `gtest_main` unnecessary for a static library?



##########
libs/utils/gtest/CMakeLists.txt:
##########
@@ -15,21 +15,14 @@
 # specific language governing permissions and limitations
 # under the License.
 
-set(CMAKE_CXX_STANDARD 17)

Review Comment:
   Does this mean that `test_utils` is now C++14? If so, `utils/CMakeLists.txt` should also be updated:
   
   ```CMake
           if (CELIX_CXX17) #utils tests are C++17
               add_subdirectory(gtest)
           endif()
   
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org