You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by sz...@apache.org on 2023/08/25 17:36:50 UTC

[nifi-minifi-cpp] branch main updated (76ee665c6 -> 9b55dc0c0)

This is an automated email from the ASF dual-hosted git repository.

szaszm pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git


    from 76ee665c6 MINIFICPP-2133 Add TLS 1.3 support
     new 218fd0b30 MINIFICPP-2189 Fixing gcc-13 compatibility in CI
     new 9b55dc0c0 MINIFICPP-1275 Remove deprecated ScopeGuard class

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/gcc13-compat.yml   | 14 +++++++++--
 libminifi/include/core/Core.h        | 13 +++++-----
 libminifi/include/utils/ScopeGuard.h | 48 ------------------------------------
 3 files changed, 18 insertions(+), 57 deletions(-)
 delete mode 100644 libminifi/include/utils/ScopeGuard.h


[nifi-minifi-cpp] 02/02: MINIFICPP-1275 Remove deprecated ScopeGuard class

Posted by sz...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 9b55dc0c0f17a190f3e9ade87070a28faf542c25
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Fri Aug 25 19:21:53 2023 +0200

    MINIFICPP-1275 Remove deprecated ScopeGuard class
    
    Closes #1639
    
    Signed-off-by: Marton Szasz <sz...@apache.org>
---
 libminifi/include/utils/ScopeGuard.h | 48 ------------------------------------
 1 file changed, 48 deletions(-)

diff --git a/libminifi/include/utils/ScopeGuard.h b/libminifi/include/utils/ScopeGuard.h
deleted file mode 100644
index a208adf9e..000000000
--- a/libminifi/include/utils/ScopeGuard.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * @file ScopeGuard.h
- * Exception class declaration
- *
- * 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 LIBMINIFI_INCLUDE_UTILS_SCOPEGUARD_H_
-#define LIBMINIFI_INCLUDE_UTILS_SCOPEGUARD_H_
-
-#include <utility>
-#include <functional>
-
-#include "utils/gsl.h"
-#include "core/Deprecated.h"
-
-namespace org {
-namespace apache {
-namespace nifi {
-namespace minifi {
-namespace utils {
-
-struct DEPRECATED(/*deprecated in*/ 0.8.0, /*will remove in */ 1.0) ScopeGuard : ::gsl::final_action<std::function<void()>> {
-  using ::gsl::final_action<std::function<void()>>::final_action;
-
-  void disable() noexcept {
-    dismiss();
-  }
-};
-
-}  // namespace utils
-}  // namespace minifi
-}  // namespace nifi
-}  // namespace apache
-}  // namespace org
-#endif  // LIBMINIFI_INCLUDE_UTILS_SCOPEGUARD_H_


[nifi-minifi-cpp] 01/02: MINIFICPP-2189 Fixing gcc-13 compatibility in CI

Posted by sz...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 218fd0b307dda513b94aaf8fba16a1b1044c45b0
Author: Martin Zink <ma...@apache.org>
AuthorDate: Fri Aug 25 19:20:55 2023 +0200

    MINIFICPP-2189 Fixing gcc-13 compatibility in CI
    
    Closes #1637
    
    Signed-off-by: Marton Szasz <sz...@apache.org>
---
 .github/workflows/gcc13-compat.yml | 14 ++++++++++++--
 libminifi/include/core/Core.h      | 13 ++++++-------
 2 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/gcc13-compat.yml b/.github/workflows/gcc13-compat.yml
index 0c56d2b00..7ea37a5f6 100644
--- a/.github/workflows/gcc13-compat.yml
+++ b/.github/workflows/gcc13-compat.yml
@@ -4,15 +4,25 @@ jobs:
   ubuntu_22_04:
     name: "ubuntu-22.04-gcc-13"
     runs-on: ubuntu-22.04
-    timeout-minutes: 120
+    timeout-minutes: 300
     steps:
+      - id: free_disk_space
+        run: |
+          # We can gain additional disk space on the Ubuntu runners thanks to these suggestions:
+          # https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
+          # https://github.com/actions/runner-images/issues/2606#issuecomment-772683150
+          sudo rm -rf /usr/share/dotnet
+          sudo rm -rf /usr/local/lib/android
+          sudo rm -rf /opt/ghc
+          sudo rm -rf "/usr/local/share/boost"
+          sudo rm -rf "$AGENT_TOOLSDIRECTORY"
       - id: checkout
         uses: actions/checkout@v3
       - id: install_deps
         run: |
           sudo add-apt-repository ppa:ubuntu-toolchain-r/test
           sudo apt update
-          sudo apt install -y ccache libfl-dev libpcap-dev libboost-all-dev openjdk-8-jdk maven libusb-1.0-0-dev libpng-dev libgps-dev libsqliteodbc lua5.3 liblua5.3-dev flake8 parallel gcc-13
+          sudo apt install -y ccache libfl-dev libpcap-dev libboost-all-dev openjdk-8-jdk maven libusb-1.0-0-dev libpng-dev libgps-dev libsqliteodbc lua5.3 liblua5.3-dev flake8 parallel gcc-13 g++-13
           echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
           echo -e "127.0.0.1\t$HOSTNAME" | sudo tee -a /etc/hosts > /dev/null
       - name: build
diff --git a/libminifi/include/core/Core.h b/libminifi/include/core/Core.h
index 3d96ec71a..5f48dac1d 100644
--- a/libminifi/include/core/Core.h
+++ b/libminifi/include/core/Core.h
@@ -71,11 +71,7 @@
 #include "properties/Configure.h"
 #include "utils/StringUtils.h"
 
-/**
- * namespace aliasing
- */
-namespace org::apache::nifi::minifi::core {
-
+#if defined(_MSC_VER)
 constexpr std::string_view removeStructOrClassPrefix(std::string_view input) {
   using namespace std::literals;
   for (auto prefix : { "struct "sv, "class "sv }) {
@@ -85,10 +81,11 @@ constexpr std::string_view removeStructOrClassPrefix(std::string_view input) {
   }
   return input;
 }
+#endif
 
 // based on https://bitwizeshift.github.io/posts/2021/03/09/getting-an-unmangled-type-name-at-compile-time/
 template<typename T>
-constexpr auto typeNameArray() {
+constexpr auto typeNameArray() {  // In root namespace to avoid gcc-13 optimizing out namespaces from __PRETTY_FUNCTION__
 #if defined(__clang__)
   constexpr auto prefix   = std::string_view{"[T = "};
   constexpr auto suffix   = std::string_view{"]"};
@@ -115,9 +112,11 @@ constexpr auto typeNameArray() {
   constexpr auto name = function.substr(start, end - start);
 #endif
 
-  return utils::string_view_to_array<name.length()>(name);
+  return org::apache::nifi::minifi::utils::string_view_to_array<name.length()>(name);
 }
 
+namespace org::apache::nifi::minifi::core {
+
 template<typename T>
 struct TypeNameHolder {
   static constexpr auto value = typeNameArray<T>();