Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ env:
CCACHE_DIR: ${{ GITHUB.WORKSPACE }}/.ccache
jobs:
macos_xcode:
name: "macOS 14 aarch64"
runs-on: macos-14
name: "macOS 26 aarch64"
runs-on: macos-26
timeout-minutes: 240
env:
MACOS_MINIFI_OPTIONS: >-
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
- id: install_dependencies
run: |
brew update
brew install ossp-uuid bison flex ccache sqliteodbc automake autoconf ninja
brew install ossp-uuid bison flex ccache sqliteodbc unixodbc automake autoconf ninja
- id: setup_env
name: setup enviroment
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/compiler-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ { id: gcc-12, base_image: gcc:12-bookworm },
{ id: gcc-15, base_image: gcc:15-bookworm } ]
platform: [ { id: gcc-13, base_image: gcc:13-bookworm },
{ id: gcc-15, base_image: gcc:15-trixie } ]
runs-on: ubuntu-24.04

steps:
Expand All @@ -33,8 +33,8 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ { id: clang-16, base_image: silkeh/clang:16-bookworm },
{ id: clang-20, base_image: silkeh/clang:20-bookworm } ]
platform: [ { id: clang-17, base_image: silkeh/clang:17-bookworm },
{ id: clang-21, base_image: silkeh/clang:21-trixie } ]

runs-on: ubuntu-24.04

Expand Down
10 changes: 0 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,6 @@ add_library(RapidJSON INTERFACE)
target_include_directories(RapidJSON SYSTEM INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/rapidjson-48fbd8cd202ca54031fe799db2ad44ffa8e77c13/include")
target_compile_definitions(RapidJSON INTERFACE RAPIDJSON_HAS_STDSTRING)

include(Coroutines)
enable_coroutines()

# gsl-lite
include(GslLite)

Expand All @@ -320,9 +317,6 @@ target_compile_definitions(gsl-lite INTERFACE ${GslDefinitions})
# date
include(Date)

# expected-lite
include(ExpectedLite)

# magic_enum
include(MagicEnum)

Expand All @@ -338,10 +332,6 @@ else()
list(APPEND MINIFI_CPP_COMPILE_OPTIONS -Werror)
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
Expand Down
28 changes: 0 additions & 28 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2758,34 +2758,6 @@ SGI C++ Standard Template Library license

--------------------------------------------------------------------------

This project bundles 'expected-lite' under the Boost Software License 1.0

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

--------------------------------------------------------------------------

This project bundles 'asio' under the Boost Software License 1.0

Boost Software License - Version 1.0 - August 17th, 2003
Expand Down
1 change: 0 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ This software includes third party software subject to the following copyrights:
- IANA timezone database - public domain
- date (HowardHinnant/date) - notices below
- range-v3 - Eric Niebler and other contributors
- expected-lite - Copyright (C) 2016-2020 Martin Moene.
- asio - Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com)
- TartanLlama/expected - public domain, thanks to Sy Brand
- libyaml - Copyright (c) 2006-2016 Kirill Simonov, Copyright (c) 2017-2020 Ingy döt Net
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ Communicating with Apache NiFi can be done using the Site-to-Site protocol. More
#### Utilities
* CMake 3.24 or greater
* Compiler
* g++ 12 or greater
* clang 16 or greater
* g++ 13 or greater
* clang 17 or greater
* msvc 19.33 or greater
* bison 3.0.x+ (3.2 has been shown to fail builds)
* flex 2.6 or greater
Expand Down
22 changes: 0 additions & 22 deletions cmake/Coroutines.cmake

This file was deleted.

8 changes: 2 additions & 6 deletions cmake/CppVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,17 @@ function(set_cpp_version)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:/std:c++latest>)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:/permissive->)
else()
message(STATUS "The Visual Studio C++ compiler ${CMAKE_CXX_COMPILER} is not supported. Please use Visual Studio 2022 or newer.")
message(FATAL_ERROR "The Visual Studio C++ compiler ${CMAKE_CXX_COMPILER} is not supported. Please use Visual Studio 2022 or newer.")
endif()
set(CMAKE_CXX_STANDARD 23 PARENT_SCOPE)
else()
include(CheckCXXCompilerFlag)
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++23 or -std=c++2b. Please use a more recent C++ compiler version.")
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no support for -std=c++23. Please use a more recent C++ compiler version.")
endif()
endif()

Expand Down
28 changes: 0 additions & 28 deletions cmake/ExpectedLite.cmake

This file was deleted.

12 changes: 6 additions & 6 deletions controller/Controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,31 +228,31 @@ bool getJstacks(const utils::net::SocketData& socket_data, std::ostream &out) {
return true;
}

nonstd::expected<void, std::string> getDebugBundle(const utils::net::SocketData& socket_data, const std::filesystem::path& target_dir) {
std::expected<void, std::string> getDebugBundle(const utils::net::SocketData& socket_data, const std::filesystem::path& target_dir) {
const auto connection_stream = std::make_unique<utils::net::AsioSocketConnection>(socket_data);
if (connection_stream->initialize() < 0) {
return nonstd::make_unexpected("Could not connect to remote host " + socket_data.host + ":" + std::to_string(socket_data.port));
return std::unexpected{"Could not connect to remote host " + socket_data.host + ":" + std::to_string(socket_data.port)};
}
io::BufferStream buffer;
auto op = static_cast<uint8_t>(c2::Operation::transfer);
buffer.write(&op, 1);
buffer.write("debug");
if (io::isError(connection_stream->write(buffer.getBuffer()))) {
return nonstd::make_unexpected("Could not write to connection " + socket_data.host + ":" + std::to_string(socket_data.port));
return std::unexpected{"Could not write to connection " + socket_data.host + ":" + std::to_string(socket_data.port)};
}
connection_stream->read(op);
size_t bundle_size = 0;
connection_stream->read(bundle_size);
if (bundle_size == 0) {
return nonstd::make_unexpected("Failed to retrieve debug bundle");
return std::unexpected{"Failed to retrieve debug bundle"};
}

if (std::filesystem::exists(target_dir) && !std::filesystem::is_directory(target_dir)) {
return nonstd::make_unexpected("Object specified as the target directory already exists and it is not a directory");
return std::unexpected{"Object specified as the target directory already exists and it is not a directory"};
}

if (!std::filesystem::exists(target_dir) && utils::file::create_dir(target_dir) != 0) {
return nonstd::make_unexpected("Failed to create target directory: " + target_dir.string());
return std::unexpected{"Failed to create target directory: " + target_dir.string()};
}

std::ofstream out_file(target_dir / "debug.tar.gz");
Expand Down
2 changes: 1 addition & 1 deletion controller/Controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ bool listConnections(const utils::net::SocketData& socket_data, std::ostream &ou
bool printManifest(const utils::net::SocketData& socket_data, std::ostream &out);
bool getJstacks(const utils::net::SocketData& socket_data, std::ostream &out);
bool getFlowStatus(const utils::net::SocketData& socket_data, const std::string& status_query, std::ostream &out);
nonstd::expected<void, std::string> getDebugBundle(const utils::net::SocketData& socket_data, const std::filesystem::path& target_dir);
std::expected<void, std::string> getDebugBundle(const utils::net::SocketData& socket_data, const std::filesystem::path& target_dir);

} // namespace org::apache::nifi::minifi::controller
2 changes: 1 addition & 1 deletion controller/tests/ControllerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class TestUpdateSink : public minifi::state::StateMonitor {
return {};
}

nonstd::expected<void, std::string> applyUpdate(const std::string& /*source*/, const std::string& /*configuration*/, bool /*persist*/ = false,
std::expected<void, std::string> applyUpdate(const std::string& /*source*/, const std::string& /*configuration*/, bool /*persist*/ = false,
const std::optional<std::string>& /*flow_id*/ = std::nullopt) override {
update_calls++;
return {};
Expand Down
5 changes: 1 addition & 4 deletions core-framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ file(GLOB SOURCES

add_minifi_library(minifi-core-framework STATIC ${SOURCES})
target_include_directories(minifi-core-framework PUBLIC include)
target_link_libraries(minifi-core-framework PUBLIC minifi-api minifi-core-framework-common ZLIB::ZLIB concurrentqueue RapidJSON spdlog Threads::Threads gsl-lite libsodium range-v3 expected-lite date::date date::tz asio magic_enum OpenSSL::Crypto OpenSSL::SSL CURL::libcurl RapidJSON)
target_link_libraries(minifi-core-framework PUBLIC minifi-api minifi-core-framework-common ZLIB::ZLIB concurrentqueue RapidJSON spdlog Threads::Threads gsl-lite libsodium range-v3 date::date date::tz asio magic_enum OpenSSL::Crypto OpenSSL::SSL CURL::libcurl RapidJSON)
if(NOT WIN32)
target_link_libraries(minifi-core-framework PUBLIC OSSP::libuuid++)
endif()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)
target_link_libraries(minifi-core-framework PUBLIC stdc++fs)
endif()
5 changes: 1 addition & 4 deletions core-framework/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ file(GLOB SOURCES

add_minifi_library(minifi-core-framework-common STATIC ${SOURCES})
target_include_directories(minifi-core-framework-common PUBLIC include)
target_link_libraries(minifi-core-framework-common PUBLIC minifi-api-common ZLIB::ZLIB concurrentqueue RapidJSON spdlog Threads::Threads gsl-lite libsodium range-v3 expected-lite date::date date::tz asio magic_enum OpenSSL::Crypto OpenSSL::SSL CURL::libcurl RapidJSON)
target_link_libraries(minifi-core-framework-common PUBLIC minifi-api-common ZLIB::ZLIB concurrentqueue RapidJSON spdlog Threads::Threads gsl-lite libsodium range-v3 date::date date::tz asio magic_enum OpenSSL::Crypto OpenSSL::SSL CURL::libcurl RapidJSON)
if(NOT WIN32)
target_link_libraries(minifi-core-framework-common PUBLIC OSSP::libuuid++)
endif()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)
target_link_libraries(minifi-core-framework-common PUBLIC stdc++fs)
endif()
6 changes: 3 additions & 3 deletions core-framework/common/include/utils/OptionalUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include <type_traits>
#include <utility>
#include <iostream>
#include <expected>

#include "nonstd/expected.hpp"
#include "utils/GeneralUtils.h"
#include "minifi-cpp/utils/gsl.h"
#include "utils/detail/MonadicOperationWrappers.h"
Expand Down Expand Up @@ -130,9 +130,9 @@ auto operator|(std::optional<SourceType> o, filter_wrapper<F> f) noexcept(noexce
}

template<typename T, typename E>
nonstd::expected<T, E> operator|(std::optional<T> object, to_expected_wrapper<E> e) {
std::expected<T, E> operator|(std::optional<T> object, to_expected_wrapper<E> e) {
if (!object) {
return nonstd::make_unexpected(e.error);
return std::unexpected{e.error};
}
return std::move(*object);
}
Expand Down
Loading
Loading