You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by fg...@apache.org on 2025/08/22 18:22:55 UTC
(nifi-minifi-cpp) branch main updated (c1565bdce -> 0ed0524e7)
This is an automated email from the ASF dual-hosted git repository.
fgerlits pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
from c1565bdce MINIFICPP-2597 Replace removed thirdparty actions (part 2)
new f85ebaa75 MINIFICPP-2567 C++23 Support
new 5eda82dc1 MINIFICPP-2563 Add build option for enabling link time optimization
new 97087b22e MINIFICPP-2601 Separate protobuf library from grpc
new 0ed0524e7 MINIFICPP-2608 Refresh outdated linter cmake target
The 4 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:
.clang-tidy | 57 +-
.dockerignore | 2 +
.github/workflows/ci.yml | 60 +-
.github/workflows/compiler-support.yml | 51 ++
.github/workflows/verify-package.yml | 1 +
CMakeLists.txt | 50 +-
CONTRIBUTING.md | 3 -
LICENSE | 2 +-
README.md | 5 +-
bootstrap.sh | 7 +
bootstrap/system_dependency.py | 2 +-
bstrp_functions.sh | 11 +-
cmake/Abseil.cmake | 1 +
cmake/ArgParse.cmake | 1 +
cmake/Asio.cmake | 5 +-
cmake/AzureSdkCpp.cmake | 4 +-
cmake/BundledAwsSdkCpp.cmake | 4 +-
cmake/BundledOpen62541.cmake | 3 +-
cmake/BundledOpenCV.cmake | 6 +
cmake/BundledRocksDB.cmake | 17 +-
cmake/Bustache.cmake | 7 +-
cmake/Catch2.cmake | 5 +-
cmake/CivetWeb.cmake | 1 +
cmake/Couchbase.cmake | 9 +-
cmake/{Couchbase.cmake => Couchbase_1_0_2.cmake} | 4 +-
cmake/CppVersion.cmake | 19 +-
cmake/Crc32c.cmake | 1 +
cmake/Date.cmake | 2 +
cmake/ExpectedLite.cmake | 8 +-
cmake/Extensions.cmake | 8 -
cmake/FetchBenchmark.cmake | 1 +
cmake/FetchUvc.cmake | 1 +
cmake/Fetchlibrdkafka.cmake | 1 +
cmake/{GetFmt.cmake => GetFmt_11_0_2.cmake} | 8 +-
cmake/GetSpdlog.cmake | 9 +-
cmake/GoogleCloudCpp.cmake | 12 +-
cmake/Grpc.cmake | 18 +-
cmake/GslLite.cmake | 1 +
cmake/JoltTests.cmake | 1 +
cmake/JsonSchemaValidator.cmake | 3 +-
cmake/KubernetesClientC.cmake | 3 +
cmake/LZ4.cmake | 1 +
cmake/LibLZMA.cmake | 3 +-
cmake/LlamaCpp.cmake | 10 +-
cmake/Lua.cmake | 1 +
cmake/MagicEnum.cmake | 3 +-
cmake/MiMalloc.cmake | 1 +
cmake/MiNiFiOptions.cmake | 1 +
cmake/PahoMqttC.cmake | 15 +-
cmake/Prometheus.cmake | 1 +
cmake/Protobuf.cmake | 37 ++
cmake/RangeV3.cmake | 7 +
cmake/RpMalloc.cmake | 1 +
cmake/Sol2.cmake | 36 +-
cmake/Spdlog.cmake | 7 +-
cmake/Zstd.cmake | 1 +
cmake/fmt.cmake | 5 +-
cmake/{fmt.cmake => fmt_11_0_2.cmake} | 1 +
core-framework/include/utils/expected.h | 29 +-
core-framework/include/utils/net/AsioCoro.h | 4 +-
core-framework/include/utils/net/AsioSocketUtils.h | 2 +-
core-framework/src/utils/net/DNS.cpp | 7 +-
docker/centos/Dockerfile | 67 ---
docker/compiler-test/clang.Dockerfile | 22 +
docker/compiler-test/gcc.Dockerfile | 18 +
extension-framework/include/ResourceClaim.h | 2 +-
.../include/controllers/SSLContextService.h | 2 +-
.../controllers/SSLContextServiceInterface.h | 2 +-
extension-framework/include/core/StateManager.h | 3 +-
extension-framework/include/core/StateStorage.h | 6 +-
.../include/utils/ProcessorConfigUtils.h | 51 +-
extensions/aws/CMakeLists.txt | 2 -
extensions/azure/CMakeLists.txt | 2 -
extensions/bustache/CMakeLists.txt | 1 -
extensions/civetweb/CMakeLists.txt | 1 -
extensions/couchbase/CMakeLists.txt | 8 +-
extensions/elasticsearch/CMakeLists.txt | 1 -
extensions/execute-process/CMakeLists.txt | 1 -
extensions/expression-language/CMakeLists.txt | 2 +-
.../tests/ProcessContextExprTests.cpp | 38 +-
extensions/gcp/CMakeLists.txt | 4 +-
extensions/gcp/tests/CMakeLists.txt | 8 +-
extensions/grafana-loki/CMakeLists.txt | 2 -
extensions/kafka/CMakeLists.txt | 1 -
extensions/kubernetes/CMakeLists.txt | 1 -
extensions/libarchive/CMakeLists.txt | 1 -
extensions/llamacpp/CMakeLists.txt | 1 -
extensions/lua/CMakeLists.txt | 1 -
extensions/mqtt/CMakeLists.txt | 1 -
extensions/opc/CMakeLists.txt | 1 -
extensions/opencv/CMakeLists.txt | 1 -
extensions/pdh/CMakeLists.txt | 1 -
extensions/procfs/CMakeLists.txt | 1 -
extensions/prometheus/CMakeLists.txt | 1 -
extensions/python/CMakeLists.txt | 1 -
extensions/rocksdb-repos/CMakeLists.txt | 1 -
.../rocksdb-repos/database/RocksDatabase.cpp | 17 +-
extensions/rocksdb-repos/database/RocksDatabase.h | 2 -
.../rocksdb-repos/database/RocksDbInstance.cpp | 5 +-
.../rocksdb-repos/database/RocksDbInstance.h | 2 +-
extensions/script/CMakeLists.txt | 1 -
extensions/sftp/CMakeLists.txt | 1 -
extensions/smb/CMakeLists.txt | 1 -
extensions/splunk/CMakeLists.txt | 1 -
extensions/sql/CMakeLists.txt | 3 +-
extensions/sql/processors/ExecuteSQL.cpp | 3 +-
extensions/standard-processors/CMakeLists.txt | 1 -
.../controllers/JsonRecordSetWriter.cpp | 10 +-
.../controllers/JsonTreeReader.cpp | 2 +-
.../standard-processors/modbus/ByteConverters.h | 1 +
.../tests/unit/ManifestTests.cpp | 6 +-
.../standard-processors/tests/unit/PutTCPTests.cpp | 2 +-
.../tests/unit/RecordSetTests.cpp | 16 +-
extensions/systemd/CMakeLists.txt | 1 -
extensions/test-processors/CMakeLists.txt | 1 -
extensions/windows-event-log/CMakeLists.txt | 1 -
libminifi/src/agent/agent_docs.cpp | 9 +-
libminifi/src/core/RecordField.cpp | 6 +-
.../src/core/flow/StructuredConfiguration.cpp | 6 +-
libminifi/test/libtest/unit/TestRecord.h | 12 +-
libminifi/test/unit/ExpectedTest.cpp | 26 +-
libminifi/test/unit/NetUtilsTest.cpp | 30 +-
minifi-api/include/minifi-cpp/core/RecordField.h | 26 +-
minifi-api/include/minifi-cpp/utils/Literals.h | 22 +-
run_clang_tidy.sh | 2 +-
.../fix-deprecated-literal-operator.patch | 31 +
.../include-cinttypes-for-uint8_t-gcc15-fix.patch | 24 +
.../bustache/fix-deprecated-literal-operator.patch | 19 +
thirdparty/couchbase/c++23_fixes.patch | 78 +++
...rdparty.patch => remove-thirdparty-1.0.2.patch} | 0
thirdparty/couchbase/remove-thirdparty.patch | 123 +++-
thirdparty/google-cloud-cpp/c++23_fixes.patch | 19 +
thirdparty/grpc/fix-constants-on-windows.patch | 35 --
thirdparty/grpc/fix-protobuf-find-package.patch | 22 +
...e-custom-commands-for-unused-dependencies.patch | 428 --------------
.../GCC-15-needs-typedef-SQLRETURN-HPROC.patch | 25 +
thirdparty/llamacpp/cpp-23-fixes.patch | 24 +
thirdparty/opencv/c++23_fixes.patch | 23 +
.../1576-Changed-bool-typedef-to-bit.patch | 96 +++
thirdparty/ranges-v3/remove-deprecated.patch | 27 +
thirdparty/rocksdb/all/patches/arm7.patch | 15 -
thirdparty/rocksdb/all/patches/c++23_fixes.patch | 641 +++++++++++++++++++++
thirdparty/rocksdb/all/patches/cstdint.patch | 12 -
143 files changed, 1747 insertions(+), 954 deletions(-)
create mode 100644 .github/workflows/compiler-support.yml
copy cmake/{Couchbase.cmake => Couchbase_1_0_2.cmake} (97%)
copy cmake/{GetFmt.cmake => GetFmt_11_0_2.cmake} (86%)
create mode 100644 cmake/Protobuf.cmake
copy cmake/{fmt.cmake => fmt_11_0_2.cmake} (98%)
delete mode 100644 docker/centos/Dockerfile
create mode 100644 docker/compiler-test/clang.Dockerfile
create mode 100644 docker/compiler-test/gcc.Dockerfile
create mode 100644 thirdparty/aws-sdk-cpp/fix-deprecated-literal-operator.patch
create mode 100644 thirdparty/azure-sdk-cpp/include-cinttypes-for-uint8_t-gcc15-fix.patch
create mode 100644 thirdparty/bustache/fix-deprecated-literal-operator.patch
create mode 100644 thirdparty/couchbase/c++23_fixes.patch
copy thirdparty/couchbase/{remove-thirdparty.patch => remove-thirdparty-1.0.2.patch} (100%)
create mode 100644 thirdparty/google-cloud-cpp/c++23_fixes.patch
delete mode 100644 thirdparty/grpc/fix-constants-on-windows.patch
create mode 100644 thirdparty/grpc/fix-protobuf-find-package.patch
delete mode 100644 thirdparty/grpc/remove-custom-commands-for-unused-dependencies.patch
create mode 100644 thirdparty/iODBC/GCC-15-needs-typedef-SQLRETURN-HPROC.patch
create mode 100644 thirdparty/llamacpp/cpp-23-fixes.patch
create mode 100644 thirdparty/opencv/c++23_fixes.patch
create mode 100644 thirdparty/paho-mqtt/1576-Changed-bool-typedef-to-bit.patch
create mode 100644 thirdparty/ranges-v3/remove-deprecated.patch
delete mode 100644 thirdparty/rocksdb/all/patches/arm7.patch
create mode 100644 thirdparty/rocksdb/all/patches/c++23_fixes.patch
delete mode 100644 thirdparty/rocksdb/all/patches/cstdint.patch
(nifi-minifi-cpp) 01/04: MINIFICPP-2567 C++23 Support
Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
fgerlits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit f85ebaa75e0ec51ea9c23ca8e7bbe45e85a6a4b1
Author: Martin Zink <ma...@apache.org>
AuthorDate: Wed May 21 13:31:04 2025 +0200
MINIFICPP-2567 C++23 Support
Signed-off-by: Ferenc Gerlits <fg...@gmail.com>
Closes #1968
---
.clang-tidy | 57 +-
.dockerignore | 2 +
.github/workflows/ci.yml | 18 +-
.github/workflows/compiler-support.yml | 51 ++
.github/workflows/verify-package.yml | 1 +
CMakeLists.txt | 10 +-
README.md | 5 +-
bootstrap/system_dependency.py | 2 +-
cmake/Abseil.cmake | 1 +
cmake/ArgParse.cmake | 1 +
cmake/Asio.cmake | 5 +-
cmake/AzureSdkCpp.cmake | 4 +-
cmake/BundledAwsSdkCpp.cmake | 4 +-
cmake/BundledOpen62541.cmake | 3 +-
cmake/BundledOpenCV.cmake | 6 +
cmake/BundledRocksDB.cmake | 17 +-
cmake/Bustache.cmake | 7 +-
cmake/Catch2.cmake | 5 +-
cmake/CivetWeb.cmake | 1 +
cmake/Couchbase.cmake | 9 +-
cmake/{Couchbase.cmake => Couchbase_1_0_2.cmake} | 4 +-
cmake/CppVersion.cmake | 19 +-
cmake/Crc32c.cmake | 1 +
cmake/Date.cmake | 2 +
cmake/ExpectedLite.cmake | 8 +-
cmake/FetchBenchmark.cmake | 1 +
cmake/FetchUvc.cmake | 1 +
cmake/Fetchlibrdkafka.cmake | 1 +
cmake/{ExpectedLite.cmake => GetFmt_11_0_2.cmake} | 16 +-
cmake/GetSpdlog.cmake | 9 +-
cmake/GoogleCloudCpp.cmake | 12 +-
cmake/Grpc.cmake | 1 +
cmake/GslLite.cmake | 1 +
cmake/JoltTests.cmake | 1 +
cmake/JsonSchemaValidator.cmake | 3 +-
cmake/KubernetesClientC.cmake | 3 +
cmake/LZ4.cmake | 1 +
cmake/LibLZMA.cmake | 3 +-
cmake/LlamaCpp.cmake | 10 +-
cmake/Lua.cmake | 1 +
cmake/MagicEnum.cmake | 3 +-
cmake/MiMalloc.cmake | 1 +
cmake/PahoMqttC.cmake | 15 +-
cmake/Prometheus.cmake | 1 +
cmake/RangeV3.cmake | 7 +
cmake/RpMalloc.cmake | 1 +
cmake/Sol2.cmake | 36 +-
cmake/Spdlog.cmake | 7 +-
cmake/Zstd.cmake | 1 +
cmake/fmt.cmake | 5 +-
cmake/{fmt.cmake => fmt_11_0_2.cmake} | 1 +
core-framework/include/utils/expected.h | 29 +-
core-framework/include/utils/net/AsioCoro.h | 4 +-
core-framework/include/utils/net/AsioSocketUtils.h | 2 +-
core-framework/src/utils/net/DNS.cpp | 7 +-
docker/centos/Dockerfile | 67 ---
docker/compiler-test/clang.Dockerfile | 22 +
docker/compiler-test/gcc.Dockerfile | 18 +
extensions/couchbase/CMakeLists.txt | 7 +-
extensions/expression-language/CMakeLists.txt | 1 +
extensions/gcp/CMakeLists.txt | 3 +
extensions/gcp/tests/CMakeLists.txt | 8 +-
extensions/sql/CMakeLists.txt | 2 +
extensions/sql/processors/ExecuteSQL.cpp | 3 +-
.../controllers/JsonRecordSetWriter.cpp | 10 +-
.../controllers/JsonTreeReader.cpp | 2 +-
.../standard-processors/modbus/ByteConverters.h | 1 +
.../standard-processors/tests/unit/PutTCPTests.cpp | 2 +-
.../tests/unit/RecordSetTests.cpp | 16 +-
libminifi/src/core/RecordField.cpp | 6 +-
.../src/core/flow/StructuredConfiguration.cpp | 6 +-
libminifi/test/libtest/unit/TestRecord.h | 12 +-
libminifi/test/unit/ExpectedTest.cpp | 26 +-
libminifi/test/unit/NetUtilsTest.cpp | 30 +-
minifi-api/include/minifi-cpp/core/RecordField.h | 26 +-
minifi-api/include/minifi-cpp/utils/Literals.h | 22 +-
run_clang_tidy.sh | 2 +-
.../fix-deprecated-literal-operator.patch | 31 +
.../include-cinttypes-for-uint8_t-gcc15-fix.patch | 24 +
.../bustache/fix-deprecated-literal-operator.patch | 19 +
thirdparty/couchbase/c++23_fixes.patch | 78 +++
...rdparty.patch => remove-thirdparty-1.0.2.patch} | 0
thirdparty/couchbase/remove-thirdparty.patch | 123 +++-
thirdparty/google-cloud-cpp/c++23_fixes.patch | 19 +
.../GCC-15-needs-typedef-SQLRETURN-HPROC.patch | 25 +
thirdparty/llamacpp/cpp-23-fixes.patch | 24 +
thirdparty/opencv/c++23_fixes.patch | 23 +
.../1576-Changed-bool-typedef-to-bit.patch | 96 +++
thirdparty/ranges-v3/remove-deprecated.patch | 27 +
thirdparty/rocksdb/all/patches/arm7.patch | 15 -
thirdparty/rocksdb/all/patches/c++23_fixes.patch | 641 +++++++++++++++++++++
thirdparty/rocksdb/all/patches/cstdint.patch | 12 -
92 files changed, 1549 insertions(+), 327 deletions(-)
diff --git a/.clang-tidy b/.clang-tidy
index de57fee56..f3d287289 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -202,5 +202,60 @@ Checks: >
google-readability-todo,
google-runtime-int,
google-runtime-operator,
- google-upgrade-googletest-case
+ google-upgrade-googletest-case,
+ bugprone-capturing-this-in-member-variable,
+ bugprone-casting-through-void,
+ bugprone-compare-pointer-to-member-virtual-function,
+ bugprone-crtp-constructor-accessibility,
+ bugprone-inc-dec-in-conditions,
+ bugprone-incorrect-enable-if,
+ bugprone-incorrect-enable-shared-from-this,
+ bugprone-misleading-setter-of-reference,
+ bugprone-multi-level-implicit-pointer-conversion,
+ bugprone-multiple-new-in-one-expression,
+ bugprone-narrowing-conversions,
+ bugprone-non-zero-enum-to-bool-conversion,
+ bugprone-nondeterministic-pointer-iteration-order,
+ bugprone-optional-value-conversion,
+ bugprone-pointer-arithmetic-on-polymorphic-object,
+ bugprone-return-const-ref-from-parameter,
+ bugprone-suspicious-stringview-data-usage,
+ bugprone-switch-missing-default-case,
+ bugprone-tagged-union-member-count,
+ bugprone-unintended-char-ostream-output,
+ bugprone-unique-ptr-array-mismatch,
+ bugprone-unsafe-functions,
+ bugprone-unused-local-non-trivial-variable,
+ cppcoreguidelines-avoid-capturing-lambda-coroutines,
+ cppcoreguidelines-misleading-capture-default-by-value,
+ cppcoreguidelines-missing-std-forward,
+ cppcoreguidelines-no-suspend-with-lock,
+ cppcoreguidelines-use-enum-class,
+ hicpp-ignored-remove-result,
+ misc-coroutine-hostile-raii,
+ misc-header-include-cycle,
+ modernize-min-max-use-initializer-list,
+ modernize-type-traits,
+ modernize-use-constraints,
+ modernize-use-integer-sign-comparison,
+ modernize-use-scoped-lock,
+ modernize-use-starts-ends-with,
+ modernize-use-std-format,
+ modernize-use-std-numbers,
+ modernize-use-std-print,
+ performance-noexcept-destructor,
+ performance-noexcept-swap,
+ portability-avoid-pragma-once,
+ portability-template-virtual-member-function,
+ readability-ambiguous-smartptr-reset-call,
+ readability-avoid-nested-conditional-operator,
+ readability-avoid-return-with-void-value,
+ readability-avoid-unconditional-preprocessor-if,
+ readability-enum-initial-value,
+ readability-math-missing-parentheses,
+ readability-operators-representation,
+ readability-redundant-casting,
+ readability-redundant-inline-specifier,
+ readability-reference-to-constructed-temporary,
+ readability-use-std-min-max
FormatStyle: 'file'
diff --git a/.dockerignore b/.dockerignore
index ab5c47d28..6a80bd238 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -64,3 +64,5 @@ libminifi/src/agent/agent_version.cpp
**/cmake_install.cmake
**/install_manifest.txt
**/CTestTestfile.cmake
+bootstrap/venv
+bootstrap/option_state.json
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 188577166..c7bfa1785 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -285,10 +285,10 @@ jobs:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy main" | sudo tee -a /etc/apt/sources.list
- echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" | sudo tee -a /etc/apt/sources.list
- echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" | sudo tee -a /etc/apt/sources.list
+ echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-20 main" | sudo tee -a /etc/apt/sources.list
+ echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-20 main" | sudo tee -a /etc/apt/sources.list
sudo apt update
- sudo apt install -y ccache libfl-dev clang-16 clang-tidy-16 libc++-16-dev libc++abi-16-dev libc++1-16 libc++abi1-16 libunwind-16 libsqliteodbc parallel
+ sudo apt install -y ccache libfl-dev clang-20 clang-tidy-20 libc++-20-dev libc++abi-20-dev libsqliteodbc parallel
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
echo -e "127.0.0.1\t$HOSTNAME" | sudo tee -a /etc/hosts > /dev/null
- id: free_disk_space
@@ -303,8 +303,8 @@ jobs:
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: build
run: |
- export CC=clang-16
- export CXX=clang++-16
+ export CC=clang-20
+ export CXX=clang++-20
export CXXFLAGS="-stdlib=libc++"
export LDFLAGS="-stdlib=libc++"
python3 -m venv venv && source venv/bin/activate \
@@ -344,10 +344,10 @@ jobs:
- name: clang-tidy
run: |
# https://stackoverflow.com/questions/58466701/clang-tidy-cant-locate-stdlib-headers
- sed -i -e 's/\/usr\/lib\/ccache\/clang++-16/\/lib\/llvm-16\/bin\/clang++/g' build/compile_commands.json
- sed -i -e 's/\/usr\/lib\/ccache\/clang-16/\/lib\/llvm-16\/bin\/clang/g' build/compile_commands.json
- sed -i -e 's/\/usr\/lib\/ccache\/c++/\/lib\/llvm-16\/bin\/clang++/g' build/compile_commands.json
- sed -i -e 's/\/usr\/lib\/ccache\/cc/\/lib\/llvm-16\/bin\/clang/g' build/compile_commands.json
+ sed -i -e 's/\/usr\/lib\/ccache\/clang++-20/\/lib\/llvm-20\/bin\/clang++/g' build/compile_commands.json
+ sed -i -e 's/\/usr\/lib\/ccache\/clang-20/\/lib\/llvm-20\/bin\/clang/g' build/compile_commands.json
+ sed -i -e 's/\/usr\/lib\/ccache\/c++/\/lib\/llvm-20\/bin\/clang++/g' build/compile_commands.json
+ sed -i -e 's/\/usr\/lib\/ccache\/cc/\/lib\/llvm-20\/bin\/clang/g' build/compile_commands.json
parallel -j$(( $(nproc) + 1 )) ./run_clang_tidy.sh ::: ${{steps.list-changed-cpp-files.outputs.files}}
- name: check-cores
diff --git a/.github/workflows/compiler-support.yml b/.github/workflows/compiler-support.yml
new file mode 100644
index 000000000..8179737df
--- /dev/null
+++ b/.github/workflows/compiler-support.yml
@@ -0,0 +1,51 @@
+# .github/workflows/compiler-support.yml
+
+name: 'Check supported Compilers'
+
+on: [workflow_dispatch]
+
+jobs:
+ gcc-build:
+ name: ${{ matrix.platform.id }}
+
+ strategy:
+ fail-fast: false
+ matrix:
+ platform: [ { id: gcc-12, base_image: gcc:12-bookworm },
+ { id: gcc-15, base_image: gcc:15-bookworm } ]
+ runs-on: ubuntu-24.04
+
+ steps:
+ - name: 'Checkout repository code'
+ uses: actions/checkout@v4
+
+ - name: 'Build Project with ${{ matrix.platform.id }}'
+ run: |
+ docker build \
+ --build-arg BASE_IMAGE=${{ matrix.platform.base_image }} \
+ -t minifi-${{ matrix.platform.id }} \
+ -f docker/compiler-test/gcc.Dockerfile \
+ .
+
+ clang-build:
+ name: ${{ matrix.platform.id }}
+
+ strategy:
+ fail-fast: false
+ matrix:
+ platform: [ { id: clang-16, base_image: silkeh/clang:16-bookworm },
+ { id: clang-20, base_image: silkeh/clang:20-bookworm } ]
+
+ runs-on: ubuntu-24.04
+
+ steps:
+ - name: 'Checkout repository code'
+ uses: actions/checkout@v4
+
+ - name: 'Build Project with ${{ matrix.platform.id }}'
+ run: |
+ docker build \
+ --build-arg BASE_IMAGE=${{ matrix.platform.base_image }} \
+ -t minifi-${{ matrix.platform.id }} \
+ -f docker/compiler-test/clang.Dockerfile \
+ .
diff --git a/.github/workflows/verify-package.yml b/.github/workflows/verify-package.yml
index b4c1b76eb..20f769820 100644
--- a/.github/workflows/verify-package.yml
+++ b/.github/workflows/verify-package.yml
@@ -17,6 +17,7 @@ env:
jobs:
build-packages:
+ if: (github.event_name == 'schedule' && github.repository == 'apache/nifi-minifi-cpp') || (github.event_name != 'schedule')
name: "Build package (${{ matrix.platform.arch }})"
runs-on: ${{ matrix.platform.arch == 'x86_64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }}
timeout-minutes: 180
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7748ac0e5..fae0cc88c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -315,10 +315,16 @@ else()
list(APPEND MINIFI_CPP_COMPILE_OPTIONS -Wall -Wextra)
if(MINIFI_FAIL_ON_WARNINGS)
list(APPEND MINIFI_CPP_COMPILE_OPTIONS -Werror)
- # -Wrestrict may cause build failure in GCC 12 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104336
- if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ endif()
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.4)
+ # -Wrestrict may cause build failure in < GCC 12.4 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104336
list(APPEND MINIFI_CPP_COMPILE_OPTIONS -Wno-error=restrict)
endif()
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15)
+ list(APPEND MINIFI_CPP_COMPILE_OPTIONS -Wno-maybe-uninitialized)
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118634
+ endif()
endif()
endif()
diff --git a/README.md b/README.md
index 5e7102866..160d2fd61 100644
--- a/README.md
+++ b/README.md
@@ -113,7 +113,10 @@ The next table outlines CMAKE flags that correspond with MiNiFi extensions. Exte
#### Utilities
* CMake 3.24 or greater
-* gcc 11 or greater
+* Compiler
+ * g++ 12 or greater
+ * clang 16 or greater
+ * msvc 19.33 or greater
* bison 3.0.x+ (3.2 has been shown to fail builds)
* flex 2.6 or greater
diff --git a/bootstrap/system_dependency.py b/bootstrap/system_dependency.py
index 02050b579..2a3b39386 100644
--- a/bootstrap/system_dependency.py
+++ b/bootstrap/system_dependency.py
@@ -23,7 +23,7 @@ import platform
def _create_system_dependencies(minifi_options: MinifiOptions) -> Dict[str, Set[str]]:
- system_dependencies = {'patch': {'patch'}, 'make': {'make'}, 'perl': {'perl'}}
+ system_dependencies = {'patch': {'patch'}, 'make': {'make'}, 'perl': {'perl'}, 'git': {'git'}}
if minifi_options.is_enabled("ENABLE_EXPRESSION_LANGUAGE"):
system_dependencies['bison'] = {'bison'}
system_dependencies['flex'] = {'flex'}
diff --git a/cmake/Abseil.cmake b/cmake/Abseil.cmake
index cfa4a8b1b..9ed541e3a 100644
--- a/cmake/Abseil.cmake
+++ b/cmake/Abseil.cmake
@@ -32,5 +32,6 @@ FetchContent_Declare(
URL_HASH SHA256=f50e5ac311a81382da7fa75b97310e4b9006474f9560ac46f54a9967f07d4ae3
PATCH_COMMAND "${PC}"
OVERRIDE_FIND_PACKAGE
+ SYSTEM
)
FetchContent_MakeAvailable(absl)
diff --git a/cmake/ArgParse.cmake b/cmake/ArgParse.cmake
index 29251ceb9..6af3bdbe1 100644
--- a/cmake/ArgParse.cmake
+++ b/cmake/ArgParse.cmake
@@ -20,5 +20,6 @@ FetchContent_Declare(
argparse
URL https://github.com/p-ranav/argparse/archive/refs/tags/v3.0.tar.gz
URL_HASH SHA256=ba7b465759bb01069d57302855eaf4d1f7d677f21ad7b0b00b92939645c30f47
+ SYSTEM
)
FetchContent_MakeAvailable(argparse)
diff --git a/cmake/Asio.cmake b/cmake/Asio.cmake
index 6f94e6afe..4c351dc8b 100644
--- a/cmake/Asio.cmake
+++ b/cmake/Asio.cmake
@@ -18,8 +18,9 @@
include(FetchContent)
FetchContent_Declare(asio
- URL https://github.com/chriskohlhoff/asio/archive/refs/tags/asio-1-28-1.tar.gz
- URL_HASH SHA256=5ff6111ec8cbe73a168d997c547f562713aa7bd004c5c02326f0e9d579a5f2ce)
+ URL https://github.com/chriskohlhoff/asio/archive/refs/tags/asio-1-34-2.tar.gz
+ URL_HASH SHA256=f3bac015305fbb700545bd2959fbc52d75a1ec2e05f9c7f695801273ceb78cf5
+ SYSTEM)
FetchContent_GetProperties(asio)
if(NOT asio_POPULATED)
diff --git a/cmake/AzureSdkCpp.cmake b/cmake/AzureSdkCpp.cmake
index bafad992b..375785abe 100644
--- a/cmake/AzureSdkCpp.cmake
+++ b/cmake/AzureSdkCpp.cmake
@@ -39,11 +39,13 @@ set(DISABLE_AMQP ON CACHE INTERNAL "")
set(PATCH_FILE_1 "${CMAKE_SOURCE_DIR}/thirdparty/azure-sdk-cpp/wil.patch")
set(PATCH_FILE_2 "${CMAKE_SOURCE_DIR}/thirdparty/azure-sdk-cpp/fix-openssl-helper.patch")
set(PATCH_FILE_3 "${CMAKE_SOURCE_DIR}/thirdparty/azure-sdk-cpp/fix-managed-identity.patch")
+set(PATCH_FILE_4 "${CMAKE_SOURCE_DIR}/thirdparty/azure-sdk-cpp/include-cinttypes-for-uint8_t-gcc15-fix.patch")
set(PC ${Bash_EXECUTABLE} -c "set -x &&\
(\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_1}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_1}\\\") &&\
(\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_2}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_2}\\\") &&\
- (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_3}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_3}\\\")")
+ (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_3}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_3}\\\") &&\
+ (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_4}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_4}\\\")")
FetchContent_Declare(asdkext
URL https://github.com/Azure/azure-sdk-for-cpp/archive/refs/tags/azure-identity_1.13.0.tar.gz
diff --git a/cmake/BundledAwsSdkCpp.cmake b/cmake/BundledAwsSdkCpp.cmake
index 672f73d7b..818c4cb19 100644
--- a/cmake/BundledAwsSdkCpp.cmake
+++ b/cmake/BundledAwsSdkCpp.cmake
@@ -20,11 +20,13 @@ function(use_bundled_libaws SOURCE_DIR BINARY_DIR)
set(PATCH_FILE2 "${SOURCE_DIR}/thirdparty/aws-sdk-cpp/shutdown-fix.patch")
set(PATCH_FILE3 "${SOURCE_DIR}/thirdparty/aws-sdk-cpp/bundle-openssl.patch")
set(PATCH_FILE4 "${SOURCE_DIR}/thirdparty/aws-sdk-cpp/fix-finding-s2n.patch")
+ set(PATCH_FILE5 "${SOURCE_DIR}/thirdparty/aws-sdk-cpp/fix-deprecated-literal-operator.patch")
set(AWS_SDK_CPP_PATCH_COMMAND ${Bash_EXECUTABLE} -c "set -x &&\
(\"${Patch_EXECUTABLE}\" -p1 -R -s -f --dry-run -i \"${PATCH_FILE1}\" || \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE1}\") &&\
(\"${Patch_EXECUTABLE}\" -p1 -R -s -f --dry-run -i \"${PATCH_FILE2}\" || \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE2}\") &&\
(\"${Patch_EXECUTABLE}\" -p1 -R -s -f --dry-run -i \"${PATCH_FILE3}\" || \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE3}\") &&\
- (\"${Patch_EXECUTABLE}\" -p1 -R -s -f --dry-run -i \"${PATCH_FILE4}\" || \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE4}\") ")
+ (\"${Patch_EXECUTABLE}\" -p1 -R -s -f --dry-run -i \"${PATCH_FILE4}\" || \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE4}\") &&\
+ (\"${Patch_EXECUTABLE}\" -p1 -R -s -f --dry-run -i \"${PATCH_FILE5}\" || \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE5}\") ")
if (WIN32)
set(LIBDIR "lib")
diff --git a/cmake/BundledOpen62541.cmake b/cmake/BundledOpen62541.cmake
index 9a48490aa..0565a7a9d 100644
--- a/cmake/BundledOpen62541.cmake
+++ b/cmake/BundledOpen62541.cmake
@@ -36,7 +36,8 @@ function(use_bundled_open62541 SOURCE_DIR BINARY_DIR)
"-DCMAKE_INSTALL_PREFIX=${OPEN62541_BYPRODUCT_DIR}"
-DOPEN62541_VERSION=v1.3.3
-DUA_ENABLE_ENCRYPTION=ON
- -DUA_FORCE_WERROR=OFF)
+ -DUA_FORCE_WERROR=OFF
+ -DUA_ENABLE_DEBUG_SANITIZER=OFF)
append_third_party_passthrough_args(OPEN62541_CMAKE_ARGS "${OPEN62541_CMAKE_ARGS}")
diff --git a/cmake/BundledOpenCV.cmake b/cmake/BundledOpenCV.cmake
index c53294e51..95384208b 100644
--- a/cmake/BundledOpenCV.cmake
+++ b/cmake/BundledOpenCV.cmake
@@ -102,12 +102,18 @@ function(use_bundled_opencv SOURCE_DIR BINARY_DIR)
append_third_party_passthrough_args(OPENCV_CMAKE_ARGS "${OPENCV_CMAKE_ARGS}")
+ set(PATCH_FILE_1 "${SOURCE_DIR}/thirdparty/opencv/c++23_fixes.patch")
+ set(PC ${Bash_EXECUTABLE} -c "set -x &&\
+ (\"${Patch_EXECUTABLE}\" -p1 -R -s -f --dry-run -i \"${PATCH_FILE_1}\" || \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE_1}\")")
+
+
# Build project
ExternalProject_Add(
opencv-external
URL "https://github.com/opencv/opencv/archive/refs/tags/4.7.0.tar.gz"
URL_HASH "SHA256=8df0079cdbe179748a18d44731af62a245a45ebf5085223dc03133954c662973"
SOURCE_DIR "${BINARY_DIR}/thirdparty/opencv-src"
+ PATCH_COMMAND ${PC}
CMAKE_ARGS ${OPENCV_CMAKE_ARGS}
BUILD_BYPRODUCTS "${BYPRODUCTS}"
EXCLUDE_FROM_ALL TRUE
diff --git a/cmake/BundledRocksDB.cmake b/cmake/BundledRocksDB.cmake
index 85a28304a..9d1f4644c 100644
--- a/cmake/BundledRocksDB.cmake
+++ b/cmake/BundledRocksDB.cmake
@@ -23,16 +23,15 @@ function(use_bundled_rocksdb SOURCE_DIR BINARY_DIR)
include(LZ4)
endif()
- # Patch to fix build issue on ARM7 architecture: https://github.com/facebook/rocksdb/issues/8609#issuecomment-1009572506
- set(PATCH_FILE_1 "${SOURCE_DIR}/thirdparty/rocksdb/all/patches/arm7.patch")
- set(PATCH_FILE_2 "${SOURCE_DIR}/thirdparty/rocksdb/all/patches/dboptions_equality_operator.patch")
- set(PATCH_FILE_3 "${SOURCE_DIR}/thirdparty/rocksdb/all/patches/cstdint.patch")
+ set(PATCH_FILE_1 "${SOURCE_DIR}/thirdparty/rocksdb/all/patches/dboptions_equality_operator.patch")
+ set(PATCH_FILE_2 "${SOURCE_DIR}/thirdparty/rocksdb/all/patches/c++23_fixes.patch")
+
set(PC ${Bash_EXECUTABLE} -c "set -x &&\
(\"${Patch_EXECUTABLE}\" -p1 -R -s -f --dry-run -i \"${PATCH_FILE_1}\" || \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE_1}\") &&\
- (\"${Patch_EXECUTABLE}\" -p1 -R -s -f --dry-run -i \"${PATCH_FILE_2}\" || \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE_2}\") &&\
- (\"${Patch_EXECUTABLE}\" -p1 -R -s -f --dry-run -i \"${PATCH_FILE_3}\" || \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE_3}\") ")
+ (\"${Patch_EXECUTABLE}\" -p1 -R -s -f --dry-run -i \"${PATCH_FILE_2}\" || \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE_2}\") ")
+
- # Define byproducts
+# Define byproducts
if (WIN32)
set(BYPRODUCT "lib/rocksdb.lib")
else()
@@ -72,8 +71,8 @@ function(use_bundled_rocksdb SOURCE_DIR BINARY_DIR)
# Build project
ExternalProject_Add(
rocksdb-external
- URL "https://github.com/facebook/rocksdb/archive/refs/tags/v8.10.2.tar.gz"
- URL_HASH "SHA256=44b6ec2f4723a0d495762da245d4a59d38704e0d9d3d31c45af4014bee853256"
+ URL "https://github.com/facebook/rocksdb/archive/refs/tags/v10.2.1.tar.gz"
+ URL_HASH "SHA256=d1ddfd3551e649f7e2d180d5a6a006d90cfde56dcfe1e548c58d95b7f1c87049"
SOURCE_DIR "${BINARY_DIR}/thirdparty/rocksdb-src"
CMAKE_ARGS ${ROCKSDB_CMAKE_ARGS}
PATCH_COMMAND ${PC}
diff --git a/cmake/Bustache.cmake b/cmake/Bustache.cmake
index e3d104cda..a881a90be 100644
--- a/cmake/Bustache.cmake
+++ b/cmake/Bustache.cmake
@@ -22,14 +22,17 @@ get_fmt()
set(BUSTACHE_USE_FMT ON CACHE STRING "" FORCE)
-set(PATCH_FILE "${CMAKE_SOURCE_DIR}/thirdparty/bustache/add-append.patch")
+set(PATCH_FILE_1 "${CMAKE_SOURCE_DIR}/thirdparty/bustache/add-append.patch")
+set(PATCH_FILE_2 "${CMAKE_SOURCE_DIR}/thirdparty/bustache/fix-deprecated-literal-operator.patch")
set(PC ${Bash_EXECUTABLE} -c "set -x &&\
- (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE}\\\")")
+ (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_1}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_1}\\\") &&\
+ (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_2}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_2}\\\")")
FetchContent_Declare(Bustache
GIT_REPOSITORY https://github.com/jamboree/bustache.git
GIT_TAG 47096caa8e1f9f7ebe34e3a022dbb822c174011d
PATCH_COMMAND "${PC}"
+ SYSTEM
)
FetchContent_MakeAvailable(Bustache)
diff --git a/cmake/Catch2.cmake b/cmake/Catch2.cmake
index d4c257af2..2986f0487 100644
--- a/cmake/Catch2.cmake
+++ b/cmake/Catch2.cmake
@@ -20,7 +20,8 @@ include(FetchContent)
FetchContent_Declare(
Catch2
- URL https://github.com/catchorg/Catch2/archive/refs/tags/v3.4.0.tar.gz
- URL_HASH SHA256=122928b814b75717316c71af69bd2b43387643ba076a6ec16e7882bfb2dfacbb
+ URL https://github.com/catchorg/Catch2/archive/refs/tags/v3.8.1.tar.gz
+ URL_HASH SHA256=18b3f70ac80fccc340d8c6ff0f339b2ae64944782f8d2fca2bd705cf47cadb79
+ SYSTEM
)
FetchContent_MakeAvailable(Catch2)
diff --git a/cmake/CivetWeb.cmake b/cmake/CivetWeb.cmake
index d2622de1c..308839201 100644
--- a/cmake/CivetWeb.cmake
+++ b/cmake/CivetWeb.cmake
@@ -35,6 +35,7 @@ FetchContent_Declare(civetweb
URL https://github.com/civetweb/civetweb/archive/refs/tags/v1.16.tar.gz
URL_HASH SHA256=f0e471c1bf4e7804a6cfb41ea9d13e7d623b2bcc7bc1e2a4dd54951a24d60285
PATCH_COMMAND "${PC}"
+ SYSTEM
)
FetchContent_MakeAvailable(civetweb)
diff --git a/cmake/Couchbase.cmake b/cmake/Couchbase.cmake
index 74a7e1326..68bab1c6a 100644
--- a/cmake/Couchbase.cmake
+++ b/cmake/Couchbase.cmake
@@ -32,15 +32,18 @@ set(COUCHBASE_CXX_CLIENT_INSTALL OFF CACHE BOOL "" FORCE)
set(PATCH_FILE_1 "${CMAKE_SOURCE_DIR}/thirdparty/couchbase/remove-thirdparty.patch")
set(PATCH_FILE_2 "${CMAKE_SOURCE_DIR}/thirdparty/couchbase/remove-debug-symbols.patch")
+set(PATCH_FILE_3 "${CMAKE_SOURCE_DIR}/thirdparty/couchbase/c++23_fixes.patch")
set(PC ${Bash_EXECUTABLE} -c "set -x &&\
(\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_1}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_1}\\\") &&\
- (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_2}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_2}\\\")")
+ (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_2}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_2}\\\") &&\
+ (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_3}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_3}\\\")")
FetchContent_Declare(couchbase-cxx-client
- URL https://github.com/couchbase/couchbase-cxx-client/releases/download/1.0.2/couchbase-cxx-client-1.0.2.tar.gz
- URL_HASH SHA256=1954e6f5e063d94675428182bc8b1b82fd8e8532c10d1787f157aeb18bb37769
+ URL https://github.com/couchbase/couchbase-cxx-client/releases/download/1.1.0/couchbase-cxx-client-1.1.0.tar.gz
+ URL_HASH SHA256=bd3a7f1492e242b239acd965eed4472cecb0319d40d05480f97cdec705960ba0
PATCH_COMMAND "${PC}"
+ SYSTEM
)
FetchContent_MakeAvailable(couchbase-cxx-client)
diff --git a/cmake/Couchbase.cmake b/cmake/Couchbase_1_0_2.cmake
similarity index 97%
copy from cmake/Couchbase.cmake
copy to cmake/Couchbase_1_0_2.cmake
index 74a7e1326..655abcd88 100644
--- a/cmake/Couchbase.cmake
+++ b/cmake/Couchbase_1_0_2.cmake
@@ -17,7 +17,7 @@
include(FetchContent)
-include(fmt)
+include(fmt_11_0_2)
include(Spdlog)
include(Asio)
@@ -30,7 +30,7 @@ set(COUCHBASE_CXX_CLIENT_BUILD_TOOLS OFF CACHE BOOL "" FORCE)
set(COUCHBASE_CXX_CLIENT_POST_LINKED_OPENSSL ON CACHE BOOL "" FORCE)
set(COUCHBASE_CXX_CLIENT_INSTALL OFF CACHE BOOL "" FORCE)
-set(PATCH_FILE_1 "${CMAKE_SOURCE_DIR}/thirdparty/couchbase/remove-thirdparty.patch")
+set(PATCH_FILE_1 "${CMAKE_SOURCE_DIR}/thirdparty/couchbase/remove-thirdparty-1.0.2.patch")
set(PATCH_FILE_2 "${CMAKE_SOURCE_DIR}/thirdparty/couchbase/remove-debug-symbols.patch")
set(PC ${Bash_EXECUTABLE} -c "set -x &&\
diff --git a/cmake/CppVersion.cmake b/cmake/CppVersion.cmake
index c356e6b40..8b6edee60 100644
--- a/cmake/CppVersion.cmake
+++ b/cmake/CppVersion.cmake
@@ -23,19 +23,20 @@ function(set_cpp_version)
else()
message(STATUS "The Visual Studio C++ compiler ${CMAKE_CXX_COMPILER} is not supported. Please use Visual Studio 2022 or newer.")
endif()
- set(CMAKE_CXX_STANDARD 20 PARENT_SCOPE)
+ set(CMAKE_CXX_STANDARD 23 PARENT_SCOPE)
else()
include(CheckCXXCompilerFlag)
- CHECK_CXX_COMPILER_FLAG("-std=c++20" COMPILER_SUPPORTS_CXX20)
- CHECK_CXX_COMPILER_FLAG("-std=c++2a" COMPILER_SUPPORTS_CXX2A)
- if(COMPILER_SUPPORTS_CXX20)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20" PARENT_SCOPE)
- elseif(COMPILER_SUPPORTS_CXX2A)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++2a" PARENT_SCOPE)
+ CHECK_CXX_COMPILER_FLAG("-std=c++23" COMPILER_SUPPORTS_CXX23)
+ CHECK_CXX_COMPILER_FLAG("-std=c++2b" COMPILER_SUPPORTS_CXX2B)
+ if(COMPILER_SUPPORTS_CXX23)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++23" PARENT_SCOPE)
+ set(CMAKE_CXX_STANDARD 23 PARENT_SCOPE)
+ elseif(COMPILER_SUPPORTS_CXX2B)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++2b" PARENT_SCOPE)
+ set(CMAKE_CXX_STANDARD 23 PARENT_SCOPE)
else()
- message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no support for -std=c++20 or -std=c++2a. Please use a more recent C++ compiler version.")
+ message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no support for -std=c++23 or -std=c++2b. Please use a more recent C++ compiler version.")
endif()
- set(CMAKE_CXX_STANDARD 20 PARENT_SCOPE)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON PARENT_SCOPE)
diff --git a/cmake/Crc32c.cmake b/cmake/Crc32c.cmake
index 8603e8960..3b4f3edb1 100644
--- a/cmake/Crc32c.cmake
+++ b/cmake/Crc32c.cmake
@@ -25,6 +25,7 @@ FetchContent_Declare(
crc32c
URL https://github.com/google/crc32c/archive/refs/tags/1.1.2.tar.gz
URL_HASH SHA256=ac07840513072b7fcebda6e821068aa04889018f24e10e46181068fb214d7e56
+ SYSTEM
)
FetchContent_MakeAvailable(crc32c)
add_library(Crc32c::crc32c ALIAS crc32c)
diff --git a/cmake/Date.cmake b/cmake/Date.cmake
index b5df69efc..a3d690e9c 100644
--- a/cmake/Date.cmake
+++ b/cmake/Date.cmake
@@ -22,6 +22,7 @@ if (WIN32)
FetchContent_Declare(tzdata
URL https://data.iana.org/time-zones/releases/tzdata2020e.tar.gz
URL_HASH SHA256=0be1ba329eae29ae1b54057c3547b3e672f73b3ae7643aa87dac85122bec037e
+ SYSTEM
)
FetchContent_GetProperties(tzdata)
if (NOT tzdata_POPULATED)
@@ -48,6 +49,7 @@ endif()
FetchContent_Declare(date_src
URL https://github.com/HowardHinnant/date/archive/1ead6715dec030d340a316c927c877a3c4e5a00c.tar.gz # master as of 2024-06-28
URL_HASH SHA256=8b4096b7b49e06d756f4aa0949151863ab7b812679a1646039fab6e821d3c049
+ SYSTEM
)
FetchContent_GetProperties(date_src)
if (NOT date_src_POPULATED)
diff --git a/cmake/ExpectedLite.cmake b/cmake/ExpectedLite.cmake
index f74dcfa35..4ee997a97 100644
--- a/cmake/ExpectedLite.cmake
+++ b/cmake/ExpectedLite.cmake
@@ -18,7 +18,11 @@
include(FetchContent)
FetchContent_Declare(expected-lite
- URL https://github.com/martinmoene/expected-lite/archive/refs/tags/v0.8.0.tar.gz
- URL_HASH SHA256=27649f30bd9d4fe7b193ab3eb6f78c64d0f585c24c085f340b4722b3d0b5e701
+ URL https://github.com/martinmoene/expected-lite/archive/refs/tags/v0.9.0.tar.gz
+ URL_HASH SHA256=e1b3ac812295ef8512c015d8271204105a71957323f8ab4e75f6856d71b8868d
+ SYSTEM
)
+
+# Due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119714
FetchContent_MakeAvailable(expected-lite)
+target_compile_definitions(expected-lite INTERFACE nsel_CONFIG_SELECT_EXPECTED=nsel_EXPECTED_NONSTD)
diff --git a/cmake/FetchBenchmark.cmake b/cmake/FetchBenchmark.cmake
index e65839d56..7043ae201 100644
--- a/cmake/FetchBenchmark.cmake
+++ b/cmake/FetchBenchmark.cmake
@@ -25,5 +25,6 @@ FetchContent_Declare(
URL https://github.com/google/benchmark/archive/refs/tags/v1.9.1.tar.gz
URL_HASH SHA256=32131c08ee31eeff2c8968d7e874f3cb648034377dfc32a4c377fa8796d84981
OVERRIDE_FIND_PACKAGE
+ SYSTEM
)
FetchContent_MakeAvailable(benchmark)
diff --git a/cmake/FetchUvc.cmake b/cmake/FetchUvc.cmake
index 7d2000ae3..507153116 100644
--- a/cmake/FetchUvc.cmake
+++ b/cmake/FetchUvc.cmake
@@ -21,5 +21,6 @@ FetchContent_Declare(Uvc
URL https://github.com/libuvc/libuvc/archive/refs/tags/v0.0.7.tar.gz
URL_HASH SHA256=7c6ba79723ad5d0ccdfbe6cadcfbd03f9f75b701d7ba96631eb1fd929a86ee72
OVERRIDE_FIND_PACKAGE
+ SYSTEM
)
FetchContent_MakeAvailable(Uvc)
diff --git a/cmake/Fetchlibrdkafka.cmake b/cmake/Fetchlibrdkafka.cmake
index 0b629d447..75d713fc7 100644
--- a/cmake/Fetchlibrdkafka.cmake
+++ b/cmake/Fetchlibrdkafka.cmake
@@ -40,6 +40,7 @@ FetchContent_Declare(libkafka
URL https://github.com/confluentinc/librdkafka/archive/refs/tags/v2.8.0.tar.gz
URL_HASH SHA256=5bd1c46f63265f31c6bfcedcde78703f77d28238eadf23821c2b43fc30be3e25
PATCH_COMMAND "${PC}"
+ SYSTEM
)
FetchContent_MakeAvailable(libkafka)
diff --git a/cmake/ExpectedLite.cmake b/cmake/GetFmt_11_0_2.cmake
similarity index 70%
copy from cmake/ExpectedLite.cmake
copy to cmake/GetFmt_11_0_2.cmake
index f74dcfa35..c788dd8ae 100644
--- a/cmake/ExpectedLite.cmake
+++ b/cmake/GetFmt_11_0_2.cmake
@@ -15,10 +15,12 @@
# specific language governing permissions and limitations
# under the License.
-include(FetchContent)
-
-FetchContent_Declare(expected-lite
- URL https://github.com/martinmoene/expected-lite/archive/refs/tags/v0.8.0.tar.gz
- URL_HASH SHA256=27649f30bd9d4fe7b193ab3eb6f78c64d0f585c24c085f340b4722b3d0b5e701
-)
-FetchContent_MakeAvailable(expected-lite)
+function(get_fmt_11_0_2)
+ if(MINIFI_FMT_SOURCE STREQUAL "CONAN")
+ message("Using Conan to install Fmt")
+ find_package(fmt REQUIRED)
+ elseif(MINIFI_FMT_SOURCE STREQUAL "BUILD")
+ message("Using CMake to build Fmt from source (version 11.0.2)")
+ include(fmt_11_0_2)
+ endif()
+endfunction(get_fmt_11_0_2)
diff --git a/cmake/GetSpdlog.cmake b/cmake/GetSpdlog.cmake
index 747894984..9fe3b9c46 100644
--- a/cmake/GetSpdlog.cmake
+++ b/cmake/GetSpdlog.cmake
@@ -16,8 +16,13 @@
# under the License.
function(get_spdlog)
- include(GetFmt)
- get_fmt()
+ if (WIN32)
+ include(GetFmt_11_0_2)
+ get_fmt_11_0_2()
+ else()
+ include(GetFmt)
+ get_fmt()
+ endif()
if(MINIFI_SPDLOG_SOURCE STREQUAL "CONAN")
message("Using Conan to install spdlog")
diff --git a/cmake/GoogleCloudCpp.cmake b/cmake/GoogleCloudCpp.cmake
index c02804455..071f83d5f 100644
--- a/cmake/GoogleCloudCpp.cmake
+++ b/cmake/GoogleCloudCpp.cmake
@@ -22,9 +22,11 @@ include(Crc32c)
set(PATCH_FILE_1 "${CMAKE_SOURCE_DIR}/thirdparty/google-cloud-cpp/remove-find_package.patch")
set(PATCH_FILE_2 "${CMAKE_SOURCE_DIR}/thirdparty/google-cloud-cpp/nlohmann_lib_as_interface.patch")
+set(PATCH_FILE_3 "${CMAKE_SOURCE_DIR}/thirdparty/google-cloud-cpp/c++23_fixes.patch")
set(PC ${Bash_EXECUTABLE} -c "set -x &&\
(\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_1}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_1}\\\") &&\
- (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_2}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_2}\\\")")
+ (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_2}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_2}\\\") &&\
+ (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_3}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_3}\\\")")
set(GOOGLE_CLOUD_CPP_WITH_MOCKS OFF CACHE BOOL "" FORCE)
if (NOT SKIP_TESTS)
@@ -34,6 +36,7 @@ if (NOT SKIP_TESTS)
googletest
URL https://github.com/google/googletest/releases/download/v1.17.0/googletest-1.17.0.tar.gz
URL_HASH SHA256=65fab701d9829d38cb77c14acdc431d2108bfdbf8979e40eb8ae567edf10b27c
+ SYSTEM
)
set(BUILD_GMOCK ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
@@ -48,6 +51,9 @@ set(GOOGLE_CLOUD_CPP_ENABLE_WERROR OFF CACHE INTERNAL warnings-off)
FetchContent_Declare(google-cloud-cpp
URL https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.38.0.tar.gz
URL_HASH SHA256=f1493b2dce9b379714342f2be7ccb483d70d13aac09d4a90ae3b4756693b72fc
- PATCH_COMMAND "${PC}")
-add_compile_definitions(_SILENCE_CXX20_REL_OPS_DEPRECATION_WARNING _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING CURL_STATICLIB)
+ PATCH_COMMAND "${PC}"
+ SYSTEM)
+if (WIN32)
+ add_compile_definitions(_SILENCE_CXX20_REL_OPS_DEPRECATION_WARNING _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING CURL_STATICLIB)
+endif()
FetchContent_MakeAvailable(google-cloud-cpp)
diff --git a/cmake/Grpc.cmake b/cmake/Grpc.cmake
index ae578c8ee..854780586 100644
--- a/cmake/Grpc.cmake
+++ b/cmake/Grpc.cmake
@@ -41,6 +41,7 @@ FetchContent_Declare(
GIT_TAG v1.68.0
GIT_SUBMODULES "third_party/cares/cares third_party/protobuf third_party/re2 third_party/upb"
PATCH_COMMAND "${PC}"
+ SYSTEM
)
set(FETCHCONTENT_QUIET OFF)
FetchContent_MakeAvailable(grpc)
diff --git a/cmake/GslLite.cmake b/cmake/GslLite.cmake
index 4262f9cbe..14a114685 100644
--- a/cmake/GslLite.cmake
+++ b/cmake/GslLite.cmake
@@ -20,5 +20,6 @@ include(FetchContent)
FetchContent_Declare(gsl-lite
URL https://github.com/gsl-lite/gsl-lite/archive/refs/tags/v0.39.0.tar.gz
URL_HASH SHA256=f80ec07d9f4946097a1e2554e19cee4b55b70b45d59e03a7d2b7f80d71e467e9
+ SYSTEM
)
FetchContent_MakeAvailable(gsl-lite)
diff --git a/cmake/JoltTests.cmake b/cmake/JoltTests.cmake
index 56601fab6..17c3b5c87 100644
--- a/cmake/JoltTests.cmake
+++ b/cmake/JoltTests.cmake
@@ -20,6 +20,7 @@ include(FetchContent)
FetchContent_Declare(jolt_tests
URL https://github.com/bazaarvoice/jolt/archive/refs/tags/jolt-0.1.8.tar.gz
URL_HASH SHA256=7423c5b98244260f89a975f5e21150c02a6a1fa88e3af07c90d43fef0eebdcbb
+ SYSTEM
)
FetchContent_MakeAvailable(jolt_tests)
diff --git a/cmake/JsonSchemaValidator.cmake b/cmake/JsonSchemaValidator.cmake
index 372798d8d..cb9886690 100644
--- a/cmake/JsonSchemaValidator.cmake
+++ b/cmake/JsonSchemaValidator.cmake
@@ -19,7 +19,8 @@ include(FetchContent)
FetchContent_Declare(json-schema-validator
URL https://github.com/pboettch/json-schema-validator/archive/2.2.0.tar.gz
- URL_HASH SHA256=03897867bd757ecac1db7545babf0c6c128859655b496582a9cea4809c2260aa)
+ URL_HASH SHA256=03897867bd757ecac1db7545babf0c6c128859655b496582a9cea4809c2260aa
+ SYSTEM)
FetchContent_MakeAvailable(json-schema-validator)
diff --git a/cmake/KubernetesClientC.cmake b/cmake/KubernetesClientC.cmake
index 84671dced..912983af9 100644
--- a/cmake/KubernetesClientC.cmake
+++ b/cmake/KubernetesClientC.cmake
@@ -22,6 +22,7 @@ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
FetchContent_Declare(yaml
GIT_REPOSITORY https://github.com/yaml/libyaml.git
GIT_TAG 2c891fc7a770e8ba2fec34fc6b545c672beb37e6 # 0.2.5
+ SYSTEM
)
set(LWS_WITHOUT_TESTAPPS ON CACHE BOOL "" FORCE)
@@ -44,6 +45,7 @@ FetchContent_Declare(websockets
URL https://github.com/warmcat/libwebsockets/archive/refs/tags/v4.3.2.tar.gz
URL_HASH SHA256=6a85a1bccf25acc7e8e5383e4934c9b32a102880d1e4c37c70b27ae2a42406e1
PATCH_COMMAND "${WEBSOCKETS_PC}"
+ SYSTEM
)
FetchContent_MakeAvailable(yaml websockets)
@@ -57,6 +59,7 @@ FetchContent_Declare(kubernetes
URL_HASH SHA256=dbb6e6cd29ae2ac6c15de894aefb9b1e3d48916541d443f089aa0ffad6517ec6
PATCH_COMMAND "${K8S_PC}"
SOURCE_SUBDIR kubernetes
+ SYSTEM
)
FetchContent_MakeAvailable(kubernetes)
diff --git a/cmake/LZ4.cmake b/cmake/LZ4.cmake
index f008d9933..6712614c9 100644
--- a/cmake/LZ4.cmake
+++ b/cmake/LZ4.cmake
@@ -29,6 +29,7 @@ FetchContent_Declare(lz4
URL_HASH SHA256=0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b
SOURCE_SUBDIR build/cmake
OVERRIDE_FIND_PACKAGE
+ SYSTEM
)
FetchContent_MakeAvailable(lz4)
diff --git a/cmake/LibLZMA.cmake b/cmake/LibLZMA.cmake
index 67ca7c9d7..f90621cf9 100644
--- a/cmake/LibLZMA.cmake
+++ b/cmake/LibLZMA.cmake
@@ -26,7 +26,8 @@ set(PC ${Bash_EXECUTABLE} -c "set -x &&\
FetchContent_Declare(liblzma
URL https://github.com/tukaani-project/xz/releases/download/v5.6.2/xz-5.6.2.tar.gz
URL_HASH SHA256=8bfd20c0e1d86f0402f2497cfa71c6ab62d4cd35fd704276e3140bfb71414519
- PATCH_COMMAND "${PC}")
+ PATCH_COMMAND "${PC}"
+ SYSTEM)
FetchContent_MakeAvailable(liblzma)
diff --git a/cmake/LlamaCpp.cmake b/cmake/LlamaCpp.cmake
index af4e94994..f78101c6f 100644
--- a/cmake/LlamaCpp.cmake
+++ b/cmake/LlamaCpp.cmake
@@ -31,13 +31,17 @@ else()
endif()
set(PATCH_FILE_1 "${CMAKE_SOURCE_DIR}/thirdparty/llamacpp/lu8_macro_fix.patch") # https://github.com/ggml-org/llama.cpp/issues/12740
+set(PATCH_FILE_2 "${CMAKE_SOURCE_DIR}/thirdparty/llamacpp/cpp-23-fixes.patch")
+
set(PC ${Bash_EXECUTABLE} -c "set -x &&\
- (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_1}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_1}\\\")")
+ (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_1}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_1}\\\") &&\
+ (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_2}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_2}\\\")")
FetchContent_Declare(llamacpp
- URL https://github.com/ggerganov/llama.cpp/archive/refs/tags/b5038.tar.gz
- URL_HASH SHA256=5e81c3badc181ed3b7a6ab6bda2abedc80c52527e3c079c7afff4c09f4843564
+ URL https://github.com/ggml-org/llama.cpp/archive/refs/tags/b5958.tar.gz
+ URL_HASH SHA256=4e8a2abd83092aa446cd13556f6fe8777139da7b191bdaa0e1b79fe9740b36a6
PATCH_COMMAND "${PC}"
+ SYSTEM
)
FetchContent_MakeAvailable(llamacpp)
diff --git a/cmake/Lua.cmake b/cmake/Lua.cmake
index 35a1ab162..6dc22c02b 100644
--- a/cmake/Lua.cmake
+++ b/cmake/Lua.cmake
@@ -20,6 +20,7 @@ include(FetchContent)
FetchContent_Declare(lua
URL "https://github.com/lua/lua/archive/refs/tags/v5.4.6.tar.gz"
URL_HASH "SHA256=11c228cf9b9564d880b394f8069ad829d01e39756567f79c347a6b89fed44771"
+ SYSTEM
)
FetchContent_GetProperties(lua)
diff --git a/cmake/MagicEnum.cmake b/cmake/MagicEnum.cmake
index 266d3b849..9bd6efad8 100644
--- a/cmake/MagicEnum.cmake
+++ b/cmake/MagicEnum.cmake
@@ -19,6 +19,7 @@ include(FetchContent)
FetchContent_Declare(magic_enum
URL https://github.com/Neargye/magic_enum/archive/refs/tags/v0.9.3.tar.gz
- URL_HASH SHA256=3cadd6a05f1bffc5141e5e731c46b2b73c2dbff025e723c8abaa659e0a24f072)
+ URL_HASH SHA256=3cadd6a05f1bffc5141e5e731c46b2b73c2dbff025e723c8abaa659e0a24f072
+ SYSTEM)
FetchContent_MakeAvailable(magic_enum)
diff --git a/cmake/MiMalloc.cmake b/cmake/MiMalloc.cmake
index ec12daa0d..45a5a0015 100644
--- a/cmake/MiMalloc.cmake
+++ b/cmake/MiMalloc.cmake
@@ -21,5 +21,6 @@ FetchContent_Declare(
mimalloc
URL https://github.com/microsoft/mimalloc/archive/refs/tags/v2.0.6.tar.gz
URL_HASH SHA256=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+ SYSTEM
)
FetchContent_MakeAvailable(mimalloc)
diff --git a/cmake/PahoMqttC.cmake b/cmake/PahoMqttC.cmake
index 0209edf94..322239025 100644
--- a/cmake/PahoMqttC.cmake
+++ b/cmake/PahoMqttC.cmake
@@ -23,15 +23,18 @@ set(PAHO_BUILD_SHARED OFF CACHE BOOL "" FORCE)
set(PAHO_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
set(PAHO_WITH_SSL ON CACHE BOOL "" FORCE)
-set(PATCH_FILE "${CMAKE_SOURCE_DIR}/thirdparty/paho-mqtt/cmake-openssl.patch")
+set(PATCH_FILE_1 "${CMAKE_SOURCE_DIR}/thirdparty/paho-mqtt/cmake-openssl.patch")
+set(PATCH_FILE_2 "${CMAKE_SOURCE_DIR}/thirdparty/paho-mqtt/1576-Changed-bool-typedef-to-bit.patch")
set(PC ${Bash_EXECUTABLE} -c "set -x &&\
- (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE}\\\")")
+ (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_1}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_1}\\\") &&\
+ (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_2}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_2}\\\")")
FetchContent_Declare(
- paho.mqtt.c-external
- URL "https://github.com/eclipse/paho.mqtt.c/archive/refs/tags/v1.3.14.tar.gz"
- URL_HASH "SHA256=7af7d906e60a696a80f1b7c2bd7d6eb164aaad908ff4c40c3332ac2006d07346"
- PATCH_COMMAND "${PC}"
+ paho.mqtt.c-external
+ URL "https://github.com/eclipse/paho.mqtt.c/archive/refs/tags/v1.3.14.tar.gz"
+ URL_HASH "SHA256=7af7d906e60a696a80f1b7c2bd7d6eb164aaad908ff4c40c3332ac2006d07346"
+ PATCH_COMMAND "${PC}"
+ SYSTEM
)
FetchContent_MakeAvailable(paho.mqtt.c-external)
diff --git a/cmake/Prometheus.cmake b/cmake/Prometheus.cmake
index ef3e33231..0138d21d2 100644
--- a/cmake/Prometheus.cmake
+++ b/cmake/Prometheus.cmake
@@ -31,6 +31,7 @@ FetchContent_Declare(
URL "https://github.com/jupp0r/prometheus-cpp/archive/refs/tags/v1.3.0.tar.gz"
URL_HASH "SHA256=ac6e958405a29fbbea9db70b00fa3c420e16ad32e1baf941ab233ba031dd72ee"
PATCH_COMMAND "${PC}"
+ SYSTEM
)
FetchContent_MakeAvailable(prometheus-cpp)
diff --git a/cmake/RangeV3.cmake b/cmake/RangeV3.cmake
index ff26be3a1..4cfb23054 100644
--- a/cmake/RangeV3.cmake
+++ b/cmake/RangeV3.cmake
@@ -17,8 +17,15 @@
include(FetchContent)
+set(PATCH_FILE "${CMAKE_SOURCE_DIR}/thirdparty/ranges-v3/remove-deprecated.patch")
+set(PC ${Bash_EXECUTABLE} -c "set -x &&\
+ (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE}\\\")")
+
FetchContent_Declare(range-v3_src
URL https://github.com/ericniebler/range-v3/archive/refs/tags/0.12.0.tar.gz
URL_HASH SHA256=015adb2300a98edfceaf0725beec3337f542af4915cec4d0b89fa0886f4ba9cb
+ PATCH_COMMAND "${PC}"
+ SYSTEM
)
FetchContent_MakeAvailable(range-v3_src)
+target_compile_definitions(range-v3 INTERFACE RANGES_CXX_THREAD_LOCAL=201103L)
diff --git a/cmake/RpMalloc.cmake b/cmake/RpMalloc.cmake
index 17ab3166e..a97a9135c 100644
--- a/cmake/RpMalloc.cmake
+++ b/cmake/RpMalloc.cmake
@@ -21,6 +21,7 @@ FetchContent_Declare(
rpmalloc
URL https://github.com/mjansson/rpmalloc/archive/refs/tags/1.4.4.tar.gz
URL_HASH SHA256=3859620c03e6473f0b3f16a4e965e7c049594253f70e8370fb9caa0e4118accb
+ SYSTEM
)
FetchContent_GetProperties(rpmalloc)
diff --git a/cmake/Sol2.cmake b/cmake/Sol2.cmake
index e5989a3ac..3dbe63cb1 100644
--- a/cmake/Sol2.cmake
+++ b/cmake/Sol2.cmake
@@ -15,33 +15,11 @@
# specific language governing permissions and limitations
# under the License.
-# Using file(DOWNLOAD) instead of FetchContent due to this issue in cmake versions older than 3.18 https://gitlab.kitware.com/cmake/cmake/-/issues/20526
+include(FetchContent)
-set(SOL2_INCLUDE_DIR "${CMAKE_BINARY_DIR}/_deps/sol2/" CACHE STRING "" FORCE)
-if(NOT EXISTS "${SOL2_INCLUDE_DIR}/sol.hpp")
- file(DOWNLOAD "https://github.com/ThePhD/sol2/releases/download/v3.3.0/sol.hpp" "${SOL2_INCLUDE_DIR}/sol/sol.hpp"
- EXPECTED_HASH SHA256=e095a961a5189863745e6c101124fce944af991f3d4726a1e82c5b4a885a187f)
- configure_file("${SOL2_INCLUDE_DIR}/sol/sol.hpp" "${SOL2_INCLUDE_DIR}/sol/sol.hpp" NEWLINE_STYLE LF)
-
- file(DOWNLOAD "https://github.com/ThePhD/sol2/releases/download/v3.3.0/config.hpp" "${SOL2_INCLUDE_DIR}/sol/config.hpp"
- EXPECTED_HASH SHA256=6c283673a16f0eeb3c56f8b8d72ccf7ed3f048816dbd2584ac58564c61315f02)
- configure_file("${SOL2_INCLUDE_DIR}/sol/config.hpp" "${SOL2_INCLUDE_DIR}/sol/config.hpp" NEWLINE_STYLE LF)
-
- file(DOWNLOAD "https://github.com/ThePhD/sol2/releases/download/v3.3.0/forward.hpp" "${SOL2_INCLUDE_DIR}/sol/forward.hpp"
- EXPECTED_HASH SHA256=8fc34d74e9b4b8baa381f5e6ab7b6f6b44114cd355c718505495943ff6b85740)
- configure_file("${SOL2_INCLUDE_DIR}/sol/forward.hpp" "${SOL2_INCLUDE_DIR}/sol/forward.hpp" NEWLINE_STYLE LF)
-
- # Some platform simply define LUA_COMPAT_BITLIB or LUA_COMPAT_5_2 without setting them to explicitly 1
- set(PC "${Patch_EXECUTABLE}" -p1 -i "${CMAKE_SOURCE_DIR}/thirdparty/sol2/fix_bitlib_compatibility.patch" "${SOL2_INCLUDE_DIR}/sol/sol.hpp")
-
- execute_process(COMMAND ${PC} RESULT_VARIABLE patch_result_code)
- if(NOT patch_result_code EQUAL "0")
- message(FATAL_ERROR "Failed to patch sol.hpp")
- endif()
-
- add_library(sol2 INTERFACE IMPORTED)
- target_sources(sol2 INTERFACE ${SOL2_INCLUDE_DIR}/sol/sol.hpp)
- target_sources(sol2 INTERFACE ${SOL2_INCLUDE_DIR}/sol/config.hpp)
- target_sources(sol2 INTERFACE ${SOL2_INCLUDE_DIR}/sol/forward.hpp)
- target_include_directories(sol2 SYSTEM INTERFACE ${SOL2_INCLUDE_DIR})
-endif()
+FetchContent_Declare(sol2_src
+ URL https://github.com/ThePhD/sol2/archive/refs/tags/v3.5.0.tar.gz
+ URL_HASH SHA256=86c0f6d2836b184a250fc2907091c076bf53c9603dd291eaebade36cc342e13c
+ SYSTEM
+)
+FetchContent_MakeAvailable(sol2_src)
diff --git a/cmake/Spdlog.cmake b/cmake/Spdlog.cmake
index cbdaa21e5..6fa371674 100644
--- a/cmake/Spdlog.cmake
+++ b/cmake/Spdlog.cmake
@@ -19,9 +19,12 @@
include(FetchContent)
set(SPDLOG_FMT_EXTERNAL ON CACHE STRING "" FORCE)
+set(SPDLOG_SYSTEM_INCLUDES ON CACHE STRING "" FORCE)
+
FetchContent_Declare(Spdlog
- URL https://github.com/gabime/spdlog/archive/refs/tags/v1.15.1.tar.gz
- URL_HASH SHA256=25c843860f039a1600f232c6eb9e01e6627f7d030a2ae5e232bdd3c9205d26cc
+ URL https://github.com/gabime/spdlog/archive/refs/tags/v1.15.3.tar.gz
+ URL_HASH SHA256=15a04e69c222eb6c01094b5c7ff8a249b36bb22788d72519646fb85feb267e67
OVERRIDE_FIND_PACKAGE
+ SYSTEM
)
FetchContent_MakeAvailable(Spdlog)
diff --git a/cmake/Zstd.cmake b/cmake/Zstd.cmake
index 15f87ad6d..1ba57c8ae 100644
--- a/cmake/Zstd.cmake
+++ b/cmake/Zstd.cmake
@@ -32,6 +32,7 @@ FetchContent_Declare(zstd
URL_HASH SHA256=f7de13462f7a82c29ab865820149e778cbfe01087b3a55b5332707abf9db4a6e
PATCH_COMMAND "${PC}"
SOURCE_SUBDIR build/cmake
+ SYSTEM
)
FetchContent_MakeAvailable(zstd)
diff --git a/cmake/fmt.cmake b/cmake/fmt.cmake
index 1d39f7689..0777eaa5d 100644
--- a/cmake/fmt.cmake
+++ b/cmake/fmt.cmake
@@ -19,8 +19,9 @@
include(FetchContent)
FetchContent_Declare(Fmt
- URL https://github.com/fmtlib/fmt/archive/refs/tags/11.0.2.tar.gz
- URL_HASH SHA256=6cb1e6d37bdcb756dbbe59be438790db409cdb4868c66e888d5df9f13f7c027f
+ URL https://github.com/fmtlib/fmt/archive/refs/tags/11.2.0.tar.gz
+ URL_HASH SHA256=bc23066d87ab3168f27cef3e97d545fa63314f5c79df5ea444d41d56f962c6af
OVERRIDE_FIND_PACKAGE
+ SYSTEM
)
FetchContent_MakeAvailable(Fmt)
diff --git a/cmake/fmt.cmake b/cmake/fmt_11_0_2.cmake
similarity index 98%
copy from cmake/fmt.cmake
copy to cmake/fmt_11_0_2.cmake
index 1d39f7689..dfe9dcea1 100644
--- a/cmake/fmt.cmake
+++ b/cmake/fmt_11_0_2.cmake
@@ -22,5 +22,6 @@ FetchContent_Declare(Fmt
URL https://github.com/fmtlib/fmt/archive/refs/tags/11.0.2.tar.gz
URL_HASH SHA256=6cb1e6d37bdcb756dbbe59be438790db409cdb4868c66e888d5df9f13f7c027f
OVERRIDE_FIND_PACKAGE
+ SYSTEM
)
FetchContent_MakeAvailable(Fmt)
diff --git a/core-framework/include/utils/expected.h b/core-framework/include/utils/expected.h
index aff2c0a05..fb0f3457e 100644
--- a/core-framework/include/utils/expected.h
+++ b/core-framework/include/utils/expected.h
@@ -239,26 +239,28 @@ auto try_expression(F&& action, Args&&... args) noexcept {
} // namespace org::apache::nifi::minifi::utils
-#ifndef WIN32 // on windows this conflicts because nonstd::expected === std::expected
+template <typename T, typename E>
+concept HasStdExpected = requires { typename std::expected<T, E>; };
+
+template <typename T, typename E>
+concept ExpectedTypesDoNotConflict =
+ (!HasStdExpected<T, E> ||
+ !std::same_as<nonstd::expected<T, E>, std::expected<T, E>>);
+
// based on fmt::formatter<std::expected<T, E>, Char>
template <typename T, typename E, typename Char>
-struct fmt::formatter<nonstd::expected<T, E>, Char,
- std::enable_if_t<(std::is_void<T>::value ||
- fmt::is_formattable<T, Char>::value) &&
- fmt::is_formattable<E, Char>::value>> {
- template <typename ParseContext>
- constexpr auto parse(ParseContext& ctx) -> const Char* {
- return ctx.begin();
- }
+requires ExpectedTypesDoNotConflict<T, E> &&
+ (std::is_void_v<T> || fmt::is_formattable<T, Char>::value) &&
+ fmt::is_formattable<E, Char>::value
+struct fmt::formatter<nonstd::expected<T, E>, Char> {
+ constexpr auto parse(auto& ctx) { return ctx.begin(); }
- template <typename FormatContext>
- auto format(const nonstd::expected<T, E>& value, FormatContext& ctx) const
- -> decltype(ctx.out()) {
+ auto format(const nonstd::expected<T, E>& value, auto& ctx) const {
auto out = ctx.out();
if (value.has_value()) {
out = fmt::detail::write<Char>(out, "nonstd::expected(");
- if constexpr (!std::is_void<T>::value)
+ if constexpr (!std::is_void_v<T>)
out = fmt::detail::write_escaped_alternative<Char>(out, *value);
} else {
out = fmt::detail::write<Char>(out, "nonstd::unexpected(");
@@ -268,4 +270,3 @@ struct fmt::formatter<nonstd::expected<T, E>, Char,
return out;
}
};
-#endif
diff --git a/core-framework/include/utils/net/AsioCoro.h b/core-framework/include/utils/net/AsioCoro.h
index 55a3a4cbc..b18087268 100644
--- a/core-framework/include/utils/net/AsioCoro.h
+++ b/core-framework/include/utils/net/AsioCoro.h
@@ -29,11 +29,11 @@
#include "asio/this_coro.hpp"
#include "asio/use_awaitable.hpp"
#include "asio/experimental/awaitable_operators.hpp"
-#include "asio/experimental/as_tuple.hpp"
+#include "asio/as_tuple.hpp"
namespace org::apache::nifi::minifi::utils::net {
-constexpr auto use_nothrow_awaitable = asio::experimental::as_tuple(asio::use_awaitable);
+constexpr auto use_nothrow_awaitable = asio::as_tuple(asio::use_awaitable);
#if defined(__GNUC__) && __GNUC__ < 11
// [coroutines] unexpected 'warning: statement has no effect [-Wunused-value]'
diff --git a/core-framework/include/utils/net/AsioSocketUtils.h b/core-framework/include/utils/net/AsioSocketUtils.h
index b052fc072..74b1c19eb 100644
--- a/core-framework/include/utils/net/AsioSocketUtils.h
+++ b/core-framework/include/utils/net/AsioSocketUtils.h
@@ -141,7 +141,7 @@ class AsioSocketConnection : public io::BaseStreamImpl {
return;
}
- asio::ip::tcp::endpoint local_endpoint(asio::ip::address::from_string(address), 0);
+ asio::ip::tcp::endpoint local_endpoint(asio::ip::make_address(address), 0);
asio::error_code err;
socket.open(local_endpoint.protocol(), err);
if (err) {
diff --git a/core-framework/src/utils/net/DNS.cpp b/core-framework/src/utils/net/DNS.cpp
index 7af353124..48d499f81 100644
--- a/core-framework/src/utils/net/DNS.cpp
+++ b/core-framework/src/utils/net/DNS.cpp
@@ -27,7 +27,7 @@ namespace org::apache::nifi::minifi::utils::net {
nonstd::expected<asio::ip::address, std::error_code> addressFromString(const std::string_view ip_address_str) {
std::error_code ip_address_from_string_error;
- auto ip_address = asio::ip::address::from_string(ip_address_str.data(), ip_address_from_string_error);
+ auto ip_address = asio::ip::make_address(ip_address_str, ip_address_from_string_error);
if (ip_address_from_string_error)
return nonstd::make_unexpected(ip_address_from_string_error);
return ip_address;
@@ -55,7 +55,10 @@ nonstd::expected<std::string, std::error_code> reverseDnsLookup(const asio::ip::
if (resolve_error)
return nonstd::make_unexpected(resolve_error);
- return results->host_name();
+ if (!results.empty()) {
+ return results.begin()->host_name();
+ }
+ return nonstd::make_unexpected(std::make_error_code(std::errc::host_unreachable));
}
std::string getMyHostName() {
diff --git a/docker/centos/Dockerfile b/docker/centos/Dockerfile
deleted file mode 100644
index e2eec731d..000000000
--- a/docker/centos/Dockerfile
+++ /dev/null
@@ -1,67 +0,0 @@
-# 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.
-#
-
-# First stage: the build environment
-ARG BASE_IMAGE="centos:7"
-
-FROM ${BASE_IMAGE} AS build
-LABEL maintainer="Apache NiFi <de...@nifi.apache.org>"
-
-ARG MINIFI_VERSION
-ARG UID=1000
-ARG GID=1000
-
-# MINIFI_OPTIONS will be passed directly to cmake
-# use it to define cmake options (e.g. -DENABLE_AWS=ON -DENABLE_AZURE=ON)
-ARG MINIFI_OPTIONS=""
-ARG CMAKE_BUILD_TYPE=Release
-ARG DOCKER_SKIP_TESTS=ON
-ARG DOCKER_MAKE_TARGET="all"
-
-# Install the system dependencies needed for a build
-
-ENV MINIFI_BASE_DIR /opt/minifi
-ENV MINIFI_HOME $MINIFI_BASE_DIR/nifi-minifi-cpp-$MINIFI_VERSION
-ENV USER minificpp
-
-RUN mkdir -p $MINIFI_BASE_DIR
-COPY . ${MINIFI_BASE_DIR}
-
-# ccache is in EPEL
-RUN ulimit -n 1024000 && yum -y install epel-release && yum -y install sudo git which make libarchive ccache ca-certificates perl-IPC-Cmd && \
- if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_PYTHON_SCRIPTING=ON"; then yum -y install python36-devel; fi && \
- if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_SFTP=ON" && [ "${DOCKER_SKIP_TESTS}" == "OFF" ]; then yum -y install java-1.8.0-openjdk maven; fi
-
-RUN cd $MINIFI_BASE_DIR && \
- ./bootstrap.sh -t && \
- ln -s /usr/bin/ccache /usr/lib64/ccache/c++
-
-# Setup minificpp user
-RUN groupadd -g ${GID} ${USER} && useradd -g ${GID} ${USER} && \
- chown -R ${USER}:${USER} ${MINIFI_BASE_DIR}
-
-USER ${USER}
-
-# Perform the build
-RUN cd $MINIFI_BASE_DIR && \
- cd build && \
- source /opt/rh/devtoolset-11/enable && \
- export PATH=/usr/lib64/ccache${PATH:+:${PATH}} && \
- export CCACHE_DIR=${MINIFI_BASE_DIR}/.ccache && \
- cmake -DSTATIC_BUILD= -DSKIP_TESTS=${DOCKER_SKIP_TESTS} ${MINIFI_OPTIONS} -DAWS_ENABLE_UNITY_BUILD=OFF -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" .. && \
- make -j "$(nproc)" ${DOCKER_MAKE_TARGET}
diff --git a/docker/compiler-test/clang.Dockerfile b/docker/compiler-test/clang.Dockerfile
new file mode 100644
index 000000000..784e4156f
--- /dev/null
+++ b/docker/compiler-test/clang.Dockerfile
@@ -0,0 +1,22 @@
+ARG BASE_IMAGE
+
+FROM ${BASE_IMAGE} AS build
+LABEL maintainer="Apache NiFi <de...@nifi.apache.org>"
+
+ENV MINIFI_BASE_DIR /opt/minifi
+ENV DEBIAN_FRONTEND=noninteractive
+ENV CC=clang
+ENV CXX=clang++
+ENV CXXFLAGS="-stdlib=libc++"
+ENV LDFLAGS="-stdlib=libc++"
+
+RUN mkdir -p $MINIFI_BASE_DIR
+COPY . ${MINIFI_BASE_DIR}
+
+
+RUN apt update && apt install -y sudo python3-venv
+
+
+RUN cd $MINIFI_BASE_DIR/bootstrap && python3 -m venv venv && . venv/bin/activate \
+ && pip install -r requirements.txt \
+ && python main.py --noninteractive --skip-compiler-install --minifi-options="-DENABLE_ALL=ON -DMINIFI_FAIL_ON_WARNINGS=ON"
diff --git a/docker/compiler-test/gcc.Dockerfile b/docker/compiler-test/gcc.Dockerfile
new file mode 100644
index 000000000..643e4df99
--- /dev/null
+++ b/docker/compiler-test/gcc.Dockerfile
@@ -0,0 +1,18 @@
+ARG BASE_IMAGE
+
+FROM ${BASE_IMAGE} AS build
+LABEL maintainer="Apache NiFi <de...@nifi.apache.org>"
+
+ENV MINIFI_BASE_DIR /opt/minifi
+ENV DEBIAN_FRONTEND=noninteractive
+
+RUN mkdir -p $MINIFI_BASE_DIR
+COPY . ${MINIFI_BASE_DIR}
+
+
+RUN apt update && apt install -y sudo python3-venv
+
+
+RUN cd $MINIFI_BASE_DIR/bootstrap && python3 -m venv venv && . venv/bin/activate \
+ && pip install -r requirements.txt \
+ && python main.py --noninteractive --skip-compiler-install --minifi-options="-DENABLE_ALL=ON -DMINIFI_FAIL_ON_WARNINGS=ON"
diff --git a/extensions/couchbase/CMakeLists.txt b/extensions/couchbase/CMakeLists.txt
index 0299ce8fd..92d4617e6 100644
--- a/extensions/couchbase/CMakeLists.txt
+++ b/extensions/couchbase/CMakeLists.txt
@@ -21,7 +21,12 @@ if (NOT (ENABLE_ALL OR ENABLE_COUCHBASE))
return()
endif()
-include(Couchbase)
+if (WIN32)
+ include(Couchbase_1_0_2)
+else()
+ include(Couchbase)
+endif()
+
include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt)
file(GLOB SOURCES "*.cpp" "controllerservices/*.cpp" "processors/*.cpp")
diff --git a/extensions/expression-language/CMakeLists.txt b/extensions/expression-language/CMakeLists.txt
index c179ab3ef..3183d97ca 100644
--- a/extensions/expression-language/CMakeLists.txt
+++ b/extensions/expression-language/CMakeLists.txt
@@ -32,6 +32,7 @@ if(WIN32)
winflexbison
URL "https://github.com/lexxmark/winflexbison/archive/refs/tags/v2.5.25.tar.gz"
URL_HASH "SHA256=8e1b71e037b524ba3f576babb0cf59182061df1f19cd86112f085a882560f60b"
+ SYSTEM
)
FetchContent_GetProperties("winflexbison")
diff --git a/extensions/gcp/CMakeLists.txt b/extensions/gcp/CMakeLists.txt
index 8dbe37e08..cf8dc9a47 100644
--- a/extensions/gcp/CMakeLists.txt
+++ b/extensions/gcp/CMakeLists.txt
@@ -27,6 +27,9 @@ file(GLOB SOURCES "*.cpp" "controllerservices/*.cpp" "processors/*.cpp")
add_minifi_library(minifi-gcp SHARED ${SOURCES})
+if (NOT WIN32)
+ target_compile_options(minifi-gcp PRIVATE -Wno-error=deprecated-declarations) # Suppress deprecation warnings for std::rel_ops usage
+endif()
target_link_libraries(minifi-gcp ${LIBMINIFI} google-cloud-cpp::storage)
target_include_directories(minifi-gcp SYSTEM PUBLIC ${google-cloud-cpp_INCLUDE_DIRS})
diff --git a/extensions/gcp/tests/CMakeLists.txt b/extensions/gcp/tests/CMakeLists.txt
index ed119eb1d..398a66eac 100644
--- a/extensions/gcp/tests/CMakeLists.txt
+++ b/extensions/gcp/tests/CMakeLists.txt
@@ -20,7 +20,13 @@ file(GLOB GCS_TESTS "*.cpp")
FOREACH(testfile ${GCS_TESTS})
get_filename_component(testfilename "${testfile}" NAME_WE)
add_minifi_executable("${testfilename}" "${testfile}")
- target_compile_definitions(${testfilename} PRIVATE _SILENCE_CXX20_REL_OPS_DEPRECATION_WARNING)
+
+ if (WIN32)
+ target_compile_definitions(${testfilename} PRIVATE _SILENCE_CXX20_REL_OPS_DEPRECATION_WARNING)
+ else()
+ target_compile_options(${testfilename} PRIVATE -Wno-error=deprecated-declarations) # Suppress deprecation warnings for std::rel_ops usage
+ endif()
+
target_include_directories(${testfilename} PRIVATE BEFORE "${CMAKE_SOURCE_DIR}/extensions/standard-processors")
target_include_directories(${testfilename} PRIVATE BEFORE "${CMAKE_SOURCE_DIR}/extensions/expression-language")
target_include_directories(${testfilename} PRIVATE BEFORE "${CMAKE_SOURCE_DIR}/extensions/gcp")
diff --git a/extensions/sql/CMakeLists.txt b/extensions/sql/CMakeLists.txt
index 9b7c025a0..39f9ce82b 100644
--- a/extensions/sql/CMakeLists.txt
+++ b/extensions/sql/CMakeLists.txt
@@ -40,6 +40,7 @@ else()
set(IODBC_BYPRODUCT_DIR "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/iodbc-install/")
+ set(IODBC_PC "${Patch_EXECUTABLE}" -p1 -i "${CMAKE_SOURCE_DIR}/thirdparty/iODBC/GCC-15-needs-typedef-SQLRETURN-HPROC.patch")
# Build project
ExternalProject_Add(
iodbc-external
@@ -47,6 +48,7 @@ else()
URL_HASH "SHA256=896d7e16b283cf9a6f5b5f46e8e9549aef21a11935726b0170987cd4c59d16db"
BUILD_IN_SOURCE true
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/iodbc-src"
+ PATCH_COMMAND "${IODBC_PC}"
BUILD_COMMAND make
CMAKE_COMMAND ""
UPDATE_COMMAND ""
diff --git a/extensions/sql/processors/ExecuteSQL.cpp b/extensions/sql/processors/ExecuteSQL.cpp
index f39151758..6327e33b4 100644
--- a/extensions/sql/processors/ExecuteSQL.cpp
+++ b/extensions/sql/processors/ExecuteSQL.cpp
@@ -52,7 +52,8 @@ void ExecuteSQL::processOnTrigger(core::ProcessContext& context, core::ProcessSe
"No incoming FlowFile and the \"" + std::string{SQLSelectQuery.name} + "\" processor property is not specified"); // NOLINT(whitespace/braces)
}
logger_->log_debug("Using the contents of the flow file as the SQL statement");
- query = to_string(session.readBuffer(input_flow_file));
+ std::string buffer_str = to_string(session.readBuffer(input_flow_file));
+ query = buffer_str;
}
if (query->empty()) {
logger_->log_error("Empty sql statement");
diff --git a/extensions/standard-processors/controllers/JsonRecordSetWriter.cpp b/extensions/standard-processors/controllers/JsonRecordSetWriter.cpp
index 0f9e37de7..efc3f2326 100644
--- a/extensions/standard-processors/controllers/JsonRecordSetWriter.cpp
+++ b/extensions/standard-processors/controllers/JsonRecordSetWriter.cpp
@@ -61,7 +61,7 @@ template<>
rapidjson::Value toJson(const core::RecordObject& field, rapidjson::Document::AllocatorType& alloc) {
auto object_json = rapidjson::Value(rapidjson::kObjectType);
for (const auto& [record_name, record_value] : field) {
- auto json_value = (std::visit([&alloc](auto&& f)-> rapidjson::Value{ return toJson(f, alloc); }, record_value.field->value_));
+ auto json_value = (std::visit([&alloc](auto&& f)-> rapidjson::Value{ return toJson(f, alloc); }, record_value.value_));
rapidjson::Value json_name(record_name.c_str(), gsl::narrow<rapidjson::SizeType>(record_name.length()), alloc);
object_json.AddMember(json_name, json_value, alloc);
}
@@ -114,9 +114,13 @@ void JsonRecordSetWriter::writeAsArray(const core::RecordSet& record_set, const
void JsonRecordSetWriter::write(const core::RecordSet& record_set, const std::shared_ptr<core::FlowFile>& flow_file, core::ProcessSession& session) {
switch (output_grouping_) {
case OutputGroupingType::ARRAY:
- return writeAsArray(record_set, flow_file, session);
+ writeAsArray(record_set, flow_file, session);
+ break;
case OutputGroupingType::ONE_LINE_PER_OBJECT:
- return writePerLine(record_set, flow_file, session);
+ writePerLine(record_set, flow_file, session);
+ break;
+ default:
+ throw std::invalid_argument(fmt::format("Invalid OutputGroupingType: {}", magic_enum::enum_underlying(output_grouping_)));
}
}
diff --git a/extensions/standard-processors/controllers/JsonTreeReader.cpp b/extensions/standard-processors/controllers/JsonTreeReader.cpp
index 17b196811..1031a5a62 100644
--- a/extensions/standard-processors/controllers/JsonTreeReader.cpp
+++ b/extensions/standard-processors/controllers/JsonTreeReader.cpp
@@ -59,7 +59,7 @@ nonstd::expected<core::RecordField, std::error_code> parse(const rapidjson::Valu
auto element_field = parse(m.value);
if (!element_field)
return nonstd::make_unexpected(element_field.error());
- record_object[element_key] = core::BoxedRecordField{std::make_unique<core::RecordField>(std::move(*element_field))};
+ record_object.emplace(element_key, std::move(*element_field));
}
return core::RecordField{std::move(record_object)};
}
diff --git a/extensions/standard-processors/modbus/ByteConverters.h b/extensions/standard-processors/modbus/ByteConverters.h
index cc5d38e17..19166c664 100644
--- a/extensions/standard-processors/modbus/ByteConverters.h
+++ b/extensions/standard-processors/modbus/ByteConverters.h
@@ -17,6 +17,7 @@
*/
#pragma once
+#include <algorithm>
#include <array>
#include <cstdint>
#include <span>
diff --git a/extensions/standard-processors/tests/unit/PutTCPTests.cpp b/extensions/standard-processors/tests/unit/PutTCPTests.cpp
index 8f9dd7528..469a1a728 100644
--- a/extensions/standard-processors/tests/unit/PutTCPTests.cpp
+++ b/extensions/standard-processors/tests/unit/PutTCPTests.cpp
@@ -50,7 +50,7 @@ class CancellableTcpServer : public utils::net::TcpServer {
void cancelEverything() {
for (auto& timer : cancellable_timers_)
- io_context_.post([=]{timer->cancel();});
+ asio::post(io_context_, [=]{timer->cancel();});
}
asio::awaitable<void> doReceive() override {
diff --git a/extensions/standard-processors/tests/unit/RecordSetTests.cpp b/extensions/standard-processors/tests/unit/RecordSetTests.cpp
index e33822b42..7d1db9994 100644
--- a/extensions/standard-processors/tests/unit/RecordSetTests.cpp
+++ b/extensions/standard-processors/tests/unit/RecordSetTests.cpp
@@ -74,8 +74,8 @@ TEST_CASE("Test JSON serialization of a RecordField") {
}
{
minifi::core::RecordObject obj;
- obj.emplace("key1", std::make_unique<minifi::core::RecordField>(1));
- obj.emplace("key2", std::make_unique<minifi::core::RecordField>(std::string("hello")));
+ obj.emplace("key1", minifi::core::RecordField(1));
+ obj.emplace("key2", core::RecordField(std::string("hello")));
minifi::core::RecordField field{std::move(obj)};
rapidjson::Document doc;
auto value = field.toJson(doc.GetAllocator());
@@ -114,11 +114,11 @@ TEST_CASE("Test JSON serialization of a Record") {
record.emplace("key6", minifi::core::RecordField{std::move(arr)});
minifi::core::RecordObject subobj;
- subobj.emplace("subkey3", std::make_unique<minifi::core::RecordField>(1));
- subobj.emplace("subkey4", std::make_unique<minifi::core::RecordField>(std::string("subhello")));
+ subobj.emplace("subkey3", core::RecordField(1));
+ subobj.emplace("subkey4", core::RecordField(std::string("subhello")));
minifi::core::RecordObject obj;
- obj.emplace("subkey1", std::make_unique<minifi::core::RecordField>(-2));
- obj.emplace("subkey2", std::make_unique<minifi::core::RecordField>(std::move(subobj)));
+ obj.emplace("subkey1", core::RecordField(-2));
+ obj.emplace("subkey2", core::RecordField(std::move(subobj)));
record.emplace("key7", minifi::core::RecordField{std::move(obj)});
rapidjson::Document doc = record.toJson();
@@ -160,8 +160,8 @@ TEST_CASE("Test Record deserialization from JSON") {
CHECK(record.at("time_point") == minifi::core::RecordField{test_time});
minifi::core::RecordObject subobj;
- subobj.emplace("number2", std::make_unique<minifi::core::RecordField>(2));
- subobj.emplace("message", std::make_unique<minifi::core::RecordField>(std::string("mymessage")));
+ subobj.emplace("number2", core::RecordField(2));
+ subobj.emplace("message", core::RecordField(std::string("mymessage")));
minifi::core::RecordField obj_field{std::move(subobj)};
CHECK(record.at("obj") == obj_field);
diff --git a/libminifi/src/core/RecordField.cpp b/libminifi/src/core/RecordField.cpp
index bbc6c2a40..8c88ff8c6 100644
--- a/libminifi/src/core/RecordField.cpp
+++ b/libminifi/src/core/RecordField.cpp
@@ -51,11 +51,11 @@ rapidjson::Value RecordField::toJson(rapidjson::Document::AllocatorType& allocat
},
[&value, &allocator](const RecordObject& obj) {
value.SetObject();
- for (const auto& [key, boxed_field] : obj) {
+ for (const auto& [key, field] : obj) {
rapidjson::Value keyValue;
keyValue.SetString(key.c_str(), allocator);
- rapidjson::Value fieldValue = boxed_field.field->toJson(allocator);
+ rapidjson::Value fieldValue = field.toJson(allocator);
value.AddMember(keyValue, fieldValue, allocator);
}
}
@@ -88,7 +88,7 @@ RecordField RecordField::fromJson(const rapidjson::Value& value) {
} else if (value.IsObject()) {
RecordObject obj;
for (const auto& member : value.GetObject()) {
- obj.emplace(member.name.GetString(), BoxedRecordField{std::make_unique<RecordField>(RecordField::fromJson(member.value))});
+ obj.emplace(member.name.GetString(), RecordField::fromJson(member.value));
}
return RecordField{std::move(obj)};
} else {
diff --git a/libminifi/src/core/flow/StructuredConfiguration.cpp b/libminifi/src/core/flow/StructuredConfiguration.cpp
index cb5a696bb..112f92ff4 100644
--- a/libminifi/src/core/flow/StructuredConfiguration.cpp
+++ b/libminifi/src/core/flow/StructuredConfiguration.cpp
@@ -276,7 +276,7 @@ void StructuredConfiguration::parseParameterContextInheritance(const Node& param
auto inherited_parameters_node = parameter_context_node[schema_.inherited_parameter_contexts];
for (const auto& inherited_parameter_context_name : inherited_parameters_node) {
auto name = inherited_parameter_context_name.getString().value();
- if (parameter_contexts_.find(name) == parameter_contexts_.end()) {
+ if (!parameter_contexts_.contains(name)) {
throw std::invalid_argument("Inherited parameter context '" + name + "' does not exist!");
}
@@ -879,7 +879,7 @@ void StructuredConfiguration::parseSingleProperty(const std::string& property_na
ParameterContext* parameter_context) {
auto my_prop = component.getSupportedProperty(property_name);
const bool is_sensitive = my_prop ? my_prop->isSensitive() : false;
- const std::optional<std::string_view> default_value = my_prop ? my_prop->getDefaultValue() : std::nullopt;
+ const std::optional<std::string> default_value = my_prop ? my_prop->getDefaultValue() : std::nullopt;
const auto value_to_set = getReplacedParametersValueOrDefault(property_name, is_sensitive, default_value, property_value_node, parameter_context);
if (!value_to_set) {
@@ -994,7 +994,7 @@ void StructuredConfiguration::parseParameterContext(const flow::Node& node, core
return;
}
- if (parameter_contexts_.find(parameter_context_name) != parameter_contexts_.end()) {
+ if (parameter_contexts_.contains(parameter_context_name)) {
parent.setParameterContext(parameter_contexts_.at(parameter_context_name).get());
}
}
diff --git a/libminifi/test/libtest/unit/TestRecord.h b/libminifi/test/libtest/unit/TestRecord.h
index 9b88f347f..64dcd7de6 100644
--- a/libminifi/test/libtest/unit/TestRecord.h
+++ b/libminifi/test/libtest/unit/TestRecord.h
@@ -44,9 +44,9 @@ inline Record createSampleRecord2(const bool stringify = false) {
qux.emplace_back('z');
RecordObject quux;
- quux["Apfel"] = BoxedRecordField{std::make_unique<RecordField>(std::string{"pomme"})};
- quux["Birne"] = BoxedRecordField{std::make_unique<RecordField>(std::string{"poire"})};
- quux["Aprikose"] = BoxedRecordField{std::make_unique<RecordField>(std::string{"abricot"})};
+ quux.emplace("Apfel", RecordField(std::string{"pomme"}));
+ quux.emplace("Birne", RecordField(std::string{"poire"}));
+ quux.emplace("Aprikose", RecordField(std::string{"abricot"}));
RecordArray corge;
corge.emplace_back(false);
@@ -78,9 +78,9 @@ inline Record createSampleRecord(const bool stringify = false) {
qux.emplace_back('b');
qux.emplace_back('c');
RecordObject quux;
- quux["Apfel"] = BoxedRecordField{std::make_unique<RecordField>(std::string{"apple"})};
- quux["Birne"] = BoxedRecordField{std::make_unique<RecordField>(std::string{"pear"})};
- quux["Aprikose"] = BoxedRecordField{std::make_unique<RecordField>(std::string{"apricot"})};
+ quux.emplace("Apfel", RecordField(std::string{"apple"}));
+ quux.emplace("Birne", RecordField(std::string{"pear"}));
+ quux.emplace("Aprikose", RecordField(std::string{"apricot"}));
RecordArray corge;
corge.emplace_back(true);
diff --git a/libminifi/test/unit/ExpectedTest.cpp b/libminifi/test/unit/ExpectedTest.cpp
index 5d123c757..f41fe658c 100644
--- a/libminifi/test/unit/ExpectedTest.cpp
+++ b/libminifi/test/unit/ExpectedTest.cpp
@@ -22,9 +22,12 @@
#include "unit/Catch.h"
#include "utils/expected.h"
#include "utils/gsl.h"
+#include "unit/TestUtils.h"
namespace utils = org::apache::nifi::minifi::utils;
+using org::apache::nifi::minifi::test::utils::ExceptionSubStringMatcher;
+
// shamelessly copied from https://github.com/TartanLlama/expected/blob/master/tests/extensions.cpp (License: CC0)
TEST_CASE("expected transform", "[expected][transform]") {
auto mul2 = [](int a) { return a * 2; };
@@ -156,7 +159,7 @@ TEST_CASE("expected transform", "[expected][transform]") {
nonstd::expected<int, int> e(42);
auto ret = e | utils::transform([](int& i) -> int& { return i; });
REQUIRE(ret);
- REQUIRE(ret == 42);
+ REQUIRE(*ret == 42);
}
}
@@ -341,7 +344,7 @@ TEST_CASE("expected orElse", "[expected][orElse]") {
nonstd::expected<int, int> e = 21;
auto ret = std::move(e) | utils::orElse(fail);
REQUIRE(ret);
- REQUIRE(ret == 21);
+ REQUIRE(*ret == 21);
}
@@ -349,7 +352,7 @@ TEST_CASE("expected orElse", "[expected][orElse]") {
nonstd::expected<int, eptr> e = 21;
auto ret = std::move(e) | utils::orElse(efail);
REQUIRE(ret);
- REQUIRE(ret == 21);
+ REQUIRE(*ret == 21);
}
{
@@ -473,7 +476,10 @@ TEST_CASE("expected valueOrElse", "[expected][valueOrElse]") {
REQUIRE(gsl::narrow<int>("hello"sv.size()) == (ex | utils::valueOrElse([](const std::string& err) { return gsl::narrow<int>(err.size()); })));
REQUIRE_THROWS_AS(ex | utils::valueOrElse([](std::string){ throw std::exception(); }), std::exception); // NOLINT(performance-unnecessary-value-param)
REQUIRE_THROWS_AS(ex | utils::valueOrElse([](const std::string&) -> int { throw std::exception(); }), std::exception);
- REQUIRE_THROWS_WITH(std::move(ex) | utils::valueOrElse([](std::string&& error) -> int { throw std::runtime_error(error); }), "hello");
+ REQUIRE_THROWS_MATCHES(
+ std::move(ex) | utils::valueOrElse([](std::string&& error) -> int { const auto err = std::move(error); throw std::runtime_error(err); }),
+ std::runtime_error,
+ ExceptionSubStringMatcher<std::runtime_error>({"hello"}));
}
TEST_CASE("expected transformError", "[expected][transformError]") {
@@ -558,6 +564,16 @@ TEST_CASE("expected orThrow") {
nonstd::expected<int, std::string> unexpected{nonstd::unexpect, "hello"};
nonstd::expected<int, std::string> expected{5};
- REQUIRE_THROWS_WITH(std::move(unexpected) | utils::orThrow("should throw"), "should throw, but got hello");
+
+ REQUIRE_THROWS_MATCHES(std::move(unexpected) | utils::orThrow("should throw"),
+ std::runtime_error,
+ ExceptionSubStringMatcher<std::runtime_error>({"should throw, but got hello"}));
CHECK((expected | utils::orThrow("should be 5")) == 5);
}
+
+TEST_CASE("This fails to compile with std::expected on GCC 15.1 due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119714") {
+ nonstd::expected<int, std::string> a;
+ nonstd::expected<int, std::string> b;
+
+ CHECK(a == b);
+}
diff --git a/libminifi/test/unit/NetUtilsTest.cpp b/libminifi/test/unit/NetUtilsTest.cpp
index 3d2cfd9d4..c01611fac 100644
--- a/libminifi/test/unit/NetUtilsTest.cpp
+++ b/libminifi/test/unit/NetUtilsTest.cpp
@@ -33,13 +33,13 @@ TEST_CASE("net::reverseDnsLookup", "[net][dns][reverseDnsLookup]") {
SECTION("dns.google IPv6") {
if (minifi::test::utils::isIPv6Disabled())
SKIP("IPv6 is disabled");
- auto dns_google_hostname = net::reverseDnsLookup(asio::ip::address::from_string("2001:4860:4860::8888"));
+ auto dns_google_hostname = net::reverseDnsLookup(asio::ip::make_address("2001:4860:4860::8888"));
REQUIRE(dns_google_hostname.has_value());
CHECK(dns_google_hostname == "dns.google");
}
SECTION("dns.google IPv4") {
- auto dns_google_hostname = net::reverseDnsLookup(asio::ip::address::from_string("8.8.8.8"));
+ auto dns_google_hostname = net::reverseDnsLookup(asio::ip::make_address("8.8.8.8"));
REQUIRE(dns_google_hostname.has_value());
CHECK(dns_google_hostname == "dns.google");
}
@@ -47,13 +47,13 @@ TEST_CASE("net::reverseDnsLookup", "[net][dns][reverseDnsLookup]") {
SECTION("Unresolvable address IPv6") {
if (minifi::test::utils::isIPv6Disabled())
SKIP("IPv6 is disabled");
- auto unresolvable_hostname = net::reverseDnsLookup(asio::ip::address::from_string("2001:db8::"));
+ auto unresolvable_hostname = net::reverseDnsLookup(asio::ip::make_address("2001:db8::"));
REQUIRE(unresolvable_hostname.has_value());
CHECK(unresolvable_hostname == "2001:db8::");
}
SECTION("Unresolvable address IPv4") {
- auto unresolvable_hostname = net::reverseDnsLookup(asio::ip::address::from_string("192.0.2.0"));
+ auto unresolvable_hostname = net::reverseDnsLookup(asio::ip::make_address("192.0.2.0"));
REQUIRE(unresolvable_hostname.has_value());
CHECK(unresolvable_hostname == "192.0.2.0");
}
@@ -96,8 +96,8 @@ TEST_CASE("utils::net::getSslContext") {
REQUIRE_NOTHROW(plan->finalize());
auto ssl_context = utils::net::getSslContext(*ssl_context_service);
asio::error_code verification_error;
- ssl_context.set_verify_mode(asio::ssl::verify_peer, verification_error);
- CHECK(!verification_error);
+ CHECK_FALSE(ssl_context.set_verify_mode(asio::ssl::verify_peer, verification_error));
+ CHECK_FALSE(verification_error);
}
TEST_CASE("utils::net::getSslContext passphrase problems") {
@@ -113,21 +113,29 @@ TEST_CASE("utils::net::getSslContext passphrase problems") {
REQUIRE(ssl_context_service->setProperty(minifi::controllers::SSLContextService::ClientCertificate.name, (cert_dir / "alice_by_A.pem").string()));
REQUIRE(ssl_context_service->setProperty(minifi::controllers::SSLContextService::PrivateKey.name, (cert_dir / "alice_encrypted.key").string()));
+ using minifi::test::utils::ExceptionSubStringMatcher;
+
SECTION("Missing passphrase") {
REQUIRE_NOTHROW(plan->finalize());
- REQUIRE_THROWS_WITH(utils::net::getSslContext(*ssl_context_service), "use_private_key_file: bad decrypt (Provider routines)");
+ REQUIRE_THROWS_MATCHES(utils::net::getSslContext(*ssl_context_service),
+ std::runtime_error,
+ ExceptionSubStringMatcher<std::runtime_error>({"use_private_key_file: bad decrypt (Provider routines)"}));
}
SECTION("Invalid passphrase") {
REQUIRE(ssl_context_service->setProperty(minifi::controllers::SSLContextService::Passphrase.name, "not_the_correct_passphrase"));
REQUIRE_NOTHROW(plan->finalize());
- REQUIRE_THROWS_WITH(utils::net::getSslContext(*ssl_context_service), "use_private_key_file: bad decrypt (Provider routines)");
+ REQUIRE_THROWS_MATCHES(utils::net::getSslContext(*ssl_context_service),
+ std::runtime_error,
+ ExceptionSubStringMatcher<std::runtime_error>({"use_private_key_file: bad decrypt (Provider routines)"}));
}
SECTION("Invalid passphrase file") {
REQUIRE(ssl_context_service->setProperty(minifi::controllers::SSLContextService::Passphrase.name, (cert_dir / "alice_by_B.pem").string()));
REQUIRE_NOTHROW(plan->finalize());
- REQUIRE_THROWS_WITH(utils::net::getSslContext(*ssl_context_service), "use_private_key_file: bad decrypt (Provider routines)");
+ REQUIRE_THROWS_MATCHES(utils::net::getSslContext(*ssl_context_service),
+ std::runtime_error,
+ ExceptionSubStringMatcher<std::runtime_error>({"use_private_key_file: bad decrypt (Provider routines)"}));
}
}
@@ -146,6 +154,6 @@ TEST_CASE("utils::net::getSslContext missing CA") {
REQUIRE_NOTHROW(plan->finalize());
auto ssl_context = utils::net::getSslContext(*ssl_context_service);
asio::error_code verification_error;
- ssl_context.set_verify_mode(asio::ssl::verify_peer, verification_error);
- CHECK(!verification_error);
+ CHECK_FALSE(ssl_context.set_verify_mode(asio::ssl::verify_peer, verification_error));
+ CHECK_FALSE(verification_error);
}
diff --git a/minifi-api/include/minifi-cpp/core/RecordField.h b/minifi-api/include/minifi-cpp/core/RecordField.h
index ca6bf2e71..bde55b695 100644
--- a/minifi-api/include/minifi-cpp/core/RecordField.h
+++ b/minifi-api/include/minifi-cpp/core/RecordField.h
@@ -30,26 +30,8 @@ namespace org::apache::nifi::minifi::core {
struct RecordField;
-struct BoxedRecordField {
- BoxedRecordField() = default;
- BoxedRecordField(const BoxedRecordField&) = delete;
- BoxedRecordField(BoxedRecordField&& rhs) noexcept : field(std::move(rhs.field)) {}
- BoxedRecordField& operator=(const BoxedRecordField&) = delete;
- BoxedRecordField& operator=(BoxedRecordField&& rhs) noexcept {
- field = std::move(rhs.field);
- return *this;
- };
- ~BoxedRecordField() = default;
-
- explicit BoxedRecordField(std::unique_ptr<RecordField>&& _field) : field(std::move(_field)) {}
- bool operator==(const BoxedRecordField&) const;
- std::unique_ptr<RecordField> field = nullptr;
-};
-
-
using RecordArray = std::vector<RecordField>;
-
-using RecordObject = std::unordered_map<std::string, BoxedRecordField>;
+using RecordObject = std::unordered_map<std::string, RecordField>;
template<typename T>
concept Float = std::is_floating_point_v<T>;
@@ -87,10 +69,4 @@ struct RecordField {
std::variant<std::string, int64_t, uint64_t, double, bool, std::chrono::system_clock::time_point, RecordArray, RecordObject> value_;
};
-inline bool BoxedRecordField::operator==(const BoxedRecordField& rhs) const {
- if (!field || !rhs.field)
- return field == rhs.field;
- return *field == *rhs.field;
-}
-
} // namespace org::apache::nifi::minifi::core
diff --git a/minifi-api/include/minifi-cpp/utils/Literals.h b/minifi-api/include/minifi-cpp/utils/Literals.h
index 9b47b8afe..4736f2c20 100644
--- a/minifi-api/include/minifi-cpp/utils/Literals.h
+++ b/minifi-api/include/minifi-cpp/utils/Literals.h
@@ -18,42 +18,44 @@
#pragma once
-constexpr unsigned long long operator "" _KiB(unsigned long long n) { // NOLINT
+#include <cstdint>
+
+constexpr uint64_t operator""_KiB(const unsigned long long n) { // NOLINT(runtime/int)
return 1024 * n;
}
-constexpr unsigned long long operator "" _MiB(unsigned long long n) { // NOLINT
+constexpr uint64_t operator""_MiB(const unsigned long long n) { // NOLINT(runtime/int)
return 1024_KiB * n;
}
-constexpr unsigned long long operator "" _GiB(unsigned long long n) { // NOLINT
+constexpr uint64_t operator""_GiB(const unsigned long long n) { // NOLINT(runtime/int)
return 1024_MiB * n;
}
-constexpr unsigned long long operator "" _TiB(unsigned long long n) { // NOLINT
+constexpr uint64_t operator""_TiB(const unsigned long long n) { // NOLINT(runtime/int)
return 1024_GiB * n;
}
-constexpr unsigned long long operator "" _PiB(unsigned long long n) { // NOLINT
+constexpr uint64_t operator""_PiB(const unsigned long long n) { // NOLINT(runtime/int)
return 1024_TiB * n;
}
-constexpr unsigned long long operator "" _KB(unsigned long long n) { // NOLINT
+constexpr uint64_t operator""_KB(const unsigned long long n) { // NOLINT(runtime/int)
return 1000 * n;
}
-constexpr unsigned long long operator "" _MB(unsigned long long n) { // NOLINT
+constexpr uint64_t operator""_MB(const unsigned long long n) { // NOLINT(runtime/int)
return 1000_KB * n;
}
-constexpr unsigned long long operator "" _GB(unsigned long long n) { // NOLINT
+constexpr uint64_t operator""_GB(const unsigned long long n) { // NOLINT(runtime/int)
return 1000_MB * n;
}
-constexpr unsigned long long operator "" _TB(unsigned long long n) { // NOLINT
+constexpr uint64_t operator""_TB(const unsigned long long n) { // NOLINT(runtime/int)
return 1000_GB * n;
}
-constexpr unsigned long long operator "" _PB(unsigned long long n) { // NOLINT
+constexpr uint64_t operator""_PB(const unsigned long long n) { // NOLINT(runtime/int)
return 1000_TB * n;
}
diff --git a/run_clang_tidy.sh b/run_clang_tidy.sh
index f5dd0603e..83a4d75fd 100755
--- a/run_clang_tidy.sh
+++ b/run_clang_tidy.sh
@@ -27,4 +27,4 @@ if ! [[ -f "${FILE}" ]]; then
exit 0
fi
-clang-tidy-16 -warnings-as-errors=* -quiet -p build "$FILE"
+clang-tidy-20 -warnings-as-errors=* -quiet -p build "$FILE"
diff --git a/thirdparty/aws-sdk-cpp/fix-deprecated-literal-operator.patch b/thirdparty/aws-sdk-cpp/fix-deprecated-literal-operator.patch
new file mode 100644
index 000000000..e481ad86f
--- /dev/null
+++ b/thirdparty/aws-sdk-cpp/fix-deprecated-literal-operator.patch
@@ -0,0 +1,31 @@
+diff --git a/include/aws/crt/StringView.h b/include/aws/crt/StringView.h
+index 3b6dc2f..d89c8fc 100644
+--- a/crt/aws-crt-cpp/include/aws/crt/StringView.h
++++ b/crt/aws-crt-cpp/include/aws/crt/StringView.h
+@@ -820,22 +820,22 @@ namespace Aws
+ {
+ inline namespace string_view_literals
+ {
+- inline basic_string_view<char> operator"" _sv(const char *s, size_t length) noexcept
++ inline basic_string_view<char> operator""_sv(const char *s, size_t length) noexcept
+ {
+ return basic_string_view<char>(s, length);
+ }
+
+- inline basic_string_view<wchar_t> operator"" _sv(const wchar_t * s, size_t length) noexcept
++ inline basic_string_view<wchar_t> operator""_sv(const wchar_t * s, size_t length) noexcept
+ {
+ return basic_string_view<wchar_t>(s, length);
+ }
+
+- inline basic_string_view<char16_t> operator"" _sv(const char16_t *s, size_t length) noexcept
++ inline basic_string_view<char16_t> operator""_sv(const char16_t *s, size_t length) noexcept
+ {
+ return basic_string_view<char16_t>(s, length);
+ }
+
+- inline basic_string_view<char32_t> operator"" _sv(const char32_t *s, size_t length) noexcept
++ inline basic_string_view<char32_t> operator""_sv(const char32_t *s, size_t length) noexcept
+ {
+ return basic_string_view<char32_t>(s, length);
+ }
diff --git a/thirdparty/azure-sdk-cpp/include-cinttypes-for-uint8_t-gcc15-fix.patch b/thirdparty/azure-sdk-cpp/include-cinttypes-for-uint8_t-gcc15-fix.patch
new file mode 100644
index 000000000..a8ec23c1f
--- /dev/null
+++ b/thirdparty/azure-sdk-cpp/include-cinttypes-for-uint8_t-gcc15-fix.patch
@@ -0,0 +1,24 @@
+From e359881035c25309813a79319c14a32dc230d131 Mon Sep 17 00:00:00 2001
+From: Martin Zink <ma...@apache.org>
+Date: Tue, 19 Aug 2025 15:28:50 +0200
+Subject: [PATCH 1/1] include cinttypes for uint8_t (gcc15 fix)
+
+---
+ .../azure-security-attestation/src/private/crypto/inc/crypto.hpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/sdk/attestation/azure-security-attestation/src/private/crypto/inc/crypto.hpp b/sdk/attestation/azure-security-attestation/src/private/crypto/inc/crypto.hpp
+index 9a98f204e..95260d243 100644
+--- a/sdk/attestation/azure-security-attestation/src/private/crypto/inc/crypto.hpp
++++ b/sdk/attestation/azure-security-attestation/src/private/crypto/inc/crypto.hpp
+@@ -6,6 +6,7 @@
+ #include <memory>
+ #include <string>
+ #include <vector>
++#include <cinttypes>
+
+ namespace Azure { namespace Security { namespace Attestation { namespace _detail {
+ /**
+--
+2.50.1
+
diff --git a/thirdparty/bustache/fix-deprecated-literal-operator.patch b/thirdparty/bustache/fix-deprecated-literal-operator.patch
new file mode 100644
index 000000000..c0d75dccf
--- /dev/null
+++ b/thirdparty/bustache/fix-deprecated-literal-operator.patch
@@ -0,0 +1,19 @@
+diff --git a/include/bustache/format.hpp b/include/bustache/format.hpp
+index 77ecac5..395ac38 100644
+--- a/include/bustache/format.hpp
++++ b/include/bustache/format.hpp
+@@ -147,11 +147,11 @@ namespace bustache
+
+ inline namespace literals
+ {
+- inline format operator"" _fmt(char const* str, std::size_t n)
++ inline format operator""_fmt(char const* str, std::size_t n)
+ {
+ return format(std::string_view(str, n));
+ }
+ }
+ }
+
+-#endif
+\ No newline at end of file
++#endif
diff --git a/thirdparty/couchbase/c++23_fixes.patch b/thirdparty/couchbase/c++23_fixes.patch
new file mode 100644
index 000000000..92946f3a1
--- /dev/null
+++ b/thirdparty/couchbase/c++23_fixes.patch
@@ -0,0 +1,78 @@
+Subject: [PATCH] c++23 fixes (replace forward declaration with includes due to stricter behaviour with unique_ptr + incomplete types)
+---
+Index: couchbase/numeric_range_facet_result.hxx
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/couchbase/numeric_range_facet_result.hxx b/couchbase/numeric_range_facet_result.hxx
+--- a/couchbase/numeric_range_facet_result.hxx (revision 51f4775e56fb9ba975f92d7791d4d9feca336f05)
++++ b/couchbase/numeric_range_facet_result.hxx (date 1747839882124)
+@@ -19,15 +19,13 @@
+
+ #include <couchbase/search_facet_result.hxx>
+ #include <couchbase/search_numeric_range.hxx>
++#include <core/impl/internal_numeric_range_facet_result.hxx>
+
+ #include <string>
+ #include <vector>
+
+ namespace couchbase
+ {
+-#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
+-class internal_numeric_range_facet_result;
+-#endif
+
+ /**
+ * @since 1.0.0
+Index: couchbase/term_facet_result.hxx
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/couchbase/term_facet_result.hxx b/couchbase/term_facet_result.hxx
+--- a/couchbase/term_facet_result.hxx (revision 51f4775e56fb9ba975f92d7791d4d9feca336f05)
++++ b/couchbase/term_facet_result.hxx (date 1747839742361)
+@@ -19,15 +19,13 @@
+
+ #include <couchbase/search_facet_result.hxx>
+ #include <couchbase/search_term_range.hxx>
++#include <core/impl/internal_term_facet_result.hxx>
+
+ #include <string>
+ #include <vector>
+
+ namespace couchbase
+ {
+-#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
+-class internal_term_facet_result;
+-#endif
+
+ /**
+ * @since 1.0.0
+Index: couchbase/date_range_facet_result.hxx
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/couchbase/date_range_facet_result.hxx b/couchbase/date_range_facet_result.hxx
+--- a/couchbase/date_range_facet_result.hxx (revision 51f4775e56fb9ba975f92d7791d4d9feca336f05)
++++ b/couchbase/date_range_facet_result.hxx (date 1747839803545)
+@@ -19,6 +19,7 @@
+
+ #include <couchbase/search_date_range.hxx>
+ #include <couchbase/search_facet_result.hxx>
++#include <core/impl/internal_date_range_facet_result.hxx>
+
+ #include <memory>
+ #include <string>
+@@ -26,9 +27,6 @@
+
+ namespace couchbase
+ {
+-#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
+-class internal_date_range_facet_result;
+-#endif
+
+ /**
+ * @since 1.0.0
diff --git a/thirdparty/couchbase/remove-thirdparty.patch b/thirdparty/couchbase/remove-thirdparty-1.0.2.patch
similarity index 100%
copy from thirdparty/couchbase/remove-thirdparty.patch
copy to thirdparty/couchbase/remove-thirdparty-1.0.2.patch
diff --git a/thirdparty/couchbase/remove-thirdparty.patch b/thirdparty/couchbase/remove-thirdparty.patch
index 732576f14..942e5fc27 100644
--- a/thirdparty/couchbase/remove-thirdparty.patch
+++ b/thirdparty/couchbase/remove-thirdparty.patch
@@ -1,10 +1,14 @@
diff --git a/cmake/ThirdPartyDependencies.cmake b/cmake/ThirdPartyDependencies.cmake
-index f02af02..f83c181 100644
+index af373ce..30cf2b6 100644
--- a/cmake/ThirdPartyDependencies.cmake
+++ b/cmake/ThirdPartyDependencies.cmake
-@@ -3,73 +3,30 @@
+@@ -1,232 +1,141 @@
+ # NOTE: This file MUST be in sync with couchbase-sdk-cxx-black-duck-manifest.yaml
+
include(cmake/CPM.cmake)
+ set(CPM_USE_LOCAL_PACKAGES OFF)
+
# https://cmake.org/cmake/help/v3.28/policy/CMP0063.html
set(CMAKE_POLICY_DEFAULT_CMP0063 NEW)
@@ -18,36 +22,13 @@ index f02af02..f83c181 100644
$<TARGET_PROPERTY:${target},INTERFACE_INCLUDE_DIRECTORIES>)
endfunction()
--if(NOT TARGET fmt::fmt)
-- # https://github.com/fmtlib/fmt/releases
-- cpmaddpackage(
-- NAME
-- fmt
-- GIT_TAG
-- 11.0.1
-- VERSION
-- 11.0.1
-- GITHUB_REPOSITORY
-- "fmtlib/fmt"
-- EXCLUDE_FROM_ALL ON
-- OPTIONS
-- "FMT_INSTALL OFF"
-- # Unicode support for MSVC enabled in CompilerWarnings.cmake
-- "FMT_UNICODE OFF"
-- "FMT_DOC OFF"
-- "BUILD_SHARED_LIBS OFF"
-- "CMAKE_C_VISIBILITY_PRESET hidden"
-- "CMAKE_CXX_VISIBILITY_PRESET hidden"
-- "CMAKE_POSITION_INDEPENDENT_CODE ON")
--endif()
--
-if(NOT TARGET spdlog::spdlog)
- # https://github.com/gabime/spdlog/releases
- cpmaddpackage(
- NAME
- spdlog
- VERSION
-- 1.14.1
+- 1.15.0
- GITHUB_REPOSITORY
- "gabime/spdlog"
- EXCLUDE_FROM_ALL ON
@@ -57,8 +38,11 @@ index f02af02..f83c181 100644
- "CMAKE_C_VISIBILITY_PRESET hidden"
- "CMAKE_CXX_VISIBILITY_PRESET hidden"
- "CMAKE_POSITION_INDEPENDENT_CODE ON"
+- "NO_CMAKE_SYSTEM_PATH ON"
+- "NO_CMAKE_INSTALL_PREFIX ON"
+- "NO_CMAKE_SYSTEM_PACKAGE_REGISTRY ON"
- "SPDLOG_BUILD_SHARED OFF"
-- "SPDLOG_FMT_EXTERNAL ON")
+- "SPDLOG_FMT_EXTERNAL OFF")
-endif()
-
if(NOT TARGET Microsoft.GSL::GSL)
@@ -76,7 +60,89 @@ index f02af02..f83c181 100644
"CMAKE_C_VISIBILITY_PRESET hidden"
"CMAKE_CXX_VISIBILITY_PRESET hidden"
"CMAKE_POSITION_INDEPENDENT_CODE ON")
-@@ -159,93 +116,24 @@ if(NOT TARGET taocpp::json)
+ endif()
+
+ if(NOT TARGET hdr_histogram_static)
+ # https://github.com/HdrHistogram/HdrHistogram_c/releases
+ cpmaddpackage(
+ NAME
+ hdr_histogram
+ GIT_TAG
+ 0.11.8
+ VERSION
+ 0.11.8
+ GITHUB_REPOSITORY
+ "HdrHistogram/HdrHistogram_c"
+ EXCLUDE_FROM_ALL ON
+ OPTIONS
+ "CMAKE_C_VISIBILITY_PRESET hidden"
+ "CMAKE_CXX_VISIBILITY_PRESET hidden"
+ "CMAKE_POSITION_INDEPENDENT_CODE ON"
+ "HDR_LOG_REQUIRED OFF"
+ "HDR_HISTOGRAM_BUILD_SHARED OFF"
+ "HDR_HISTOGRAM_BUILD_PROGRAMS OFF")
+ endif()
+
+ if(NOT TARGET llhttp::llhttp)
+ # https://github.com/nodejs/llhttp/releases
+ cpmaddpackage(
+ NAME
+ llhttp
+ GIT_TAG
+ release/v9.2.1
+ VERSION
+ 9.2.1
+ GITHUB_REPOSITORY
+ "nodejs/llhttp"
+ EXCLUDE_FROM_ALL ON
+ OPTIONS
+ "CMAKE_C_VISIBILITY_PRESET hidden"
+ "CMAKE_CXX_VISIBILITY_PRESET hidden"
+ "CMAKE_POSITION_INDEPENDENT_CODE ON"
+ "BUILD_SHARED_LIBS OFF"
+ "BUILD_STATIC_LIBS ON")
+ endif()
+
+ if(NOT TARGET snappy)
+ # https://github.com/google/snappy/releases
+ cpmaddpackage(
+ NAME
+ snappy
+ GIT_TAG
+ 1.2.2
+ VERSION
+ 1.2.2
+ GITHUB_REPOSITORY
+ "google/snappy"
+ EXCLUDE_FROM_ALL ON
+ OPTIONS
+ "SNAPPY_INSTALL OFF"
+ "CMAKE_C_VISIBILITY_PRESET hidden"
+ "CMAKE_CXX_VISIBILITY_PRESET hidden"
+ "CMAKE_POSITION_INDEPENDENT_CODE ON"
+ "BUILD_SHARED_LIBS OFF"
+ "SNAPPY_BUILD_TESTS OFF"
+ "SNAPPY_BUILD_BENCHMARKS OFF")
+ endif()
+ if(NOT MSVC)
+ # https://github.com/google/snappy/pull/156
+ target_compile_options(snappy PRIVATE -Wno-sign-compare)
+ endif()
+
+ if(NOT TARGET taocpp::json)
+ # https://github.com/taocpp/json/releases
+ cpmaddpackage(
+ NAME
+ json
+ GIT_TAG
+ 1.0.0-beta.14
+ VERSION
+ 1.0.0-beta.14
+ GITHUB_REPOSITORY
+ "taocpp/json"
+ OPTIONS
+ "CMAKE_C_VISIBILITY_PRESET hidden"
+ "CMAKE_CXX_VISIBILITY_PRESET hidden"
"CMAKE_POSITION_INDEPENDENT_CODE ON"
"BUILD_SHARED_LIBS OFF"
"PEGTL_INSTALL ${COUCHBASE_CXX_CLIENT_INSTALL}"
@@ -167,6 +233,5 @@ index f02af02..f83c181 100644
declare_system_library(hdr_histogram_static)
declare_system_library(Microsoft.GSL::GSL)
-declare_system_library(spdlog::spdlog)
--declare_system_library(fmt::fmt)
-declare_system_library(asio)
declare_system_library(taocpp::json)
diff --git a/thirdparty/google-cloud-cpp/c++23_fixes.patch b/thirdparty/google-cloud-cpp/c++23_fixes.patch
new file mode 100644
index 000000000..317d6aa71
--- /dev/null
+++ b/thirdparty/google-cloud-cpp/c++23_fixes.patch
@@ -0,0 +1,19 @@
+Subject: [PATCH] c++23 fixes
+---
+Index: google/cloud/internal/rest_parse_json_error.cc
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/google/cloud/internal/rest_parse_json_error.cc b/google/cloud/internal/rest_parse_json_error.cc
+--- a/google/cloud/internal/rest_parse_json_error.cc (revision 0c5fa4fc7f5377b420a0ec5725f334e597d841a5)
++++ b/google/cloud/internal/rest_parse_json_error.cc (date 1747841684609)
+@@ -62,7 +62,7 @@
+ if (m != v.end() && m->is_object()) {
+ for (auto const& i : m->items()) {
+ if (!i.value().is_string()) continue;
+- metadata[i.key()] = i.value();
++ metadata[i.key()] = i.value().get<std::string>();
+ }
+ }
+ metadata["http_status_code"] = std::to_string(http_status_code);
diff --git a/thirdparty/iODBC/GCC-15-needs-typedef-SQLRETURN-HPROC.patch b/thirdparty/iODBC/GCC-15-needs-typedef-SQLRETURN-HPROC.patch
new file mode 100644
index 000000000..fe025bdfc
--- /dev/null
+++ b/thirdparty/iODBC/GCC-15-needs-typedef-SQLRETURN-HPROC.patch
@@ -0,0 +1,25 @@
+From 2d9ed2ef9d1cc320df388235356574890d7046d6 Mon Sep 17 00:00:00 2001
+From: Martin Zink <ma...@apache.org>
+Date: Tue, 22 Jul 2025 13:28:10 +0200
+Subject: [PATCH] GCC 15 needs typedef SQLRETURN (* HPROC) (...);
+
+---
+ iodbc/dlproc.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/iodbc/dlproc.h b/iodbc/dlproc.h
+index be2062b..ed15754 100644
+--- a/iodbc/dlproc.h
++++ b/iodbc/dlproc.h
+@@ -80,7 +80,7 @@
+
+ #include <dlf.h>
+
+-#if defined(_MAC) || defined (__cplusplus)
++#if defined(_MAC) || defined (__cplusplus) || (defined(__GNUC__) && __GNUC__ >= 15)
+ typedef SQLRETURN (* HPROC) (...);
+ #else
+ typedef SQLRETURN (* HPROC) ();
+--
+2.50.1
+
diff --git a/thirdparty/llamacpp/cpp-23-fixes.patch b/thirdparty/llamacpp/cpp-23-fixes.patch
new file mode 100644
index 000000000..0e84e4395
--- /dev/null
+++ b/thirdparty/llamacpp/cpp-23-fixes.patch
@@ -0,0 +1,24 @@
+From 072bd8ce7e10a0fffb1e2bc755c2964e472909ed Mon Sep 17 00:00:00 2001
+From: Martin Zink <ma...@apache.org>
+Date: Tue, 22 Jul 2025 12:49:42 +0200
+Subject: [PATCH] c++23 fixes
+
+---
+ src/llama-hparams.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/llama-hparams.cpp b/src/llama-hparams.cpp
+index c6c67d26..db36de4d 100644
+--- a/src/llama-hparams.cpp
++++ b/src/llama-hparams.cpp
+@@ -1,5 +1,7 @@
+ #include "llama-hparams.h"
+
++#include <algorithm>
++
+ #include "ggml.h"
+
+ void llama_hparams::set_swa_pattern(uint32_t n_pattern) {
+--
+2.39.5 (Apple Git-154)
+
diff --git a/thirdparty/opencv/c++23_fixes.patch b/thirdparty/opencv/c++23_fixes.patch
new file mode 100644
index 000000000..93052b20f
--- /dev/null
+++ b/thirdparty/opencv/c++23_fixes.patch
@@ -0,0 +1,23 @@
+Subject: [PATCH] c++23 fixes
+---
+Index: modules/gapi/src/compiler/gislandmodel.hpp
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/modules/gapi/src/compiler/gislandmodel.hpp b/modules/gapi/src/compiler/gislandmodel.hpp
+--- a/modules/gapi/src/compiler/gislandmodel.hpp (revision 725e440d278aca07d35a5e8963ef990572b07316)
++++ b/modules/gapi/src/compiler/gislandmodel.hpp (date 1747828665540)
+@@ -8,8 +8,11 @@
+ #ifndef OPENCV_GAPI_GISLANDMODEL_HPP
+ #define OPENCV_GAPI_GISLANDMODEL_HPP
+
+-#include <unordered_set>
++#include <unordered_set> // unordered_map
+ #include <memory> // shared_ptr
++#include <exception> // exception_ptr
++#include <string> // string
++#include <cstddef> // size_t
+
+ #include <ade/graph.hpp>
+ #include <ade/typed_graph.hpp>
diff --git a/thirdparty/paho-mqtt/1576-Changed-bool-typedef-to-bit.patch b/thirdparty/paho-mqtt/1576-Changed-bool-typedef-to-bit.patch
new file mode 100644
index 000000000..d3cfa8068
--- /dev/null
+++ b/thirdparty/paho-mqtt/1576-Changed-bool-typedef-to-bit.patch
@@ -0,0 +1,96 @@
+From e4021c717f7f1623b02788216cc2a07e9556b4d0 Mon Sep 17 00:00:00 2001
+From: fpagliughi <fp...@mindspring.com>
+Date: Wed, 14 May 2025 17:56:02 -0400
+Subject: [PATCH] #1576 Changed 'bool' typedef to 'bit'
+
+---
+ src/MQTTPacket.h | 34 +++++++++++++++++-----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/src/MQTTPacket.h b/src/MQTTPacket.h
+index fd384ae..04c217e 100644
+--- a/src/MQTTPacket.h
++++ b/src/MQTTPacket.h
+@@ -28,7 +28,7 @@
+ #include "LinkedList.h"
+ #include "Clients.h"
+
+-typedef unsigned int bool;
++typedef unsigned int bit;
+ typedef void* (*pf)(int, unsigned char, char*, size_t);
+
+ #include "MQTTProperties.h"
+@@ -67,16 +67,16 @@ typedef union
+ struct
+ {
+ unsigned int type : 4; /**< message type nibble */
+- bool dup : 1; /**< DUP flag bit */
++ bit dup : 1; /**< DUP flag bit */
+ unsigned int qos : 2; /**< QoS value, 0, 1 or 2 */
+- bool retain : 1; /**< retained flag bit */
++ bit retain : 1; /**< retained flag bit */
+ } bits;
+ #else
+ struct
+ {
+- bool retain : 1; /**< retained flag bit */
++ bit retain : 1; /**< retained flag bit */
+ unsigned int qos : 2; /**< QoS value, 0, 1 or 2 */
+- bool dup : 1; /**< DUP flag bit */
++ bit dup : 1; /**< DUP flag bit */
+ unsigned int type : 4; /**< message type nibble */
+ } bits;
+ #endif
+@@ -95,24 +95,24 @@ typedef struct
+ #if defined(REVERSED)
+ struct
+ {
+- bool username : 1; /**< 3.1 user name */
+- bool password : 1; /**< 3.1 password */
+- bool willRetain : 1; /**< will retain setting */
++ bit username : 1; /**< 3.1 user name */
++ bit password : 1; /**< 3.1 password */
++ bit willRetain : 1; /**< will retain setting */
+ unsigned int willQoS : 2; /**< will QoS value */
+- bool will : 1; /**< will flag */
+- bool cleanstart : 1; /**< cleansession flag */
++ bit will : 1; /**< will flag */
++ bit cleanstart : 1; /**< cleansession flag */
+ int : 1; /**< unused */
+ } bits;
+ #else
+ struct
+ {
+ int : 1; /**< unused */
+- bool cleanstart : 1; /**< cleansession flag */
+- bool will : 1; /**< will flag */
++ bit cleanstart : 1; /**< cleansession flag */
++ bit will : 1; /**< will flag */
+ unsigned int willQoS : 2; /**< will QoS value */
+- bool willRetain : 1; /**< will retain setting */
+- bool password : 1; /**< 3.1 password */
+- bool username : 1; /**< 3.1 user name */
++ bit willRetain : 1; /**< will retain setting */
++ bit password : 1; /**< 3.1 password */
++ bit username : 1; /**< 3.1 user name */
+ } bits;
+ #endif
+ } flags; /**< connect flags byte */
+@@ -140,12 +140,12 @@ typedef struct
+ struct
+ {
+ unsigned int reserved : 7; /**< message type nibble */
+- bool sessionPresent : 1; /**< was a session found on the server? */
++ bit sessionPresent : 1; /**< was a session found on the server? */
+ } bits;
+ #else
+ struct
+ {
+- bool sessionPresent : 1; /**< was a session found on the server? */
++ bit sessionPresent : 1; /**< was a session found on the server? */
+ unsigned int reserved : 7; /**< message type nibble */
+ } bits;
+ #endif
+--
+2.39.5 (Apple Git-154)
+
diff --git a/thirdparty/ranges-v3/remove-deprecated.patch b/thirdparty/ranges-v3/remove-deprecated.patch
new file mode 100644
index 000000000..f34182a63
--- /dev/null
+++ b/thirdparty/ranges-v3/remove-deprecated.patch
@@ -0,0 +1,27 @@
+diff --git a/include/meta/meta.hpp b/include/meta/meta.hpp
+index 1372703e7..66ee2928b 100644
+--- a/include/meta/meta.hpp
++++ b/include/meta/meta.hpp
+@@ -3776,7 +3776,7 @@ namespace meta
+ /// \ingroup integral
+ template <char... Chs>
+ constexpr fold<list<char_<Chs>...>, meta::size_t<0>, quote<detail::atoi_>>
+- operator"" _z()
++ operator""_z()
+ {
+ return {};
+ }
+diff --git a/include/range/v3/utility/compressed_pair.hpp b/include/range/v3/utility/compressed_pair.hpp
+index 438d12f0d..a9590b4bd 100644
+--- a/include/range/v3/utility/compressed_pair.hpp
++++ b/include/range/v3/utility/compressed_pair.hpp
+@@ -92,8 +92,7 @@ namespace ranges
+ };
+
+ template<typename... Ts>
+- using compressed_tuple RANGES_DEPRECATED(
+- "ranges::compressed_tuple is deprecated.") =
++ using compressed_tuple =
+ compressed_tuple_<meta::list<Ts...>,
+ meta::make_index_sequence<sizeof...(Ts)>>;
+ } // namespace compressed_tuple_detail
diff --git a/thirdparty/rocksdb/all/patches/arm7.patch b/thirdparty/rocksdb/all/patches/arm7.patch
deleted file mode 100644
index 1eb64ed5c..000000000
--- a/thirdparty/rocksdb/all/patches/arm7.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
-index 225e3fa72..cd5f935f1 100644
---- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
-+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
-@@ -131,6 +131,10 @@ static inline tokutime_t toku_time_now(void) {
- uint64_t result;
- __asm __volatile__("mrs %[rt], cntvct_el0" : [ rt ] "=r"(result));
- return result;
-+#elif defined(__arm__)
-+ uint32_t lo, hi;
-+ __asm __volatile__("mrrc p15, 1, %[lo], %[hi], c14" : [ lo ] "=r" (lo), [hi] "=r" (hi));
-+ return (uint64_t)hi << 32 | lo;
- #elif defined(__powerpc__)
- return __ppc_get_timebase();
- #elif defined(__s390x__)
diff --git a/thirdparty/rocksdb/all/patches/c++23_fixes.patch b/thirdparty/rocksdb/all/patches/c++23_fixes.patch
new file mode 100644
index 000000000..a3349c8fc
--- /dev/null
+++ b/thirdparty/rocksdb/all/patches/c++23_fixes.patch
@@ -0,0 +1,641 @@
+Subject: [PATCH] C++23 fixes
+---
+Index: table/block_based/block_based_table_builder.cc
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/table/block_based/block_based_table_builder.cc b/table/block_based/block_based_table_builder.cc
+--- a/table/block_based/block_based_table_builder.cc (revision 4b2122578e475cb88aef4dcf152cccd5dbf51060)
++++ b/table/block_based/block_based_table_builder.cc (date 1747822597282)
+@@ -268,6 +268,315 @@
+ bool decoupled_partitioned_filters_;
+ };
+
++struct BlockBasedTableBuilder::ParallelCompressionRep {
++ // TODO: consider replacing with autovector or similar
++ // Keys is a wrapper of vector of strings avoiding
++ // releasing string memories during vector clear()
++ // in order to save memory allocation overhead
++ class Keys {
++ public:
++ Keys() : keys_(kKeysInitSize), size_(0) {}
++ void PushBack(const Slice& key) {
++ if (size_ == keys_.size()) {
++ keys_.emplace_back(key.data(), key.size());
++ } else {
++ keys_[size_].assign(key.data(), key.size());
++ }
++ size_++;
++ }
++ void SwapAssign(std::vector<std::string>& keys) {
++ size_ = keys.size();
++ std::swap(keys_, keys);
++ }
++ void Clear() { size_ = 0; }
++ size_t Size() { return size_; }
++ std::string& Back() { return keys_[size_ - 1]; }
++ std::string& operator[](size_t idx) {
++ assert(idx < size_);
++ return keys_[idx];
++ }
++
++ private:
++ const size_t kKeysInitSize = 32;
++ std::vector<std::string> keys_;
++ size_t size_;
++ };
++ std::unique_ptr<Keys> curr_block_keys;
++
++ class BlockRepSlot;
++
++ // BlockRep instances are fetched from and recycled to
++ // block_rep_pool during parallel compression.
++ struct BlockRep {
++ Slice contents;
++ Slice compressed_contents;
++ std::unique_ptr<std::string> data;
++ std::unique_ptr<std::string> compressed_data;
++ CompressionType compression_type;
++ std::unique_ptr<std::string> first_key_in_next_block;
++ std::unique_ptr<Keys> keys;
++ std::unique_ptr<BlockRepSlot> slot;
++ Status status;
++ };
++ // Use a vector of BlockRep as a buffer for a determined number
++ // of BlockRep structures. All data referenced by pointers in
++ // BlockRep will be freed when this vector is destructed.
++ using BlockRepBuffer = std::vector<BlockRep>;
++ BlockRepBuffer block_rep_buf;
++ // Use a thread-safe queue for concurrent access from block
++ // building thread and writer thread.
++ using BlockRepPool = WorkQueue<BlockRep*>;
++ BlockRepPool block_rep_pool;
++
++ // Use BlockRepSlot to keep block order in write thread.
++ // slot_ will pass references to BlockRep
++ class BlockRepSlot {
++ public:
++ BlockRepSlot() : slot_(1) {}
++ template <typename T>
++ void Fill(T&& rep) {
++ slot_.push(std::forward<T>(rep));
++ }
++ void Take(BlockRep*& rep) { slot_.pop(rep); }
++
++ private:
++ // slot_ will pass references to BlockRep in block_rep_buf,
++ // and those references are always valid before the destruction of
++ // block_rep_buf.
++ WorkQueue<BlockRep*> slot_;
++ };
++
++ // Compression queue will pass references to BlockRep in block_rep_buf,
++ // and those references are always valid before the destruction of
++ // block_rep_buf.
++ using CompressQueue = WorkQueue<BlockRep*>;
++ CompressQueue compress_queue;
++ std::vector<port::Thread> compress_thread_pool;
++
++ // Write queue will pass references to BlockRep::slot in block_rep_buf,
++ // and those references are always valid before the corresponding
++ // BlockRep::slot is destructed, which is before the destruction of
++ // block_rep_buf.
++ using WriteQueue = WorkQueue<BlockRepSlot*>;
++ WriteQueue write_queue;
++ std::unique_ptr<port::Thread> write_thread;
++
++ // Estimate output file size when parallel compression is enabled. This is
++ // necessary because compression & flush are no longer synchronized,
++ // and BlockBasedTableBuilder::FileSize() is no longer accurate.
++ // memory_order_relaxed suffices because accurate statistics is not required.
++ class FileSizeEstimator {
++ public:
++ explicit FileSizeEstimator()
++ : uncomp_bytes_compressed(0),
++ uncomp_bytes_curr_block(0),
++ uncomp_bytes_curr_block_set(false),
++ uncomp_bytes_inflight(0),
++ blocks_inflight(0),
++ curr_compression_ratio(0),
++ estimated_file_size(0) {}
++
++ // Estimate file size when a block is about to be emitted to
++ // compression thread
++ void EmitBlock(uint64_t uncomp_block_size, uint64_t curr_file_size) {
++ uint64_t new_uncomp_bytes_inflight =
++ uncomp_bytes_inflight.fetch_add(uncomp_block_size,
++ std::memory_order_relaxed) +
++ uncomp_block_size;
++
++ uint64_t new_blocks_inflight =
++ blocks_inflight.fetch_add(1, std::memory_order_relaxed) + 1;
++
++ estimated_file_size.store(
++ curr_file_size +
++ static_cast<uint64_t>(
++ static_cast<double>(new_uncomp_bytes_inflight) *
++ curr_compression_ratio.load(std::memory_order_relaxed)) +
++ new_blocks_inflight * kBlockTrailerSize,
++ std::memory_order_relaxed);
++ }
++
++ // Estimate file size when a block is already reaped from
++ // compression thread
++ void ReapBlock(uint64_t compressed_block_size, uint64_t curr_file_size) {
++ assert(uncomp_bytes_curr_block_set);
++
++ uint64_t new_uncomp_bytes_compressed =
++ uncomp_bytes_compressed + uncomp_bytes_curr_block;
++ assert(new_uncomp_bytes_compressed > 0);
++
++ curr_compression_ratio.store(
++ (curr_compression_ratio.load(std::memory_order_relaxed) *
++ uncomp_bytes_compressed +
++ compressed_block_size) /
++ static_cast<double>(new_uncomp_bytes_compressed),
++ std::memory_order_relaxed);
++ uncomp_bytes_compressed = new_uncomp_bytes_compressed;
++
++ uint64_t new_uncomp_bytes_inflight =
++ uncomp_bytes_inflight.fetch_sub(uncomp_bytes_curr_block,
++ std::memory_order_relaxed) -
++ uncomp_bytes_curr_block;
++
++ uint64_t new_blocks_inflight =
++ blocks_inflight.fetch_sub(1, std::memory_order_relaxed) - 1;
++
++ estimated_file_size.store(
++ curr_file_size +
++ static_cast<uint64_t>(
++ static_cast<double>(new_uncomp_bytes_inflight) *
++ curr_compression_ratio.load(std::memory_order_relaxed)) +
++ new_blocks_inflight * kBlockTrailerSize,
++ std::memory_order_relaxed);
++
++ uncomp_bytes_curr_block_set = false;
++ }
++
++ void SetEstimatedFileSize(uint64_t size) {
++ estimated_file_size.store(size, std::memory_order_relaxed);
++ }
++
++ uint64_t GetEstimatedFileSize() {
++ return estimated_file_size.load(std::memory_order_relaxed);
++ }
++
++ void SetCurrBlockUncompSize(uint64_t size) {
++ uncomp_bytes_curr_block = size;
++ uncomp_bytes_curr_block_set = true;
++ }
++
++ private:
++ // Input bytes compressed so far.
++ uint64_t uncomp_bytes_compressed;
++ // Size of current block being appended.
++ uint64_t uncomp_bytes_curr_block;
++ // Whether uncomp_bytes_curr_block has been set for next
++ // ReapBlock call.
++ bool uncomp_bytes_curr_block_set;
++ // Input bytes under compression and not appended yet.
++ std::atomic<uint64_t> uncomp_bytes_inflight;
++ // Number of blocks under compression and not appended yet.
++ std::atomic<uint64_t> blocks_inflight;
++ // Current compression ratio, maintained by BGWorkWriteMaybeCompressedBlock.
++ std::atomic<double> curr_compression_ratio;
++ // Estimated SST file size.
++ std::atomic<uint64_t> estimated_file_size;
++ };
++ FileSizeEstimator file_size_estimator;
++
++ // Facilities used for waiting first block completion. Need to Wait for
++ // the completion of first block compression and flush to get a non-zero
++ // compression ratio.
++ std::atomic<bool> first_block_processed;
++ std::condition_variable first_block_cond;
++ std::mutex first_block_mutex;
++
++ explicit ParallelCompressionRep(uint32_t parallel_threads)
++ : curr_block_keys(new Keys()),
++ block_rep_buf(parallel_threads),
++ block_rep_pool(parallel_threads),
++ compress_queue(parallel_threads),
++ write_queue(parallel_threads),
++ first_block_processed(false) {
++ for (uint32_t i = 0; i < parallel_threads; i++) {
++ block_rep_buf[i].contents = Slice();
++ block_rep_buf[i].compressed_contents = Slice();
++ block_rep_buf[i].data.reset(new std::string());
++ block_rep_buf[i].compressed_data.reset(new std::string());
++ block_rep_buf[i].compression_type = CompressionType();
++ block_rep_buf[i].first_key_in_next_block.reset(new std::string());
++ block_rep_buf[i].keys.reset(new Keys());
++ block_rep_buf[i].slot.reset(new BlockRepSlot());
++ block_rep_buf[i].status = Status::OK();
++ block_rep_pool.push(&block_rep_buf[i]);
++ }
++ }
++
++ ~ParallelCompressionRep() { block_rep_pool.finish(); }
++
++ // Make a block prepared to be emitted to compression thread
++ // Used in non-buffered mode
++ BlockRep* PrepareBlock(CompressionType compression_type,
++ const Slice* first_key_in_next_block,
++ BlockBuilder* data_block) {
++ BlockRep* block_rep =
++ PrepareBlockInternal(compression_type, first_key_in_next_block);
++ assert(block_rep != nullptr);
++ data_block->SwapAndReset(*(block_rep->data));
++ block_rep->contents = *(block_rep->data);
++ std::swap(block_rep->keys, curr_block_keys);
++ curr_block_keys->Clear();
++ return block_rep;
++ }
++
++ // Used in EnterUnbuffered
++ BlockRep* PrepareBlock(CompressionType compression_type,
++ const Slice* first_key_in_next_block,
++ std::string* data_block,
++ std::vector<std::string>* keys) {
++ BlockRep* block_rep =
++ PrepareBlockInternal(compression_type, first_key_in_next_block);
++ assert(block_rep != nullptr);
++ std::swap(*(block_rep->data), *data_block);
++ block_rep->contents = *(block_rep->data);
++ block_rep->keys->SwapAssign(*keys);
++ return block_rep;
++ }
++
++ // Emit a block to compression thread
++ void EmitBlock(BlockRep* block_rep) {
++ assert(block_rep != nullptr);
++ assert(block_rep->status.ok());
++ if (!write_queue.push(block_rep->slot.get())) {
++ return;
++ }
++ if (!compress_queue.push(block_rep)) {
++ return;
++ }
++
++ if (!first_block_processed.load(std::memory_order_relaxed)) {
++ std::unique_lock<std::mutex> lock(first_block_mutex);
++ first_block_cond.wait(lock, [this] {
++ return first_block_processed.load(std::memory_order_relaxed);
++ });
++ }
++ }
++
++ // Reap a block from compression thread
++ void ReapBlock(BlockRep* block_rep) {
++ assert(block_rep != nullptr);
++ block_rep->compressed_data->clear();
++ block_rep_pool.push(block_rep);
++
++ if (!first_block_processed.load(std::memory_order_relaxed)) {
++ std::lock_guard<std::mutex> lock(first_block_mutex);
++ first_block_processed.store(true, std::memory_order_relaxed);
++ first_block_cond.notify_one();
++ }
++ }
++
++ private:
++ BlockRep* PrepareBlockInternal(CompressionType compression_type,
++ const Slice* first_key_in_next_block) {
++ BlockRep* block_rep = nullptr;
++ block_rep_pool.pop(block_rep);
++ assert(block_rep != nullptr);
++
++ assert(block_rep->data);
++
++ block_rep->compression_type = compression_type;
++
++ if (first_key_in_next_block == nullptr) {
++ block_rep->first_key_in_next_block.reset(nullptr);
++ } else {
++ block_rep->first_key_in_next_block->assign(
++ first_key_in_next_block->data(), first_key_in_next_block->size());
++ }
++
++ return block_rep;
++ }
++};
++
+ struct BlockBasedTableBuilder::Rep {
+ const ImmutableOptions ioptions;
+ // BEGIN from MutableCFOptions
+@@ -667,314 +976,6 @@
+ IOStatus io_status;
+ };
+
+-struct BlockBasedTableBuilder::ParallelCompressionRep {
+- // TODO: consider replacing with autovector or similar
+- // Keys is a wrapper of vector of strings avoiding
+- // releasing string memories during vector clear()
+- // in order to save memory allocation overhead
+- class Keys {
+- public:
+- Keys() : keys_(kKeysInitSize), size_(0) {}
+- void PushBack(const Slice& key) {
+- if (size_ == keys_.size()) {
+- keys_.emplace_back(key.data(), key.size());
+- } else {
+- keys_[size_].assign(key.data(), key.size());
+- }
+- size_++;
+- }
+- void SwapAssign(std::vector<std::string>& keys) {
+- size_ = keys.size();
+- std::swap(keys_, keys);
+- }
+- void Clear() { size_ = 0; }
+- size_t Size() { return size_; }
+- std::string& Back() { return keys_[size_ - 1]; }
+- std::string& operator[](size_t idx) {
+- assert(idx < size_);
+- return keys_[idx];
+- }
+-
+- private:
+- const size_t kKeysInitSize = 32;
+- std::vector<std::string> keys_;
+- size_t size_;
+- };
+- std::unique_ptr<Keys> curr_block_keys;
+-
+- class BlockRepSlot;
+-
+- // BlockRep instances are fetched from and recycled to
+- // block_rep_pool during parallel compression.
+- struct BlockRep {
+- Slice contents;
+- Slice compressed_contents;
+- std::unique_ptr<std::string> data;
+- std::unique_ptr<std::string> compressed_data;
+- CompressionType compression_type;
+- std::unique_ptr<std::string> first_key_in_next_block;
+- std::unique_ptr<Keys> keys;
+- std::unique_ptr<BlockRepSlot> slot;
+- Status status;
+- };
+- // Use a vector of BlockRep as a buffer for a determined number
+- // of BlockRep structures. All data referenced by pointers in
+- // BlockRep will be freed when this vector is destructed.
+- using BlockRepBuffer = std::vector<BlockRep>;
+- BlockRepBuffer block_rep_buf;
+- // Use a thread-safe queue for concurrent access from block
+- // building thread and writer thread.
+- using BlockRepPool = WorkQueue<BlockRep*>;
+- BlockRepPool block_rep_pool;
+-
+- // Use BlockRepSlot to keep block order in write thread.
+- // slot_ will pass references to BlockRep
+- class BlockRepSlot {
+- public:
+- BlockRepSlot() : slot_(1) {}
+- template <typename T>
+- void Fill(T&& rep) {
+- slot_.push(std::forward<T>(rep));
+- }
+- void Take(BlockRep*& rep) { slot_.pop(rep); }
+-
+- private:
+- // slot_ will pass references to BlockRep in block_rep_buf,
+- // and those references are always valid before the destruction of
+- // block_rep_buf.
+- WorkQueue<BlockRep*> slot_;
+- };
+-
+- // Compression queue will pass references to BlockRep in block_rep_buf,
+- // and those references are always valid before the destruction of
+- // block_rep_buf.
+- using CompressQueue = WorkQueue<BlockRep*>;
+- CompressQueue compress_queue;
+- std::vector<port::Thread> compress_thread_pool;
+-
+- // Write queue will pass references to BlockRep::slot in block_rep_buf,
+- // and those references are always valid before the corresponding
+- // BlockRep::slot is destructed, which is before the destruction of
+- // block_rep_buf.
+- using WriteQueue = WorkQueue<BlockRepSlot*>;
+- WriteQueue write_queue;
+- std::unique_ptr<port::Thread> write_thread;
+-
+- // Estimate output file size when parallel compression is enabled. This is
+- // necessary because compression & flush are no longer synchronized,
+- // and BlockBasedTableBuilder::FileSize() is no longer accurate.
+- // memory_order_relaxed suffices because accurate statistics is not required.
+- class FileSizeEstimator {
+- public:
+- explicit FileSizeEstimator()
+- : uncomp_bytes_compressed(0),
+- uncomp_bytes_curr_block(0),
+- uncomp_bytes_curr_block_set(false),
+- uncomp_bytes_inflight(0),
+- blocks_inflight(0),
+- curr_compression_ratio(0),
+- estimated_file_size(0) {}
+-
+- // Estimate file size when a block is about to be emitted to
+- // compression thread
+- void EmitBlock(uint64_t uncomp_block_size, uint64_t curr_file_size) {
+- uint64_t new_uncomp_bytes_inflight =
+- uncomp_bytes_inflight.fetch_add(uncomp_block_size,
+- std::memory_order_relaxed) +
+- uncomp_block_size;
+-
+- uint64_t new_blocks_inflight =
+- blocks_inflight.fetch_add(1, std::memory_order_relaxed) + 1;
+-
+- estimated_file_size.store(
+- curr_file_size +
+- static_cast<uint64_t>(
+- static_cast<double>(new_uncomp_bytes_inflight) *
+- curr_compression_ratio.load(std::memory_order_relaxed)) +
+- new_blocks_inflight * kBlockTrailerSize,
+- std::memory_order_relaxed);
+- }
+-
+- // Estimate file size when a block is already reaped from
+- // compression thread
+- void ReapBlock(uint64_t compressed_block_size, uint64_t curr_file_size) {
+- assert(uncomp_bytes_curr_block_set);
+-
+- uint64_t new_uncomp_bytes_compressed =
+- uncomp_bytes_compressed + uncomp_bytes_curr_block;
+- assert(new_uncomp_bytes_compressed > 0);
+-
+- curr_compression_ratio.store(
+- (curr_compression_ratio.load(std::memory_order_relaxed) *
+- uncomp_bytes_compressed +
+- compressed_block_size) /
+- static_cast<double>(new_uncomp_bytes_compressed),
+- std::memory_order_relaxed);
+- uncomp_bytes_compressed = new_uncomp_bytes_compressed;
+-
+- uint64_t new_uncomp_bytes_inflight =
+- uncomp_bytes_inflight.fetch_sub(uncomp_bytes_curr_block,
+- std::memory_order_relaxed) -
+- uncomp_bytes_curr_block;
+-
+- uint64_t new_blocks_inflight =
+- blocks_inflight.fetch_sub(1, std::memory_order_relaxed) - 1;
+-
+- estimated_file_size.store(
+- curr_file_size +
+- static_cast<uint64_t>(
+- static_cast<double>(new_uncomp_bytes_inflight) *
+- curr_compression_ratio.load(std::memory_order_relaxed)) +
+- new_blocks_inflight * kBlockTrailerSize,
+- std::memory_order_relaxed);
+-
+- uncomp_bytes_curr_block_set = false;
+- }
+-
+- void SetEstimatedFileSize(uint64_t size) {
+- estimated_file_size.store(size, std::memory_order_relaxed);
+- }
+-
+- uint64_t GetEstimatedFileSize() {
+- return estimated_file_size.load(std::memory_order_relaxed);
+- }
+-
+- void SetCurrBlockUncompSize(uint64_t size) {
+- uncomp_bytes_curr_block = size;
+- uncomp_bytes_curr_block_set = true;
+- }
+-
+- private:
+- // Input bytes compressed so far.
+- uint64_t uncomp_bytes_compressed;
+- // Size of current block being appended.
+- uint64_t uncomp_bytes_curr_block;
+- // Whether uncomp_bytes_curr_block has been set for next
+- // ReapBlock call.
+- bool uncomp_bytes_curr_block_set;
+- // Input bytes under compression and not appended yet.
+- std::atomic<uint64_t> uncomp_bytes_inflight;
+- // Number of blocks under compression and not appended yet.
+- std::atomic<uint64_t> blocks_inflight;
+- // Current compression ratio, maintained by BGWorkWriteMaybeCompressedBlock.
+- std::atomic<double> curr_compression_ratio;
+- // Estimated SST file size.
+- std::atomic<uint64_t> estimated_file_size;
+- };
+- FileSizeEstimator file_size_estimator;
+-
+- // Facilities used for waiting first block completion. Need to Wait for
+- // the completion of first block compression and flush to get a non-zero
+- // compression ratio.
+- std::atomic<bool> first_block_processed;
+- std::condition_variable first_block_cond;
+- std::mutex first_block_mutex;
+-
+- explicit ParallelCompressionRep(uint32_t parallel_threads)
+- : curr_block_keys(new Keys()),
+- block_rep_buf(parallel_threads),
+- block_rep_pool(parallel_threads),
+- compress_queue(parallel_threads),
+- write_queue(parallel_threads),
+- first_block_processed(false) {
+- for (uint32_t i = 0; i < parallel_threads; i++) {
+- block_rep_buf[i].contents = Slice();
+- block_rep_buf[i].compressed_contents = Slice();
+- block_rep_buf[i].data.reset(new std::string());
+- block_rep_buf[i].compressed_data.reset(new std::string());
+- block_rep_buf[i].compression_type = CompressionType();
+- block_rep_buf[i].first_key_in_next_block.reset(new std::string());
+- block_rep_buf[i].keys.reset(new Keys());
+- block_rep_buf[i].slot.reset(new BlockRepSlot());
+- block_rep_buf[i].status = Status::OK();
+- block_rep_pool.push(&block_rep_buf[i]);
+- }
+- }
+-
+- ~ParallelCompressionRep() { block_rep_pool.finish(); }
+-
+- // Make a block prepared to be emitted to compression thread
+- // Used in non-buffered mode
+- BlockRep* PrepareBlock(CompressionType compression_type,
+- const Slice* first_key_in_next_block,
+- BlockBuilder* data_block) {
+- BlockRep* block_rep =
+- PrepareBlockInternal(compression_type, first_key_in_next_block);
+- assert(block_rep != nullptr);
+- data_block->SwapAndReset(*(block_rep->data));
+- block_rep->contents = *(block_rep->data);
+- std::swap(block_rep->keys, curr_block_keys);
+- curr_block_keys->Clear();
+- return block_rep;
+- }
+-
+- // Used in EnterUnbuffered
+- BlockRep* PrepareBlock(CompressionType compression_type,
+- const Slice* first_key_in_next_block,
+- std::string* data_block,
+- std::vector<std::string>* keys) {
+- BlockRep* block_rep =
+- PrepareBlockInternal(compression_type, first_key_in_next_block);
+- assert(block_rep != nullptr);
+- std::swap(*(block_rep->data), *data_block);
+- block_rep->contents = *(block_rep->data);
+- block_rep->keys->SwapAssign(*keys);
+- return block_rep;
+- }
+-
+- // Emit a block to compression thread
+- void EmitBlock(BlockRep* block_rep) {
+- assert(block_rep != nullptr);
+- assert(block_rep->status.ok());
+- if (!write_queue.push(block_rep->slot.get())) {
+- return;
+- }
+- if (!compress_queue.push(block_rep)) {
+- return;
+- }
+-
+- if (!first_block_processed.load(std::memory_order_relaxed)) {
+- std::unique_lock<std::mutex> lock(first_block_mutex);
+- first_block_cond.wait(lock, [this] {
+- return first_block_processed.load(std::memory_order_relaxed);
+- });
+- }
+- }
+-
+- // Reap a block from compression thread
+- void ReapBlock(BlockRep* block_rep) {
+- assert(block_rep != nullptr);
+- block_rep->compressed_data->clear();
+- block_rep_pool.push(block_rep);
+-
+- if (!first_block_processed.load(std::memory_order_relaxed)) {
+- std::lock_guard<std::mutex> lock(first_block_mutex);
+- first_block_processed.store(true, std::memory_order_relaxed);
+- first_block_cond.notify_one();
+- }
+- }
+-
+- private:
+- BlockRep* PrepareBlockInternal(CompressionType compression_type,
+- const Slice* first_key_in_next_block) {
+- BlockRep* block_rep = nullptr;
+- block_rep_pool.pop(block_rep);
+- assert(block_rep != nullptr);
+-
+- assert(block_rep->data);
+-
+- block_rep->compression_type = compression_type;
+-
+- if (first_key_in_next_block == nullptr) {
+- block_rep->first_key_in_next_block.reset(nullptr);
+- } else {
+- block_rep->first_key_in_next_block->assign(
+- first_key_in_next_block->data(), first_key_in_next_block->size());
+- }
+-
+- return block_rep;
+- }
+-};
+
+ BlockBasedTableBuilder::BlockBasedTableBuilder(
+ const BlockBasedTableOptions& table_options, const TableBuilderOptions& tbo,
diff --git a/thirdparty/rocksdb/all/patches/cstdint.patch b/thirdparty/rocksdb/all/patches/cstdint.patch
deleted file mode 100644
index 2435905c9..000000000
--- a/thirdparty/rocksdb/all/patches/cstdint.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/options/offpeak_time_info.h b/options/offpeak_time_info.h
-index 75d61abb4..f42ef6dc2 100644
---- a/options/offpeak_time_info.h
-+++ b/options/offpeak_time_info.h
-@@ -5,6 +5,7 @@
-
- #pragma once
-
-+#include <cstdint>
- #include <string>
-
- #include "rocksdb/rocksdb_namespace.h"
(nifi-minifi-cpp) 04/04: MINIFICPP-2608 Refresh outdated linter cmake target
Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
fgerlits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 0ed0524e798fd6bd1695386c86ab5a4869d03cb8
Author: Martin Zink <ma...@apache.org>
AuthorDate: Thu Aug 14 18:17:22 2025 +0200
MINIFICPP-2608 Refresh outdated linter cmake target
Signed-off-by: Ferenc Gerlits <fg...@gmail.com>
Closes #2010
---
.github/workflows/ci.yml | 42 +++++++++---------
CMakeLists.txt | 26 +----------
CONTRIBUTING.md | 3 --
cmake/Extensions.cmake | 8 ----
extension-framework/include/ResourceClaim.h | 2 +-
.../include/controllers/SSLContextService.h | 2 +-
.../controllers/SSLContextServiceInterface.h | 2 +-
extension-framework/include/core/StateManager.h | 3 +-
extension-framework/include/core/StateStorage.h | 6 +--
.../include/utils/ProcessorConfigUtils.h | 51 +++++++++++++++-------
extensions/aws/CMakeLists.txt | 2 -
extensions/azure/CMakeLists.txt | 2 -
extensions/bustache/CMakeLists.txt | 1 -
extensions/civetweb/CMakeLists.txt | 1 -
extensions/couchbase/CMakeLists.txt | 1 -
extensions/elasticsearch/CMakeLists.txt | 1 -
extensions/execute-process/CMakeLists.txt | 1 -
extensions/expression-language/CMakeLists.txt | 1 -
extensions/gcp/CMakeLists.txt | 1 -
extensions/grafana-loki/CMakeLists.txt | 1 -
extensions/kafka/CMakeLists.txt | 1 -
extensions/kubernetes/CMakeLists.txt | 1 -
extensions/libarchive/CMakeLists.txt | 1 -
extensions/llamacpp/CMakeLists.txt | 1 -
extensions/lua/CMakeLists.txt | 1 -
extensions/mqtt/CMakeLists.txt | 1 -
extensions/opc/CMakeLists.txt | 1 -
extensions/opencv/CMakeLists.txt | 1 -
extensions/pdh/CMakeLists.txt | 1 -
extensions/procfs/CMakeLists.txt | 1 -
extensions/prometheus/CMakeLists.txt | 1 -
extensions/python/CMakeLists.txt | 1 -
extensions/rocksdb-repos/CMakeLists.txt | 1 -
extensions/script/CMakeLists.txt | 1 -
extensions/sftp/CMakeLists.txt | 1 -
extensions/smb/CMakeLists.txt | 1 -
extensions/splunk/CMakeLists.txt | 1 -
extensions/sql/CMakeLists.txt | 1 -
extensions/standard-processors/CMakeLists.txt | 1 -
extensions/systemd/CMakeLists.txt | 1 -
extensions/test-processors/CMakeLists.txt | 1 -
extensions/windows-event-log/CMakeLists.txt | 1 -
42 files changed, 68 insertions(+), 111 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c7bfa1785..321eb0e4e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -535,32 +535,34 @@ jobs:
with:
name: behavex_output
path: build/behavex_output
- cpplint:
- name: "cpplint"
+ linters:
+ name: "C++ lint + Shellcheck + Flake8"
runs-on: ubuntu-22.04-arm
timeout-minutes: 15
- steps:
- - id: checkout
- uses: actions/checkout@v4
- - name: linter
- run: python3 thirdparty/google-styleguide/run_linter.py -q -i libminifi/ extensions/ controller/ encrypt-config/ minifi_main/ minifi-api/ utils/
- shellcheck:
- name: "Shellcheck"
- runs-on: ubuntu-22.04-arm
- timeout-minutes: 10
- steps:
- - id: checkout
- uses: actions/checkout@v4
- - name: shellcheck
- run: ./run_shellcheck.sh .
- Flake8:
- name: "Flake8"
- runs-on: ubuntu-22.04-arm
- timeout-minutes: 10
steps:
- id: checkout
uses: actions/checkout@v4
+
- id: install_deps
run: sudo apt update && sudo apt install -y flake8
+
+ - id: cpp_lint
+ name: C++ linter
+ continue-on-error: true
+ run: python3 thirdparty/google-styleguide/run_linter.py -q -i controller/ core-framework/ encrypt-config/ extension-framework/ extensions/ libminifi/ minifi-api/ minifi_main/
+
+ - id: shellcheck
+ name: Shellcheck
+ continue-on-error: true
+ run: ./run_shellcheck.sh .
+
- id: flake8_check
+ name: Flake8 check
+ continue-on-error: true
run: ./run_flake8.sh .
+
+ - name: Check Linter Statuses
+ if: steps.cpp_lint.outcome == 'failure' || steps.shellcheck.outcome == 'failure' || steps.flake8_check.outcome == 'failure'
+ run: |
+ echo "One or more linters failed. Failing the workflow."
+ exit 1
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b2ecde8c6..70de14896 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -770,32 +770,10 @@ endif()
include(BuildDocs)
-
-# Create a custom build target that will run the linter.
-# Directories have their separate linter targets to be able to use better parallelization
-get_property(extensions GLOBAL PROPERTY EXTENSION-LINTERS)
-set(root_linted_dirs libminifi/include libminifi/src libminifi/test encrypt-config controller)
-list(TRANSFORM root_linted_dirs PREPEND ${CMAKE_SOURCE_DIR}/)
-
-set(linted_dir_counter 1)
-set(root_linter_target_names "")
-
-foreach(linted_dir ${root_linted_dirs})
- set(linter_target_name "root-linter-${linted_dir_counter}")
- list(APPEND root_linter_target_names ${linter_target_name})
- add_custom_target("${linter_target_name}"
- COMMAND python3 ${CMAKE_SOURCE_DIR}/thirdparty/google-styleguide/run_linter.py -q -i ${linted_dir}
- )
- set_target_properties(${linter_target_name} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)
- math(EXPR linted_dir_counter "${linted_dir_counter}+1")
-endforeach()
-
-# Main linter target that depends on every other
-add_custom_target(linter)
-add_dependencies(linter ${root_linter_target_names} ${extensions})
+add_custom_target(linter COMMAND
+ python3 ${CMAKE_SOURCE_DIR}/thirdparty/google-styleguide/run_linter.py -q -i ${CMAKE_SOURCE_DIR}/controller/ ${CMAKE_SOURCE_DIR}/core-framework/ ${CMAKE_SOURCE_DIR}/encrypt-config/ ${CMAKE_SOURCE_DIR}/extension-framework/ ${CMAKE_SOURCE_DIR}/extensions/ ${CMAKE_SOURCE_DIR}/libminifi/ ${CMAKE_SOURCE_DIR}/minifi-api/ ${CMAKE_SOURCE_DIR}/minifi_main/)
set_target_properties(linter PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)
-
if(NOT WIN32)
add_custom_target(shellcheck
COMMAND ${CMAKE_SOURCE_DIR}/run_shellcheck.sh ${CMAKE_SOURCE_DIR})
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 694901a26..a1d25c6ca 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -126,8 +126,5 @@ register_extension(minifi-kubernetes-extensions "KUBERNETES EXTENSIONS" KUBERNET
# the first argument should be the extension target
# the next three arguments are used for documentation purposes
# the fifth optional argument designates the directory of the extension's tests
-
-# we could optionally enforce a coding style by registering a linter target
-register_extension_linter(minifi-kubernetes-extensions-linter)
```
diff --git a/cmake/Extensions.cmake b/cmake/Extensions.cmake
index c497ec525..3dda3982a 100644
--- a/cmake/Extensions.cmake
+++ b/cmake/Extensions.cmake
@@ -105,14 +105,6 @@ macro(register_extension_test extension-dir)
endif()
endmacro()
-macro(register_extension_linter target-name)
- get_property(extensions GLOBAL PROPERTY EXTENSION-LINTERS)
- set_property(GLOBAL APPEND PROPERTY EXTENSION-LINTERS "${target-name}")
- add_custom_target(${target-name}
- COMMAND python3 ${CMAKE_SOURCE_DIR}/thirdparty/google-styleguide/run_linter.py -q -i ${CMAKE_CURRENT_LIST_DIR}/)
- set_target_properties(${target-name} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)
-endmacro()
-
function(get_component_name extension-name output)
# component names can only contain [a-zA-Z_]
string(REPLACE "-" "_" result ${extension-name})
diff --git a/extension-framework/include/ResourceClaim.h b/extension-framework/include/ResourceClaim.h
index ff9ada8cc..c9948ea60 100644
--- a/extension-framework/include/ResourceClaim.h
+++ b/extension-framework/include/ResourceClaim.h
@@ -18,4 +18,4 @@
#pragma once
-#include "minifi-cpp/ResourceClaim.h"
\ No newline at end of file
+#include "minifi-cpp/ResourceClaim.h"
diff --git a/extension-framework/include/controllers/SSLContextService.h b/extension-framework/include/controllers/SSLContextService.h
index 0c9c535c2..58dabc724 100644
--- a/extension-framework/include/controllers/SSLContextService.h
+++ b/extension-framework/include/controllers/SSLContextService.h
@@ -16,4 +16,4 @@
*/
#pragma once
-#include "minifi-cpp/controllers/SSLContextServiceInterface.h"
\ No newline at end of file
+#include "minifi-cpp/controllers/SSLContextServiceInterface.h"
diff --git a/extension-framework/include/controllers/SSLContextServiceInterface.h b/extension-framework/include/controllers/SSLContextServiceInterface.h
index 0c9c535c2..58dabc724 100644
--- a/extension-framework/include/controllers/SSLContextServiceInterface.h
+++ b/extension-framework/include/controllers/SSLContextServiceInterface.h
@@ -16,4 +16,4 @@
*/
#pragma once
-#include "minifi-cpp/controllers/SSLContextServiceInterface.h"
\ No newline at end of file
+#include "minifi-cpp/controllers/SSLContextServiceInterface.h"
diff --git a/extension-framework/include/core/StateManager.h b/extension-framework/include/core/StateManager.h
index bf5a30e66..ef1b3ff0c 100644
--- a/extension-framework/include/core/StateManager.h
+++ b/extension-framework/include/core/StateManager.h
@@ -17,12 +17,13 @@
#pragma once
-#include "core/Core.h"
#include <memory>
#include <optional>
#include <string>
#include <unordered_map>
+
+#include "core/Core.h"
#include "minifi-cpp/core/StateManager.h"
namespace org::apache::nifi::minifi::core {
diff --git a/extension-framework/include/core/StateStorage.h b/extension-framework/include/core/StateStorage.h
index 89822310f..ed431bb72 100644
--- a/extension-framework/include/core/StateStorage.h
+++ b/extension-framework/include/core/StateStorage.h
@@ -17,12 +17,12 @@
#pragma once
-#include "core/Core.h"
-#include "StateManager.h"
-
#include <memory>
#include <string>
#include <unordered_map>
+
+#include "core/Core.h"
+#include "StateManager.h"
#include "minifi-cpp/core/StateStorage.h"
namespace org::apache::nifi::minifi::core {
diff --git a/extension-framework/include/utils/ProcessorConfigUtils.h b/extension-framework/include/utils/ProcessorConfigUtils.h
index 5f0ca845f..f18febf78 100644
--- a/extension-framework/include/utils/ProcessorConfigUtils.h
+++ b/extension-framework/include/utils/ProcessorConfigUtils.h
@@ -32,36 +32,49 @@
namespace org::apache::nifi::minifi::utils {
inline std::string parseProperty(const core::ProcessContext& ctx, const core::PropertyReference& property, const core::FlowFile* flow_file = nullptr) {
- return ctx.getProperty(property.name, flow_file) | orThrow(fmt::format("Expected valid value from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
+ return ctx.getProperty(property.name, flow_file)
+ | orThrow(fmt::format("Expected valid value from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
}
inline bool parseBoolProperty(const core::ProcessContext& ctx, const core::PropertyReference& property, const core::FlowFile* flow_file = nullptr) {
- return ctx.getProperty(property.name, flow_file) | andThen(parsing::parseBool) | orThrow(fmt::format("Expected parsable bool from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
+ return ctx.getProperty(property.name, flow_file)
+ | andThen(parsing::parseBool)
+ | orThrow(fmt::format("Expected parsable bool from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
}
inline uint64_t parseU64Property(const core::ProcessContext& ctx, const core::PropertyReference& property, const core::FlowFile* flow_file = nullptr) {
- return ctx.getProperty(property.name, flow_file) | andThen(parsing::parseIntegral<uint64_t>) | orThrow(fmt::format("Expected parsable uint64_t from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
+ return ctx.getProperty(property.name, flow_file)
+ | andThen(parsing::parseIntegral<uint64_t>)
+ | orThrow(fmt::format("Expected parsable uint64_t from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
}
inline int64_t parseI64Property(const core::ProcessContext& ctx, const core::PropertyReference& property, const core::FlowFile* flow_file = nullptr) {
- return ctx.getProperty(property.name, flow_file) | andThen(parsing::parseIntegral<int64_t>) | orThrow(fmt::format("Expected parsable int64_t from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
+ return ctx.getProperty(property.name, flow_file)
+ | andThen(parsing::parseIntegral<int64_t>)
+ | orThrow(fmt::format("Expected parsable int64_t from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
}
inline std::chrono::milliseconds parseDurationProperty(const core::ProcessContext& ctx, const core::PropertyReference& property, const core::FlowFile* flow_file = nullptr) {
- return ctx.getProperty(property.name, flow_file) | andThen(parsing::parseDuration<std::chrono::milliseconds>) | orThrow(fmt::format("Expected parsable duration from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
+ return ctx.getProperty(property.name, flow_file)
+ | andThen(parsing::parseDuration<std::chrono::milliseconds>)
+ | orThrow(fmt::format("Expected parsable duration from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
}
inline uint64_t parseDataSizeProperty(const core::ProcessContext& ctx, const core::PropertyReference& property, const core::FlowFile* flow_file = nullptr) {
- return ctx.getProperty(property.name, flow_file) | andThen(parsing::parseDataSize) | orThrow(fmt::format("Expected parsable data size from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
+ return ctx.getProperty(property.name, flow_file)
+ | andThen(parsing::parseDataSize)
+ | orThrow(fmt::format("Expected parsable data size from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
}
inline std::optional<std::string> parseOptionalProperty(const core::ProcessContext& ctx, const core::PropertyReference& property, const core::FlowFile* flow_file = nullptr) {
- return ctx.getProperty(property.name, flow_file) | utils::toOptional();
+ return ctx.getProperty(property.name, flow_file)
+ | utils::toOptional();
}
inline std::optional<bool> parseOptionalBoolProperty(const core::ProcessContext& ctx, const core::PropertyReference& property, const core::FlowFile* flow_file = nullptr) {
if (const auto property_str = ctx.getProperty(property.name, flow_file)) {
- return parsing::parseBool(*property_str) | utils::orThrow(fmt::format("Expected parsable bool from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
+ return parsing::parseBool(*property_str)
+ | utils::orThrow(fmt::format("Expected parsable bool from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
}
return std::nullopt;
}
@@ -71,7 +84,8 @@ inline std::optional<uint64_t> parseOptionalU64Property(const core::ProcessConte
if (property_str->empty()) {
return std::nullopt;
}
- return parsing::parseIntegral<uint64_t>(*property_str) | utils::orThrow(fmt::format("Expected parsable uint64_t from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
+ return parsing::parseIntegral<uint64_t>(*property_str)
+ | utils::orThrow(fmt::format("Expected parsable uint64_t from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
}
return std::nullopt;
@@ -82,7 +96,8 @@ inline std::optional<int64_t> parseOptionalI64Property(const core::ProcessContex
if (property_str->empty()) {
return std::nullopt;
}
- return parsing::parseIntegral<int64_t>(*property_str) | utils::orThrow(fmt::format("Expected parsable int64_t from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
+ return parsing::parseIntegral<int64_t>(*property_str)
+ | utils::orThrow(fmt::format("Expected parsable int64_t from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
}
return std::nullopt;
@@ -93,7 +108,8 @@ inline std::optional<std::chrono::milliseconds> parseOptionalDurationProperty(co
if (property_str->empty()) {
return std::nullopt;
}
- return parsing::parseDuration(*property_str) | utils::orThrow(fmt::format("Expected parsable duration from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
+ return parsing::parseDuration(*property_str)
+ | utils::orThrow(fmt::format("Expected parsable duration from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
}
return std::nullopt;
@@ -104,7 +120,8 @@ inline std::optional<uint64_t> parseOptionalDataSizeProperty(const core::Process
if (property_str->empty()) {
return std::nullopt;
}
- return parsing::parseDataSize(*property_str) | utils::orThrow(fmt::format("Expected parsable data size from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
+ return parsing::parseDataSize(*property_str)
+ | utils::orThrow(fmt::format("Expected parsable data size from \"{}::{}\"", ctx.getProcessorInfo().getName(), property.name));
}
return std::nullopt;
@@ -115,7 +132,8 @@ inline std::optional<float> parseOptionalFloatProperty(const core::ProcessContex
if (property_str->empty()) {
return std::nullopt;
}
- return parsing::parseFloat(*property_str) | utils::orThrow(fmt::format("Expected parsable float from {}::{}", ctx.getProcessorInfo().getName(), property.name));
+ return parsing::parseFloat(*property_str)
+ | utils::orThrow(fmt::format("Expected parsable float from {}::{}", ctx.getProcessorInfo().getName(), property.name));
}
return std::nullopt;
}
@@ -148,7 +166,9 @@ std::optional<T> parseOptionalEnumProperty(const core::ProcessContext& context,
}
template<typename ControllerServiceType>
-std::optional<std::shared_ptr<ControllerServiceType>> parseOptionalControllerService(const core::ProcessContext& context, const core::PropertyReference& prop, const utils::Identifier& processor_uuid) {
+std::optional<std::shared_ptr<ControllerServiceType>> parseOptionalControllerService(const core::ProcessContext& context,
+ const core::PropertyReference& prop,
+ const utils::Identifier& processor_uuid) {
const auto controller_service_name = context.getProperty(prop.name);
if (!controller_service_name) {
return std::nullopt;
@@ -169,6 +189,7 @@ std::optional<std::shared_ptr<ControllerServiceType>> parseOptionalControllerSer
template<typename ControllerServiceType>
std::shared_ptr<ControllerServiceType> parseControllerService(const core::ProcessContext& context, const core::PropertyReference& prop, const utils::Identifier& processor_uuid) {
- return parseOptionalControllerService<ControllerServiceType>(context, prop, processor_uuid) | utils::orThrow("Required Controller Service");
+ return parseOptionalControllerService<ControllerServiceType>(context, prop, processor_uuid)
+ | utils::orThrow("Required Controller Service");
}
} // namespace org::apache::nifi::minifi::utils
diff --git a/extensions/aws/CMakeLists.txt b/extensions/aws/CMakeLists.txt
index a2bc0cd44..55e65fec6 100644
--- a/extensions/aws/CMakeLists.txt
+++ b/extensions/aws/CMakeLists.txt
@@ -50,5 +50,3 @@ if(WIN32)
endif()
register_extension(minifi-aws "AWS EXTENSIONS" AWS-EXTENSIONS "This enables AWS support" "extensions/aws/tests")
-
-register_extension_linter(minifi-aws-extensions-linter)
diff --git a/extensions/azure/CMakeLists.txt b/extensions/azure/CMakeLists.txt
index b6014ddf2..dffcf59a4 100644
--- a/extensions/azure/CMakeLists.txt
+++ b/extensions/azure/CMakeLists.txt
@@ -45,5 +45,3 @@ if (WIN32)
endif()
register_extension(minifi-azure "AZURE EXTENSIONS" AZURE-EXTENSIONS "This enables Azure support" "extensions/azure/tests")
-
-register_extension_linter(minifi-azure-extensions-linter)
diff --git a/extensions/bustache/CMakeLists.txt b/extensions/bustache/CMakeLists.txt
index b5e76956c..1a771b0ae 100644
--- a/extensions/bustache/CMakeLists.txt
+++ b/extensions/bustache/CMakeLists.txt
@@ -33,4 +33,3 @@ target_link_libraries(minifi-bustache-extensions ${LIBMINIFI})
target_link_libraries(minifi-bustache-extensions bustache)
register_extension(minifi-bustache-extensions "BUSTACHE EXTENSIONS" BUSTACHE-EXTENSIONS "This enables bustache functionality including ApplyTemplate." "extensions/bustache/tests")
-register_extension_linter(minifi-bustache-extensions-linter)
diff --git a/extensions/civetweb/CMakeLists.txt b/extensions/civetweb/CMakeLists.txt
index eb7e5f30d..d299bc6e7 100644
--- a/extensions/civetweb/CMakeLists.txt
+++ b/extensions/civetweb/CMakeLists.txt
@@ -35,4 +35,3 @@ target_include_directories(minifi-civet-extensions BEFORE PUBLIC
target_link_libraries(minifi-civet-extensions ${LIBMINIFI} Threads::Threads civetweb::civetweb-cpp)
register_extension(minifi-civet-extensions CIVETWEB CIVETWEB "This enables ListenHTTP" "extensions/civetweb/tests")
-register_extension_linter(minifi-civet-extensions-linter)
diff --git a/extensions/couchbase/CMakeLists.txt b/extensions/couchbase/CMakeLists.txt
index 92d4617e6..3c7ac35e1 100644
--- a/extensions/couchbase/CMakeLists.txt
+++ b/extensions/couchbase/CMakeLists.txt
@@ -38,4 +38,3 @@ target_link_libraries(minifi-couchbase ${LIBMINIFI} couchbase_cxx_client_static
register_extension(minifi-couchbase "COUCHBASE EXTENSIONS" COUCHBASE-EXTENSIONS "This enables Couchbase support" "extensions/couchbase/tests")
-register_extension_linter(minifi-couchbase-extensions-linter)
diff --git a/extensions/elasticsearch/CMakeLists.txt b/extensions/elasticsearch/CMakeLists.txt
index 7231c4afb..163be34ed 100644
--- a/extensions/elasticsearch/CMakeLists.txt
+++ b/extensions/elasticsearch/CMakeLists.txt
@@ -31,4 +31,3 @@ target_link_libraries(minifi-elasticsearch ${LIBMINIFI})
register_extension(minifi-elasticsearch "ELASTICSEARCH EXTENSIONS" ELASTICSEARCH-EXTENSIONS "This enables elasticsearch support" "extensions/elasticsearch/tests")
-register_extension_linter(minifi-elasticsearch-extensions-linter)
diff --git a/extensions/execute-process/CMakeLists.txt b/extensions/execute-process/CMakeLists.txt
index db798cc00..b467fc853 100644
--- a/extensions/execute-process/CMakeLists.txt
+++ b/extensions/execute-process/CMakeLists.txt
@@ -35,4 +35,3 @@ target_link_libraries(minifi-execute-process ${LIBMINIFI})
register_extension(minifi-execute-process "EXECUTE PROCESS EXTENSION" EXECUTE-PROCESS-EXTENSION "This enables execute process support" "extensions/execute-process/test")
-register_extension_linter(minifi-execute-process-extensions-linter)
diff --git a/extensions/expression-language/CMakeLists.txt b/extensions/expression-language/CMakeLists.txt
index 3183d97ca..9a28e0395 100644
--- a/extensions/expression-language/CMakeLists.txt
+++ b/extensions/expression-language/CMakeLists.txt
@@ -146,4 +146,3 @@ if (BREW_FLEX_INCLUDE)
endif()
register_extension(minifi-expression-language-extensions "EXPRESSION LANGUAGE EXTENSIONS" EXPRESSION-LANGUAGE-EXTENSIONS "This enables NiFi expression language" "extensions/expression-language/tests")
-register_extension_linter(minifi-expression-language-extensions-linter)
diff --git a/extensions/gcp/CMakeLists.txt b/extensions/gcp/CMakeLists.txt
index cf8dc9a47..654209d08 100644
--- a/extensions/gcp/CMakeLists.txt
+++ b/extensions/gcp/CMakeLists.txt
@@ -35,4 +35,3 @@ target_include_directories(minifi-gcp SYSTEM PUBLIC ${google-cloud-cpp_INCLUDE_D
register_extension(minifi-gcp "GCP EXTENSIONS" GCP-EXTENSIONS "This enables Google Cloud Platform support" "extensions/gcp/tests")
-register_extension_linter(minifi-gcp-extensions-linter)
diff --git a/extensions/grafana-loki/CMakeLists.txt b/extensions/grafana-loki/CMakeLists.txt
index e1278595d..04a068fc9 100644
--- a/extensions/grafana-loki/CMakeLists.txt
+++ b/extensions/grafana-loki/CMakeLists.txt
@@ -61,4 +61,3 @@ endif()
register_extension(minifi-grafana-loki "GRAFANA LOKI EXTENSIONS" GRAFANA-LOKI-EXTENSIONS "This enables Grafana Loki support" "extensions/grafana-loki/tests")
-register_extension_linter(minifi-grafana-loki-extensions-linter)
diff --git a/extensions/kafka/CMakeLists.txt b/extensions/kafka/CMakeLists.txt
index 08f400e2c..13f4b3a38 100644
--- a/extensions/kafka/CMakeLists.txt
+++ b/extensions/kafka/CMakeLists.txt
@@ -37,4 +37,3 @@ target_link_libraries(minifi-rdkafka-extensions rdkafka)
register_extension(minifi-rdkafka-extensions "RDKAFKA EXTENSIONS" RDKAFKA-EXTENSIONS "This Enables librdkafka functionality including PublishKafka" "extensions/kafka/tests")
-register_extension_linter(minifi-rdkafka-extensions-linter)
diff --git a/extensions/kubernetes/CMakeLists.txt b/extensions/kubernetes/CMakeLists.txt
index 4ac885c99..fcaf72166 100644
--- a/extensions/kubernetes/CMakeLists.txt
+++ b/extensions/kubernetes/CMakeLists.txt
@@ -27,4 +27,3 @@ add_minifi_library(minifi-kubernetes-extensions SHARED ${SOURCES})
target_link_libraries(minifi-kubernetes-extensions ${LIBMINIFI} kubernetes)
register_extension(minifi-kubernetes-extensions "KUBERNETES EXTENSIONS" KUBERNETES-EXTENSIONS "This enables Kubernetes support" "extensions/kubernetes/tests")
-register_extension_linter(minifi-kubernetes-extensions-linter)
diff --git a/extensions/libarchive/CMakeLists.txt b/extensions/libarchive/CMakeLists.txt
index bf7b2a7f5..14b75dcc2 100644
--- a/extensions/libarchive/CMakeLists.txt
+++ b/extensions/libarchive/CMakeLists.txt
@@ -39,4 +39,3 @@ target_link_libraries(minifi-archive-extensions ${LIBMINIFI} Threads::Threads)
target_link_libraries(minifi-archive-extensions LibArchive::LibArchive)
register_extension(minifi-archive-extensions "ARCHIVE EXTENSIONS" ARCHIVE-EXTENSIONS "This Enables libarchive functionality including MergeContent, CompressContent, (Un)FocusArchiveEntry and ManipulateArchive." "extensions/libarchive/tests")
-register_extension_linter(minifi-archive-extensions-linter)
diff --git a/extensions/llamacpp/CMakeLists.txt b/extensions/llamacpp/CMakeLists.txt
index 5a25cbc05..e10bea82b 100644
--- a/extensions/llamacpp/CMakeLists.txt
+++ b/extensions/llamacpp/CMakeLists.txt
@@ -35,4 +35,3 @@ target_link_libraries(minifi-llamacpp ${LIBMINIFI} llama)
register_extension(minifi-llamacpp "LLAMACPP EXTENSION" LLAMACPP-EXTENSION "Provides llama.cpp support" "extensions/llamacpp/tests")
-register_extension_linter(minifi-llamacpp-linter)
diff --git a/extensions/lua/CMakeLists.txt b/extensions/lua/CMakeLists.txt
index ed0766e9b..3a8ca0301 100644
--- a/extensions/lua/CMakeLists.txt
+++ b/extensions/lua/CMakeLists.txt
@@ -42,4 +42,3 @@ target_link_libraries(minifi-lua-script-extension PUBLIC lua sol2)
target_compile_features(minifi-lua-script-extension PUBLIC cxx_std_14)
register_extension(minifi-lua-script-extension "LUA SCRIPTING EXTENSIONS" LUA-SCRIPTING-EXTENSIONS "This enables LUA scripting" "extensions/lua/tests")
-register_extension_linter(minifi-lua-script-extension-linter)
diff --git a/extensions/mqtt/CMakeLists.txt b/extensions/mqtt/CMakeLists.txt
index d6d2817ea..322623664 100644
--- a/extensions/mqtt/CMakeLists.txt
+++ b/extensions/mqtt/CMakeLists.txt
@@ -34,4 +34,3 @@ include(PahoMqttC)
target_link_libraries(minifi-mqtt-extensions paho.mqtt.c)
register_extension(minifi-mqtt-extensions "MQTT EXTENSIONS" MQTT-EXTENSIONS "This Enables MQTT functionality including PublishMQTT/ConsumeMQTT" "${CMAKE_CURRENT_SOURCE_DIR}/tests")
-register_extension_linter(minifi-mqtt-extensions-linter)
diff --git a/extensions/opc/CMakeLists.txt b/extensions/opc/CMakeLists.txt
index 567799bb5..a19db6df8 100644
--- a/extensions/opc/CMakeLists.txt
+++ b/extensions/opc/CMakeLists.txt
@@ -41,4 +41,3 @@ target_link_libraries(minifi-opc-extensions ${LIBMINIFI} Threads::Threads)
target_link_libraries(minifi-opc-extensions ${CMAKE_DL_LIBS} spdlog::spdlog open62541::open62541)
register_extension(minifi-opc-extensions "OPC EXTENSIONS" OPC-EXTENSIONS "This enables OPC-UA support" "extensions/opc/tests")
-register_extension_linter(minifi-opc-extensions-linter)
diff --git a/extensions/opencv/CMakeLists.txt b/extensions/opencv/CMakeLists.txt
index a3b45a70c..ed812c1a6 100644
--- a/extensions/opencv/CMakeLists.txt
+++ b/extensions/opencv/CMakeLists.txt
@@ -34,4 +34,3 @@ target_link_libraries(minifi-opencv ${LIBMINIFI})
target_link_libraries(minifi-opencv OPENCV::libopencv)
register_extension(minifi-opencv "OPENCV EXTENSIONS" OPENCV-EXTENSIONS "This enables OpenCV support" "extensions/opencv/tests")
-register_extension_linter(minifi-opencv-linter)
diff --git a/extensions/pdh/CMakeLists.txt b/extensions/pdh/CMakeLists.txt
index 627562a2a..153bc65f1 100644
--- a/extensions/pdh/CMakeLists.txt
+++ b/extensions/pdh/CMakeLists.txt
@@ -31,4 +31,3 @@ target_link_libraries(minifi-pdh ${LIBMINIFI} pdh)
register_extension(minifi-pdh "PDH EXTENSIONS" PDH-EXTENSIONS "This enables PDH support" "extensions/pdh/tests")
-register_extension_linter(minifi-pdh-extensions-linter)
diff --git a/extensions/procfs/CMakeLists.txt b/extensions/procfs/CMakeLists.txt
index ff97d9385..f36959441 100644
--- a/extensions/procfs/CMakeLists.txt
+++ b/extensions/procfs/CMakeLists.txt
@@ -30,4 +30,3 @@ target_link_libraries(minifi-procfs ${LIBMINIFI})
register_extension(minifi-procfs "PROCFS EXTENSIONS" PROCFS-EXTENSIONS "Enabled metrics collection from procfs" "extensions/procfs/tests")
-register_extension_linter(minifi-procfs-extensions-linter)
diff --git a/extensions/prometheus/CMakeLists.txt b/extensions/prometheus/CMakeLists.txt
index d7f5af46b..047ce4420 100644
--- a/extensions/prometheus/CMakeLists.txt
+++ b/extensions/prometheus/CMakeLists.txt
@@ -32,4 +32,3 @@ target_link_libraries(minifi-prometheus ${LIBMINIFI} prometheus-cpp::core prome
target_include_directories(minifi-prometheus PUBLIC ${prometheus-cpp_INCLUDE_DIRS})
register_extension(minifi-prometheus "PROMETHEUS EXTENSIONS" PROMETHEUS-EXTENSIONS "This enables Prometheus support" "extensions/prometheus/tests")
-register_extension_linter(minifi-prometheus-linter)
diff --git a/extensions/python/CMakeLists.txt b/extensions/python/CMakeLists.txt
index 6eb2b0003..d1ebd6b0c 100644
--- a/extensions/python/CMakeLists.txt
+++ b/extensions/python/CMakeLists.txt
@@ -95,4 +95,3 @@ if (NOT WIN32)
register_extension(minifi-python-lib-loader-extension "PYTHON LIB LOADER" PYTHON-LIB-LOADER-EXTENSIONS "This enables library that loads python library for python symbols")
endif()
register_extension(minifi-python-script-extension "PYTHON SCRIPTING ENGINE" PYTHON-SCRIPTING-EXTENSIONS "This enables python script engine" "extensions/python/tests")
-register_extension_linter(minifi-python-script-extension-linter)
diff --git a/extensions/rocksdb-repos/CMakeLists.txt b/extensions/rocksdb-repos/CMakeLists.txt
index f4d535208..db6beeed4 100644
--- a/extensions/rocksdb-repos/CMakeLists.txt
+++ b/extensions/rocksdb-repos/CMakeLists.txt
@@ -35,4 +35,3 @@ target_link_libraries(minifi-rocksdb-repos PUBLIC minifi-api minifi-extension-fr
target_link_libraries(minifi-rocksdb-repos PRIVATE $<LINK_ONLY:core-minifi>)
register_extension(minifi-rocksdb-repos "ROCKSDB REPOS" ROCKSDB-REPOS "This Enables persistent provenance, flowfile, and content repositories using RocksDB" "extensions/rocksdb-repos/tests")
-register_extension_linter(minifi-rocksdb-repos-linter)
diff --git a/extensions/script/CMakeLists.txt b/extensions/script/CMakeLists.txt
index 12f47a59c..24403caf5 100644
--- a/extensions/script/CMakeLists.txt
+++ b/extensions/script/CMakeLists.txt
@@ -31,4 +31,3 @@ target_link_libraries(minifi-script-extension PRIVATE ${LIBMINIFI} Threads::Thre
target_include_directories(minifi-script-extension PRIVATE BEFORE "${CMAKE_SOURCE_DIR}/extensions/python")
register_extension(minifi-script-extension "SCRIPTING EXTENSIONS" SCRIPTING-EXTENSIONS "This enables scripting" "extensions/script/tests")
-register_extension_linter(minifi-script-extension-linter)
diff --git a/extensions/sftp/CMakeLists.txt b/extensions/sftp/CMakeLists.txt
index 2cea03f2b..c5c1cb6a7 100644
--- a/extensions/sftp/CMakeLists.txt
+++ b/extensions/sftp/CMakeLists.txt
@@ -36,4 +36,3 @@ target_link_libraries(minifi-sftp ${LIBMINIFI} Threads::Threads)
target_link_libraries(minifi-sftp libssh2 RapidJSON)
register_extension(minifi-sftp "SFTP EXTENSIONS" SFTP "This enables SFTP support" "extensions/sftp/tests")
-register_extension_linter(minifi-sftp-linter)
diff --git a/extensions/smb/CMakeLists.txt b/extensions/smb/CMakeLists.txt
index 205580aa0..a51fe63cf 100644
--- a/extensions/smb/CMakeLists.txt
+++ b/extensions/smb/CMakeLists.txt
@@ -31,4 +31,3 @@ target_include_directories(minifi-smb PRIVATE BEFORE "${CMAKE_SOURCE_DIR}/extens
register_extension(minifi-smb "SMB EXTENSIONS" SMB-EXTENSIONS "This enables SMB support" "extensions/smb/tests")
-register_extension_linter(minifi-smb-extensions-linter)
diff --git a/extensions/splunk/CMakeLists.txt b/extensions/splunk/CMakeLists.txt
index ff18d2d9a..1ab016a6a 100644
--- a/extensions/splunk/CMakeLists.txt
+++ b/extensions/splunk/CMakeLists.txt
@@ -31,4 +31,3 @@ target_link_libraries(minifi-splunk ${LIBMINIFI})
register_extension(minifi-splunk "SPLUNK EXTENSIONS" SPLUNK-EXTENSIONS "This enables Splunk support" "extensions/splunk/tests")
-register_extension_linter(minifi-splunk-extensions-linter)
diff --git a/extensions/sql/CMakeLists.txt b/extensions/sql/CMakeLists.txt
index 39f9ce82b..3982458a4 100644
--- a/extensions/sql/CMakeLists.txt
+++ b/extensions/sql/CMakeLists.txt
@@ -179,4 +179,3 @@ target_link_libraries(minifi-sql SOCI::libsoci_odbc SOCI::libsoci_core)
target_link_libraries(minifi-sql ${LIBMINIFI} Threads::Threads)
register_extension(minifi-sql "SQL EXTENSIONS" SQL-EXTENSIONS "Enables the SQL Suite of Tools" "extensions/sql/tests")
-register_extension_linter(minifi-sql-extensions-linter)
diff --git a/extensions/standard-processors/CMakeLists.txt b/extensions/standard-processors/CMakeLists.txt
index f62003e75..7c643c087 100644
--- a/extensions/standard-processors/CMakeLists.txt
+++ b/extensions/standard-processors/CMakeLists.txt
@@ -34,4 +34,3 @@ enable_coroutines()
register_extension(minifi-standard-processors "STANDARD PROCESSORS" STANDARD-PROCESSORS "Provides standard processors" "extensions/standard-processors/tests/")
-register_extension_linter(minifi-standard-processors-linter)
diff --git a/extensions/systemd/CMakeLists.txt b/extensions/systemd/CMakeLists.txt
index 87f49cafb..560ed283e 100644
--- a/extensions/systemd/CMakeLists.txt
+++ b/extensions/systemd/CMakeLists.txt
@@ -28,4 +28,3 @@ add_minifi_library(minifi-systemd SHARED "ConsumeJournald.cpp" "libwrapper/LibWr
target_link_libraries(minifi-systemd ${LIBMINIFI} Threads::Threads)
register_extension(minifi-systemd "SYSTEMD EXTENSIONS" SYSTEMD-EXTENSIONS "Enabled log collection from journald" "extensions/systemd/tests")
-register_extension_linter(minifi-systemd-extension-linter)
diff --git a/extensions/test-processors/CMakeLists.txt b/extensions/test-processors/CMakeLists.txt
index 4953f31ea..056687d0a 100644
--- a/extensions/test-processors/CMakeLists.txt
+++ b/extensions/test-processors/CMakeLists.txt
@@ -31,4 +31,3 @@ target_link_libraries(minifi-test-processors ${LIBMINIFI})
register_extension(minifi-test-processors "TEST-PROCESSORS EXTENSION" TEST-PROCESSORS-EXTENSION "This enables processors purely for testing purposes" "" "CI_ONLY_INSTALL")
-register_extension_linter(minifi-test-processors-extensions-linter)
diff --git a/extensions/windows-event-log/CMakeLists.txt b/extensions/windows-event-log/CMakeLists.txt
index 6adb1220a..38bd6ff9c 100644
--- a/extensions/windows-event-log/CMakeLists.txt
+++ b/extensions/windows-event-log/CMakeLists.txt
@@ -34,4 +34,3 @@ target_link_libraries(minifi-wel ${LIBMINIFI} Threads::Threads)
target_link_libraries(minifi-wel PUGI::libpugixml ZLIB::ZLIB Wevtapi.lib)
register_extension(minifi-wel "WEL EXTENSIONS" WEL-EXTENSION "Enables the suite of Windows Event Log extensions." "extensions/windows-event-log/tests")
-register_extension_linter(minifi-wel-extension-linter)
(nifi-minifi-cpp) 02/04: MINIFICPP-2563 Add build option for enabling link time optimization
Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
fgerlits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 5eda82dc1f5432fea40458961f8e65f5555bc05c
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Tue Apr 15 09:15:16 2025 +0200
MINIFICPP-2563 Add build option for enabling link time optimization
Signed-off-by: Ferenc Gerlits <fg...@gmail.com>
Closes #1963
---
CMakeLists.txt | 14 ++++++++
bootstrap.sh | 7 ++++
bstrp_functions.sh | 11 ++++---
cmake/MiNiFiOptions.cmake | 1 +
.../tests/ProcessContextExprTests.cpp | 38 +++++++++++-----------
.../rocksdb-repos/database/RocksDatabase.cpp | 17 +++++-----
extensions/rocksdb-repos/database/RocksDatabase.h | 2 --
.../rocksdb-repos/database/RocksDbInstance.cpp | 5 ++-
.../rocksdb-repos/database/RocksDbInstance.h | 2 +-
.../tests/unit/ManifestTests.cpp | 6 ++--
libminifi/src/agent/agent_docs.cpp | 9 +++--
11 files changed, 68 insertions(+), 44 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fae0cc88c..b2ecde8c6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -148,6 +148,20 @@ if (MINIFI_ADVANCED_CODE_COVERAGE)
append_coverage_compiler_flags()
endif()
+if (MINIFI_ADVANCED_LINK_TIME_OPTIMIZATION)
+ if (WIN32)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /GL")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GL")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LTCG")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /LTCG")
+ else()
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto")
+ endif()
+endif()
+
#### Third party dependencies ####
# Define function for passing dependencies
diff --git a/bootstrap.sh b/bootstrap.sh
index e0113df11..08de26be8 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -324,6 +324,7 @@ USE_SHARED_LIBS=${TRUE}
ASAN_ENABLED=${FALSE}
MINIFI_FAIL_ON_WARNINGS=${FALSE}
TESTS_ENABLED=${TRUE}
+LTO_ENABLED=${FALSE}
## name, default, values
add_multi_option BUILD_PROFILE "RelWithDebInfo" "RelWithDebInfo" "Debug" "MinSizeRel" "Release"
@@ -474,6 +475,12 @@ build_cmake_command(){
CMAKE_BUILD_COMMAND="${CMAKE_BUILD_COMMAND} -DMINIFI_FAIL_ON_WARNINGS=OFF"
fi
+ if [ "${LTO_ENABLED}" = "${TRUE}" ]; then
+ CMAKE_BUILD_COMMAND="${CMAKE_BUILD_COMMAND} -DMINIFI_ADVANCED_LINK_TIME_OPTIMIZATION=ON "
+ else
+ CMAKE_BUILD_COMMAND="${CMAKE_BUILD_COMMAND} -DMINIFI_ADVANCED_LINK_TIME_OPTIMIZATION=OFF"
+ fi
+
CMAKE_BUILD_COMMAND="${CMAKE_BUILD_COMMAND} -DBUILD_IDENTIFIER=${BUILD_IDENTIFIER}"
CMAKE_BUILD_COMMAND="${CMAKE_BUILD_COMMAND} -DCMAKE_BUILD_TYPE=${BUILD_PROFILE}"
diff --git a/bstrp_functions.sh b/bstrp_functions.sh
index f78220a9d..4783a8d27 100755
--- a/bstrp_functions.sh
+++ b/bstrp_functions.sh
@@ -183,6 +183,7 @@ save_state(){
echo_state_variable USE_SHARED_LIBS
echo_state_variable ASAN_ENABLED
echo_state_variable MINIFI_FAIL_ON_WARNINGS
+ echo_state_variable LTO_ENABLED
for option in "${OPTIONS[@]}" ; do
echo_state_variable "${option}"
done
@@ -408,10 +409,11 @@ show_supported_features() {
echo "****************************************"
echo "1. Enable Tests ................$(print_feature_status TESTS_ENABLED)"
echo "2. Enable all extensions"
- echo "4. Use Shared Dependency Links .$(print_feature_status USE_SHARED_LIBS)"
- echo "5. Build Profile ...............$(print_multi_option_status BUILD_PROFILE)"
- echo "6. Create ASAN build ...........$(print_feature_status ASAN_ENABLED)"
- echo "7. Treat warnings as errors.....$(print_feature_status MINIFI_FAIL_ON_WARNINGS)"
+ echo "4. Use Shared Dependency Links ...$(print_feature_status USE_SHARED_LIBS)"
+ echo "5. Build Profile .................$(print_multi_option_status BUILD_PROFILE)"
+ echo "6. Create ASAN build .............$(print_feature_status ASAN_ENABLED)"
+ echo "7. Treat warnings as errors.......$(print_feature_status MINIFI_FAIL_ON_WARNINGS)"
+ echo "8. Enable link time optimization .$(print_feature_status LTO_ENABLED)"
echo "P. Continue with these options"
if [ "$GUIDED_INSTALL" = "${TRUE}" ]; then
echo "R. Return to Main Menu"
@@ -458,6 +460,7 @@ read_feature_options(){
5) ToggleMultiOption BUILD_PROFILE;;
6) ToggleFeature ASAN_ENABLED;;
7) ToggleFeature MINIFI_FAIL_ON_WARNINGS;;
+ 8) ToggleFeature LTO_ENABLED;;
p) export FEATURES_SELECTED="true" ;;
r) if [ "$GUIDED_INSTALL" = "${TRUE}" ]; then
export MENU="main"
diff --git a/cmake/MiNiFiOptions.cmake b/cmake/MiNiFiOptions.cmake
index 8fb152b33..9503d8a0f 100644
--- a/cmake/MiNiFiOptions.cmake
+++ b/cmake/MiNiFiOptions.cmake
@@ -72,6 +72,7 @@ add_minifi_option(AWS_ENABLE_UNITY_BUILD "If enabled, AWS SDK libraries will be
add_minifi_dependent_option(MINIFI_ADVANCED_ASAN_BUILD "Uses AddressSanitizer to instrument the code" OFF "NOT WIN32" OFF)
add_minifi_dependent_option(MINIFI_ADVANCED_CODE_COVERAGE "Use coverage build options and enable coverage build target" OFF "NOT WIN32" OFF)
+add_minifi_option(MINIFI_ADVANCED_LINK_TIME_OPTIMIZATION "Use link time optimization" OFF)
if (WIN32)
add_minifi_option(MINIFI_INCLUDE_VC_REDIST_MERGE_MODULES "Include merge modules for Visual C++ Redistributable with the MSI generated by CPack. The resulting MSI is not distributable under Apache 2.0." OFF)
diff --git a/extensions/expression-language/tests/ProcessContextExprTests.cpp b/extensions/expression-language/tests/ProcessContextExprTests.cpp
index 0537cb7a8..07133b31d 100644
--- a/extensions/expression-language/tests/ProcessContextExprTests.cpp
+++ b/extensions/expression-language/tests/ProcessContextExprTests.cpp
@@ -30,7 +30,7 @@
namespace org::apache::nifi::minifi {
-class DummyProcessor : public core::ProcessorImpl {
+class DummyProcessContextExprProcessor : public core::ProcessorImpl {
public:
using core::ProcessorImpl::ProcessorImpl;
@@ -53,50 +53,50 @@ class DummyProcessor : public core::ProcessorImpl {
void initialize() override { setSupportedProperties(Properties); }
};
-REGISTER_RESOURCE(DummyProcessor, Processor);
+REGISTER_RESOURCE(DummyProcessContextExprProcessor, Processor);
} // namespace org::apache::nifi::minifi
TEST_CASE("ProcessContextExpr can update existing processor properties", "[setProperty][getProperty]") {
TestController test_controller;
std::shared_ptr<TestPlan> test_plan = test_controller.createPlan();
- [[maybe_unused]] minifi::core::Processor* dummy_processor = test_plan->addProcessor("DummyProcessor", "dummy_processor");
+ [[maybe_unused]] minifi::core::Processor* dummy_processor = test_plan->addProcessor("DummyProcessContextExprProcessor", "dummy_processor");
std::shared_ptr<minifi::core::ProcessContext> context = [test_plan] { test_plan->runNextProcessor(); return test_plan->getCurrentContext(); }();
REQUIRE(dynamic_pointer_cast<minifi::core::ProcessContextExpr>(context) != nullptr);
SECTION("Set and get simple property") {
SECTION("Using a Property reference parameter") {
- REQUIRE(context->setProperty(minifi::DummyProcessor::SimpleProperty, "foo"));
- CHECK(context->getProperty(minifi::DummyProcessor::SimpleProperty, nullptr) == "foo");
+ REQUIRE(context->setProperty(minifi::DummyProcessContextExprProcessor::SimpleProperty, "foo"));
+ CHECK(context->getProperty(minifi::DummyProcessContextExprProcessor::SimpleProperty, nullptr) == "foo");
- REQUIRE(context->setProperty(minifi::DummyProcessor::SimpleProperty, "bar"));
- CHECK(context->getProperty(minifi::DummyProcessor::SimpleProperty, nullptr) == "bar");
+ REQUIRE(context->setProperty(minifi::DummyProcessContextExprProcessor::SimpleProperty, "bar"));
+ CHECK(context->getProperty(minifi::DummyProcessContextExprProcessor::SimpleProperty, nullptr) == "bar");
}
SECTION("Using a string parameter") {
- REQUIRE(context->setProperty(minifi::DummyProcessor::SimpleProperty, "foo"));
- CHECK(context->getProperty(minifi::DummyProcessor::SimpleProperty, nullptr) == "foo");
+ REQUIRE(context->setProperty(minifi::DummyProcessContextExprProcessor::SimpleProperty, "foo"));
+ CHECK(context->getProperty(minifi::DummyProcessContextExprProcessor::SimpleProperty, nullptr) == "foo");
- REQUIRE(context->setProperty(minifi::DummyProcessor::SimpleProperty, "bar"));
- CHECK(context->getProperty(minifi::DummyProcessor::SimpleProperty, nullptr) == "bar");
+ REQUIRE(context->setProperty(minifi::DummyProcessContextExprProcessor::SimpleProperty, "bar"));
+ CHECK(context->getProperty(minifi::DummyProcessContextExprProcessor::SimpleProperty, nullptr) == "bar");
}
}
SECTION("Set and get expression language property") {
SECTION("Using a Property reference parameter") {
- REQUIRE(context->setProperty(minifi::DummyProcessor::ExpressionLanguageProperty, "foo"));
- CHECK(context->getProperty(minifi::DummyProcessor::ExpressionLanguageProperty, nullptr) == "foo");
+ REQUIRE(context->setProperty(minifi::DummyProcessContextExprProcessor::ExpressionLanguageProperty, "foo"));
+ CHECK(context->getProperty(minifi::DummyProcessContextExprProcessor::ExpressionLanguageProperty, nullptr) == "foo");
- REQUIRE(context->setProperty(minifi::DummyProcessor::ExpressionLanguageProperty, "bar"));
- CHECK(context->getProperty(minifi::DummyProcessor::ExpressionLanguageProperty, nullptr) == "bar");
+ REQUIRE(context->setProperty(minifi::DummyProcessContextExprProcessor::ExpressionLanguageProperty, "bar"));
+ CHECK(context->getProperty(minifi::DummyProcessContextExprProcessor::ExpressionLanguageProperty, nullptr) == "bar");
}
SECTION("Using a string parameter") {
- REQUIRE(context->setProperty(minifi::DummyProcessor::ExpressionLanguageProperty, "foo"));
- CHECK(context->getProperty(minifi::DummyProcessor::ExpressionLanguageProperty, nullptr) == "foo");
+ REQUIRE(context->setProperty(minifi::DummyProcessContextExprProcessor::ExpressionLanguageProperty, "foo"));
+ CHECK(context->getProperty(minifi::DummyProcessContextExprProcessor::ExpressionLanguageProperty, nullptr) == "foo");
- REQUIRE(context->setProperty(minifi::DummyProcessor::ExpressionLanguageProperty, "bar"));
- CHECK(context->getProperty(minifi::DummyProcessor::ExpressionLanguageProperty, nullptr) == "bar");
+ REQUIRE(context->setProperty(minifi::DummyProcessContextExprProcessor::ExpressionLanguageProperty, "bar"));
+ CHECK(context->getProperty(minifi::DummyProcessContextExprProcessor::ExpressionLanguageProperty, nullptr) == "bar");
}
}
}
diff --git a/extensions/rocksdb-repos/database/RocksDatabase.cpp b/extensions/rocksdb-repos/database/RocksDatabase.cpp
index df1c597cc..1ab89f83c 100644
--- a/extensions/rocksdb-repos/database/RocksDatabase.cpp
+++ b/extensions/rocksdb-repos/database/RocksDatabase.cpp
@@ -27,32 +27,31 @@
namespace org::apache::nifi::minifi::internal {
-std::shared_ptr<core::logging::Logger> RocksDatabase::logger_ = core::logging::LoggerFactory<RocksDatabase>::getLogger();
-
std::unique_ptr<RocksDatabase> RocksDatabase::create(const DBOptionsPatch& db_options_patch, const ColumnFamilyOptionsPatch& cf_options_patch, const std::string& uri,
const std::unordered_map<std::string, std::string>& db_config_override, RocksDbMode mode) {
const std::string scheme = "minifidb://";
- logger_->log_info("Acquiring database handle '{}'", uri);
+ auto logger = core::logging::LoggerFactory<RocksDatabase>::getLogger();
+ logger->log_info("Acquiring database handle '{}'", uri);
std::string db_path = uri;
std::string db_column = "default";
if (utils::string::startsWith(uri, scheme)) {
const std::string path = uri.substr(scheme.length());
- logger_->log_info("RocksDB scheme is detected in '{}'", uri);
+ logger->log_info("RocksDB scheme is detected in '{}'", uri);
// last segment is treated as the column name
std::string::size_type pos = path.find_last_of('/');
if (pos == std::string::npos) {
pos = path.find_last_of('\\');
}
if (pos == std::string::npos) {
- logger_->log_error("Couldn't detect the column name in '{}'", uri);
+ logger->log_error("Couldn't detect the column name in '{}'", uri);
return nullptr;
}
db_path = path.substr(0, pos);
db_column = path.substr(pos + 1);
- logger_->log_info("Using column '{}' in rocksdb database '{}'", db_column, db_path);
+ logger->log_info("Using column '{}' in rocksdb database '{}'", db_column, db_path);
} else {
- logger_->log_info("Simple directory detected '{}', using as is", uri);
+ logger->log_info("Simple directory detected '{}', using as is", uri);
}
if (mode == RocksDbMode::ReadOnly) {
@@ -68,11 +67,11 @@ std::unique_ptr<RocksDatabase> RocksDatabase::create(const DBOptionsPatch& db_op
std::lock_guard<std::mutex> guard(mtx);
instance = databases[db_path].lock();
if (!instance) {
- logger_->log_info("Opening rocksdb database '{}'", db_path);
+ logger->log_info("Opening rocksdb database '{}'", db_path);
instance = std::make_shared<RocksDbInstance>(db_path, mode);
databases[db_path] = instance;
} else {
- logger_->log_info("Using previously opened rocksdb instance '{}'", db_path);
+ logger->log_info("Using previously opened rocksdb instance '{}'", db_path);
}
}
return std::make_unique<RocksDatabase>(instance, db_column, db_options_patch, cf_options_patch, db_config_override);
diff --git a/extensions/rocksdb-repos/database/RocksDatabase.h b/extensions/rocksdb-repos/database/RocksDatabase.h
index afab4f844..175d0cb21 100644
--- a/extensions/rocksdb-repos/database/RocksDatabase.h
+++ b/extensions/rocksdb-repos/database/RocksDatabase.h
@@ -59,8 +59,6 @@ class RocksDatabase {
private:
const std::string column_;
std::shared_ptr<RocksDbInstance> db_;
-
- static std::shared_ptr<core::logging::Logger> logger_;
};
} // namespace org::apache::nifi::minifi::internal
diff --git a/extensions/rocksdb-repos/database/RocksDbInstance.cpp b/extensions/rocksdb-repos/database/RocksDbInstance.cpp
index a08311573..9601bd46f 100644
--- a/extensions/rocksdb-repos/database/RocksDbInstance.cpp
+++ b/extensions/rocksdb-repos/database/RocksDbInstance.cpp
@@ -27,9 +27,8 @@
namespace org::apache::nifi::minifi::internal {
-std::shared_ptr<core::logging::Logger> RocksDbInstance::logger_ = core::logging::LoggerFactory<RocksDbInstance>::getLogger();
-
-RocksDbInstance::RocksDbInstance(std::string path, RocksDbMode mode) : db_name_(std::move(path)), mode_(mode) {}
+RocksDbInstance::RocksDbInstance(std::string path, RocksDbMode mode) : db_name_(std::move(path)), mode_(mode), logger_(core::logging::LoggerFactory<RocksDbInstance>::getLogger()) {
+}
void RocksDbInstance::invalidate() {
std::lock_guard<std::mutex> db_guard{mtx_};
diff --git a/extensions/rocksdb-repos/database/RocksDbInstance.h b/extensions/rocksdb-repos/database/RocksDbInstance.h
index c6bfbe241..c29240219 100644
--- a/extensions/rocksdb-repos/database/RocksDbInstance.h
+++ b/extensions/rocksdb-repos/database/RocksDbInstance.h
@@ -76,7 +76,7 @@ class RocksDbInstance {
std::unordered_map<std::string, ColumnConfig> column_configs_;
- static std::shared_ptr<core::logging::Logger> logger_;
+ std::shared_ptr<core::logging::Logger> logger_;
};
} // namespace org::apache::nifi::minifi::internal
diff --git a/extensions/standard-processors/tests/unit/ManifestTests.cpp b/extensions/standard-processors/tests/unit/ManifestTests.cpp
index 2e04ca3db..2ba13b0ef 100644
--- a/extensions/standard-processors/tests/unit/ManifestTests.cpp
+++ b/extensions/standard-processors/tests/unit/ManifestTests.cpp
@@ -69,9 +69,9 @@ TEST_CASE("Test Valid Regex", "[validRegex]") {
REQUIRE_FALSE(resp.children.empty());
const auto &processors = resp.children[0];
REQUIRE_FALSE(processors.children.empty());
- const auto &proc_0 = processors.children[0];
- REQUIRE_FALSE(proc_0.children.empty());
- const auto &prop_descriptors = proc_0.children[0];
+ const auto &processor_with_properties = "org.apache.nifi.minifi.processors.UpdateAttribute" != processors.children[0].name ? processors.children[0] : processors.children[1];
+ REQUIRE_FALSE(processor_with_properties.children.empty());
+ const auto &prop_descriptors = processor_with_properties.children[0];
REQUIRE_FALSE(prop_descriptors.children.empty());
const auto &prop_0 = prop_descriptors.children[0];
REQUIRE(prop_0.children.size() >= 7);
diff --git a/libminifi/src/agent/agent_docs.cpp b/libminifi/src/agent/agent_docs.cpp
index 30f1b9a9b..9f6b58624 100644
--- a/libminifi/src/agent/agent_docs.cpp
+++ b/libminifi/src/agent/agent_docs.cpp
@@ -20,15 +20,18 @@
namespace org::apache::nifi::minifi {
namespace {
-std::map<std::string, Components> AgentDocs_class_mappings;
+std::map<std::string, Components>& getAgentDocsClassMappings() {
+ static std::map<std::string, Components> mappings;
+ return mappings;
+}
} // namespace
const std::map<std::string, Components>& AgentDocs::getClassDescriptions() {
- return AgentDocs_class_mappings;
+ return getAgentDocsClassMappings();
}
std::map<std::string, Components>& AgentDocs::getMutableClassDescriptions() {
- return AgentDocs_class_mappings;
+ return getAgentDocsClassMappings();
}
(nifi-minifi-cpp) 03/04: MINIFICPP-2601 Separate protobuf library from grpc
Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
fgerlits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 97087b22e303fd3eb02c4ba1e5f6ebdb1b9cacc7
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Tue Aug 5 16:42:18 2025 +0200
MINIFICPP-2601 Separate protobuf library from grpc
- Upgrade grpc library to v1.72.2
Signed-off-by: Ferenc Gerlits <fg...@gmail.com>
Closes #2000
---
LICENSE | 2 +-
cmake/Grpc.cmake | 17 +-
cmake/Protobuf.cmake | 37 ++
extensions/grafana-loki/CMakeLists.txt | 1 -
thirdparty/grpc/fix-constants-on-windows.patch | 35 --
thirdparty/grpc/fix-protobuf-find-package.patch | 22 ++
...e-custom-commands-for-unused-dependencies.patch | 428 ---------------------
7 files changed, 67 insertions(+), 475 deletions(-)
diff --git a/LICENSE b/LICENSE
index 2c144ea31..28eb012c2 100644
--- a/LICENSE
+++ b/LICENSE
@@ -3231,7 +3231,7 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-This product bundles 'protobuf' within 'gRPC' under a 3-Clause BSD license:
+This product bundles 'protobuf' under a 3-Clause BSD license:
Copyright 2008 Google Inc. All rights reserved.
diff --git a/cmake/Grpc.cmake b/cmake/Grpc.cmake
index 854780586..266c7f84b 100644
--- a/cmake/Grpc.cmake
+++ b/cmake/Grpc.cmake
@@ -15,6 +15,8 @@
# specific language governing permissions and limitations
# under the License.
include(FetchContent)
+include(Abseil)
+include(Protobuf)
set(gRPC_BUILD_GRPC_CSHARP_PLUGIN OFF CACHE BOOL "" FORCE)
set(gRPC_BUILD_GRPC_NODE_PLUGIN OFF CACHE BOOL "" FORCE)
@@ -26,20 +28,17 @@ set(RE2_BUILD_TESTING OFF CACHE BOOL "" FORCE)
set(gRPC_ABSL_PROVIDER "package" CACHE STRING "" FORCE)
set(gRPC_ZLIB_PROVIDER "package" CACHE STRING "" FORCE)
set(gRPC_SSL_PROVIDER "package" CACHE STRING "" FORCE)
-set(protobuf_BUILD_TESTS OFF CACHE BOOL "" FORCE)
-set(protobuf_ABSL_PROVIDER "package" CACHE STRING "" FORCE)
+set(gRPC_PROTOBUF_PROVIDER "package" CACHE STRING "" FORCE)
-set(PATCH_FILE_1 "${CMAKE_SOURCE_DIR}/thirdparty/grpc/remove-custom-commands-for-unused-dependencies.patch")
-set(PATCH_FILE_2 "${CMAKE_SOURCE_DIR}/thirdparty/grpc/fix-constants-on-windows.patch")
+set(PATCH_FILE "${CMAKE_SOURCE_DIR}/thirdparty/grpc/fix-protobuf-find-package.patch")
set(PC ${Bash_EXECUTABLE} -c "set -x &&\
- (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_1}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_1}\\\") &&\
- (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_2}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_2}\\\")")
+ (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE}\\\")")
FetchContent_Declare(
grpc
GIT_REPOSITORY https://github.com/grpc/grpc
- GIT_TAG v1.68.0
- GIT_SUBMODULES "third_party/cares/cares third_party/protobuf third_party/re2 third_party/upb"
+ GIT_TAG v1.72.2
+ GIT_SUBMODULES "third_party/cares/cares third_party/re2 third_party/upb"
PATCH_COMMAND "${PC}"
SYSTEM
)
@@ -49,6 +48,4 @@ FetchContent_MakeAvailable(grpc)
add_dependencies(grpc++ OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB)
set(GRPC_INCLUDE_DIR "${grpc_SOURCE_DIR}/include" CACHE STRING "" FORCE)
-set(PROTOBUF_INCLUDE_DIR "${protobuf_SOURCE_DIR}/src" CACHE STRING "" FORCE)
-set(PROTOBUF_COMPILER "$<TARGET_FILE:protoc>" CACHE STRING "" FORCE)
set(GRPC_CPP_PLUGIN "$<TARGET_FILE:grpc_cpp_plugin>" CACHE STRING "" FORCE)
diff --git a/cmake/Protobuf.cmake b/cmake/Protobuf.cmake
new file mode 100644
index 000000000..eb0a73565
--- /dev/null
+++ b/cmake/Protobuf.cmake
@@ -0,0 +1,37 @@
+# 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.
+include(FetchContent)
+
+set(protobuf_BUILD_TESTS OFF CACHE BOOL "" FORCE)
+
+FetchContent_Declare(
+ protobuf
+ URL https://github.com/protocolbuffers/protobuf/archive/refs/tags/v31.1.tar.gz
+ URL_HASH SHA256=c3a0a9ece8932e31c3b736e2db18b1c42e7070cd9b881388b26d01aa71e24ca2
+)
+FetchContent_MakeAvailable(protobuf)
+
+set(PROTOBUF_INCLUDE_DIR "${protobuf_SOURCE_DIR}/src" CACHE STRING "" FORCE)
+set(PROTOBUF_COMPILER "$<TARGET_FILE:protoc>" CACHE STRING "" FORCE)
+
+if (WIN32)
+ set(PROTOBUF_LIBRARIES "${protobuf_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE}/protobuf_static.lib" CACHE STRING "" FORCE)
+ set(PROTOBUF_LIBRARY "${protobuf_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE}/protobuf_static.lib" CACHE STRING "" FORCE)
+else()
+ set(PROTOBUF_LIBRARIES "${protobuf_BINARY_DIR}/lib/libprotobuf.a" CACHE STRING "" FORCE)
+ set(PROTOBUF_LIBRARY "${protobuf_BINARY_DIR}/lib/libprotobuf.a" CACHE STRING "" FORCE)
+endif()
diff --git a/extensions/grafana-loki/CMakeLists.txt b/extensions/grafana-loki/CMakeLists.txt
index d21d77538..e1278595d 100644
--- a/extensions/grafana-loki/CMakeLists.txt
+++ b/extensions/grafana-loki/CMakeLists.txt
@@ -23,7 +23,6 @@ endif()
include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt)
if (ENABLE_GRPC_FOR_LOKI)
- include(Abseil)
include(Grpc)
set(LOKI_PROTOBUF_GENERATED_DIR ${CMAKE_BINARY_DIR}/grafana-loki-protobuf-generated)
diff --git a/thirdparty/grpc/fix-constants-on-windows.patch b/thirdparty/grpc/fix-constants-on-windows.patch
deleted file mode 100644
index 90e087396..000000000
--- a/thirdparty/grpc/fix-constants-on-windows.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff --git a/third_party/protobuf/upb/message/internal/message.c b/third_party/protobuf/upb/message/internal/message.c
-index 57ab2d737..5f321c7bb 100644
---- a/third_party/protobuf/upb/message/internal/message.c
-+++ b/third_party/protobuf/upb/message/internal/message.c
-@@ -17,9 +17,9 @@
- // Must be last.
- #include "upb/port/def.inc"
-
--const float kUpb_FltInfinity = INFINITY;
--const double kUpb_Infinity = INFINITY;
--const double kUpb_NaN = NAN;
-+const float kUpb_FltInfinity = (float)(1.0 / 0.0);
-+const double kUpb_Infinity = 1.0 / 0.0;
-+const double kUpb_NaN = 0.0 / 0.0;
-
- bool UPB_PRIVATE(_upb_Message_Realloc)(struct upb_Message* msg, size_t need,
- upb_Arena* a) {
-diff --git a/third_party/upb/upb/message/internal/message.c b/third_party/upb/upb/message/internal/message.c
-index 57ab2d737..5f321c7bb 100644
---- a/third_party/upb/upb/message/internal/message.c
-+++ b/third_party/upb/upb/message/internal/message.c
-@@ -17,9 +17,9 @@
- // Must be last.
- #include "upb/port/def.inc"
-
--const float kUpb_FltInfinity = INFINITY;
--const double kUpb_Infinity = INFINITY;
--const double kUpb_NaN = NAN;
-+const float kUpb_FltInfinity = (float)(1.0 / 0.0);
-+const double kUpb_Infinity = 1.0 / 0.0;
-+const double kUpb_NaN = 0.0 / 0.0;
-
- bool UPB_PRIVATE(_upb_Message_Realloc)(struct upb_Message* msg, size_t need,
- upb_Arena* a) {
-
diff --git a/thirdparty/grpc/fix-protobuf-find-package.patch b/thirdparty/grpc/fix-protobuf-find-package.patch
new file mode 100644
index 000000000..52b6de459
--- /dev/null
+++ b/thirdparty/grpc/fix-protobuf-find-package.patch
@@ -0,0 +1,22 @@
+diff --git a/cmake/protobuf.cmake b/cmake/protobuf.cmake
+index ad80ca6e46..8df42dde40 100644
+--- a/cmake/protobuf.cmake
++++ b/cmake/protobuf.cmake
+@@ -55,7 +55,7 @@ if(gRPC_PROTOBUF_PROVIDER STREQUAL "module")
+ set(gRPC_INSTALL FALSE)
+ endif()
+ elseif(gRPC_PROTOBUF_PROVIDER STREQUAL "package")
+- find_package(Protobuf REQUIRED CONFIG)
++ find_package(Protobuf REQUIRED)
+
+ if(Protobuf_FOUND OR PROTOBUF_FOUND)
+ if(TARGET protobuf::${_gRPC_PROTOBUF_LIBRARY_NAME})
+@@ -69,7 +69,7 @@ elseif(gRPC_PROTOBUF_PROVIDER STREQUAL "package")
+ set(_gRPC_PROTOBUF_PROTOC_LIBRARIES ${PROTOBUF_PROTOC_LIBRARIES})
+ endif()
+ # Well-known proto files are expected to be in the Protobuf include directory.
+- get_target_property(_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR ${_gRPC_PROTOBUF_LIBRARIES} INTERFACE_INCLUDE_DIRECTORIES)
++ set(_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR ${PROTOBUF_INCLUDE_DIR})
+ if(TARGET protobuf::protoc)
+ set(_gRPC_PROTOBUF_PROTOC protobuf::protoc)
+ if(CMAKE_CROSSCOMPILING)
diff --git a/thirdparty/grpc/remove-custom-commands-for-unused-dependencies.patch b/thirdparty/grpc/remove-custom-commands-for-unused-dependencies.patch
deleted file mode 100644
index c90bd194c..000000000
--- a/thirdparty/grpc/remove-custom-commands-for-unused-dependencies.patch
+++ /dev/null
@@ -1,428 +0,0 @@
-Removing the line ending whitespaces are not needed for the patch, but it ensures that the reverse patch in the dry run of the
-patch command fails. Otherwise the patch is not applied in the cmake configuration.
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index fc4b6a40a5..ae494f1464 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -489,7 +489,7 @@ if(WIN32)
- set(_gRPC_ALLTARGETS_LIBRARIES ${_gRPC_ALLTARGETS_LIBRARIES} ws2_32 crypt32)
- set(_gRPC_STATIC_WIN32 STATIC)
- endif()
--
-+
- if(BUILD_SHARED_LIBS AND WIN32)
-
- # Currently for shared lib on Windows (i.e. a DLL) certain bits of source code
-@@ -890,411 +890,6 @@ protobuf_generate_grpc_cpp_with_import_path_correction(
- protobuf_generate_grpc_cpp_with_import_path_correction(
- test/core/tsi/alts/fake_handshaker/transport_security_common.proto test/core/tsi/alts/fake_handshaker/transport_security_common.proto
- )
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/annotations/deprecation.proto envoy/annotations/deprecation.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/annotations/resource.proto envoy/annotations/resource.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/accesslog/v3/accesslog.proto envoy/config/accesslog/v3/accesslog.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/cluster/v3/circuit_breaker.proto envoy/config/cluster/v3/circuit_breaker.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/cluster/v3/cluster.proto envoy/config/cluster/v3/cluster.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/cluster/v3/filter.proto envoy/config/cluster/v3/filter.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/cluster/v3/outlier_detection.proto envoy/config/cluster/v3/outlier_detection.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/address.proto envoy/config/core/v3/address.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/backoff.proto envoy/config/core/v3/backoff.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/base.proto envoy/config/core/v3/base.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/config_source.proto envoy/config/core/v3/config_source.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/event_service_config.proto envoy/config/core/v3/event_service_config.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/extension.proto envoy/config/core/v3/extension.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/grpc_method_list.proto envoy/config/core/v3/grpc_method_list.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/grpc_service.proto envoy/config/core/v3/grpc_service.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/health_check.proto envoy/config/core/v3/health_check.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/http_service.proto envoy/config/core/v3/http_service.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/http_uri.proto envoy/config/core/v3/http_uri.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/protocol.proto envoy/config/core/v3/protocol.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/proxy_protocol.proto envoy/config/core/v3/proxy_protocol.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/resolver.proto envoy/config/core/v3/resolver.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/socket_option.proto envoy/config/core/v3/socket_option.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/substitution_format_string.proto envoy/config/core/v3/substitution_format_string.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/core/v3/udp_socket_config.proto envoy/config/core/v3/udp_socket_config.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/endpoint/v3/endpoint.proto envoy/config/endpoint/v3/endpoint.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/endpoint/v3/endpoint_components.proto envoy/config/endpoint/v3/endpoint_components.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/endpoint/v3/load_report.proto envoy/config/endpoint/v3/load_report.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/listener/v3/api_listener.proto envoy/config/listener/v3/api_listener.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/listener/v3/listener.proto envoy/config/listener/v3/listener.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/listener/v3/listener_components.proto envoy/config/listener/v3/listener_components.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/listener/v3/quic_config.proto envoy/config/listener/v3/quic_config.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/listener/v3/udp_listener_config.proto envoy/config/listener/v3/udp_listener_config.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/rbac/v3/rbac.proto envoy/config/rbac/v3/rbac.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/route/v3/route.proto envoy/config/route/v3/route.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/route/v3/route_components.proto envoy/config/route/v3/route_components.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/route/v3/scoped_route.proto envoy/config/route/v3/scoped_route.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/trace/v3/datadog.proto envoy/config/trace/v3/datadog.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/trace/v3/dynamic_ot.proto envoy/config/trace/v3/dynamic_ot.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/trace/v3/http_tracer.proto envoy/config/trace/v3/http_tracer.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/trace/v3/lightstep.proto envoy/config/trace/v3/lightstep.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/trace/v3/opencensus.proto envoy/config/trace/v3/opencensus.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/trace/v3/opentelemetry.proto envoy/config/trace/v3/opentelemetry.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/trace/v3/service.proto envoy/config/trace/v3/service.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/trace/v3/skywalking.proto envoy/config/trace/v3/skywalking.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/trace/v3/trace.proto envoy/config/trace/v3/trace.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/trace/v3/xray.proto envoy/config/trace/v3/xray.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/config/trace/v3/zipkin.proto envoy/config/trace/v3/zipkin.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/data/accesslog/v3/accesslog.proto envoy/data/accesslog/v3/accesslog.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/clusters/aggregate/v3/cluster.proto envoy/extensions/clusters/aggregate/v3/cluster.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/filters/common/fault/v3/fault.proto envoy/extensions/filters/common/fault/v3/fault.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/filters/http/fault/v3/fault.proto envoy/extensions/filters/http/fault/v3/fault.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.proto envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/filters/http/rbac/v3/rbac.proto envoy/extensions/filters/http/rbac/v3/rbac.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/filters/http/router/v3/router.proto envoy/extensions/filters/http/router/v3/router.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/http/stateful_session/cookie/v3/cookie.proto envoy/extensions/http/stateful_session/cookie/v3/cookie.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/load_balancing_policies/common/v3/common.proto envoy/extensions/load_balancing_policies/common/v3/common.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.proto envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.proto envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/rbac/audit_loggers/stream/v3/stream.proto envoy/extensions/rbac/audit_loggers/stream/v3/stream.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.proto envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/transport_sockets/tls/v3/cert.proto envoy/extensions/transport_sockets/tls/v3/cert.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/transport_sockets/tls/v3/common.proto envoy/extensions/transport_sockets/tls/v3/common.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/transport_sockets/tls/v3/secret.proto envoy/extensions/transport_sockets/tls/v3/secret.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/transport_sockets/tls/v3/tls.proto envoy/extensions/transport_sockets/tls/v3/tls.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/extensions/upstreams/http/v3/http_protocol_options.proto envoy/extensions/upstreams/http/v3/http_protocol_options.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/service/discovery/v3/ads.proto envoy/service/discovery/v3/ads.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/service/discovery/v3/discovery.proto envoy/service/discovery/v3/discovery.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/http/v3/cookie.proto envoy/type/http/v3/cookie.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/http/v3/path_transformation.proto envoy/type/http/v3/path_transformation.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/matcher/v3/filter_state.proto envoy/type/matcher/v3/filter_state.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/matcher/v3/http_inputs.proto envoy/type/matcher/v3/http_inputs.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/matcher/v3/metadata.proto envoy/type/matcher/v3/metadata.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/matcher/v3/node.proto envoy/type/matcher/v3/node.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/matcher/v3/number.proto envoy/type/matcher/v3/number.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/matcher/v3/path.proto envoy/type/matcher/v3/path.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/matcher/v3/regex.proto envoy/type/matcher/v3/regex.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/matcher/v3/status_code_input.proto envoy/type/matcher/v3/status_code_input.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/matcher/v3/string.proto envoy/type/matcher/v3/string.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/matcher/v3/struct.proto envoy/type/matcher/v3/struct.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/matcher/v3/value.proto envoy/type/matcher/v3/value.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/metadata/v3/metadata.proto envoy/type/metadata/v3/metadata.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/tracing/v3/custom_tag.proto envoy/type/tracing/v3/custom_tag.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/v3/hash_policy.proto envoy/type/v3/hash_policy.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/v3/http.proto envoy/type/v3/http.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/v3/http_status.proto envoy/type/v3/http_status.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/v3/percent.proto envoy/type/v3/percent.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/v3/range.proto envoy/type/v3/range.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/v3/ratelimit_strategy.proto envoy/type/v3/ratelimit_strategy.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/v3/ratelimit_unit.proto envoy/type/v3/ratelimit_unit.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/v3/semantic_version.proto envoy/type/v3/semantic_version.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/envoy-api/envoy/type/v3/token_bucket.proto envoy/type/v3/token_bucket.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/googleapis/google/api/annotations.proto google/api/annotations.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/googleapis/google/api/expr/v1alpha1/checked.proto google/api/expr/v1alpha1/checked.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/googleapis/google/api/expr/v1alpha1/syntax.proto google/api/expr/v1alpha1/syntax.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/googleapis/google/api/http.proto google/api/http.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/googleapis/google/api/httpbody.proto google/api/httpbody.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/googleapis/google/rpc/status.proto google/rpc/status.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/opencensus-proto/src/opencensus/proto/trace/v1/trace_config.proto opencensus/proto/trace/v1/trace_config.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/protoc-gen-validate/validate/validate.proto validate/validate.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/udpa/annotations/migrate.proto udpa/annotations/migrate.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/udpa/annotations/security.proto udpa/annotations/security.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/udpa/annotations/sensitive.proto udpa/annotations/sensitive.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/udpa/annotations/status.proto udpa/annotations/status.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/udpa/annotations/versioning.proto udpa/annotations/versioning.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/udpa/type/v1/typed_struct.proto udpa/type/v1/typed_struct.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/annotations/v3/migrate.proto xds/annotations/v3/migrate.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/annotations/v3/security.proto xds/annotations/v3/security.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/annotations/v3/sensitive.proto xds/annotations/v3/sensitive.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/annotations/v3/status.proto xds/annotations/v3/status.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/annotations/v3/versioning.proto xds/annotations/v3/versioning.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/core/v3/authority.proto xds/core/v3/authority.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/core/v3/cidr.proto xds/core/v3/cidr.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/core/v3/collection_entry.proto xds/core/v3/collection_entry.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/core/v3/context_params.proto xds/core/v3/context_params.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/core/v3/extension.proto xds/core/v3/extension.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/core/v3/resource.proto xds/core/v3/resource.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/core/v3/resource_locator.proto xds/core/v3/resource_locator.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/core/v3/resource_name.proto xds/core/v3/resource_name.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/type/matcher/v3/cel.proto xds/type/matcher/v3/cel.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/type/matcher/v3/domain.proto xds/type/matcher/v3/domain.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/type/matcher/v3/http_inputs.proto xds/type/matcher/v3/http_inputs.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/type/matcher/v3/ip.proto xds/type/matcher/v3/ip.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/type/matcher/v3/matcher.proto xds/type/matcher/v3/matcher.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/type/matcher/v3/range.proto xds/type/matcher/v3/range.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/type/matcher/v3/regex.proto xds/type/matcher/v3/regex.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/type/matcher/v3/string.proto xds/type/matcher/v3/string.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/type/v3/cel.proto xds/type/v3/cel.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/type/v3/range.proto xds/type/v3/range.proto
--)
--protobuf_generate_grpc_cpp_with_import_path_correction(
-- third_party/xds/xds/type/v3/typed_struct.proto xds/type/v3/typed_struct.proto
--)
-
- if(gRPC_BUILD_TESTS)
- add_custom_target(buildtests_c)