From cef4dfd71774c6948f224f5c657d7061a9dcdc65 Mon Sep 17 00:00:00 2001 From: Renovate Date: Thu, 24 Sep 2026 00:24:27 +0000 Subject: [PATCH 1/4] Update dependency ArthurSonzogni/ftxui to v7 --- .github/workflows/cmake.yml | 2 +- CMakeLists.txt | 2 +- README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 19df640d..efa1186c 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -32,7 +32,7 @@ env: BUILD_DIR: "build" EXT_DIR: "ext" # renovate: datasource=github-tags depName=ArthurSonzogni/ftxui versioning=loose - FTXUI_VERSION: "v6.1.9" + FTXUI_VERSION: "v7.0.3" defaults: diff --git a/CMakeLists.txt b/CMakeLists.txt index 87a9adb9..ec96cfdf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ FetchContent_Declare( ftxui GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui.git # renovate: datasource=github-tags depName=ArthurSonzogni/ftxui versioning=loose - GIT_TAG v6.1.9 # > + GIT_TAG v7.0.3 # > GIT_SHALLOW 1 # works only with branches or tags, not with arbitrary commit hashes GIT_PROGRESS ON ) diff --git a/README.md b/README.md index debb739b..7313bc05 100644 --- a/README.md +++ b/README.md @@ -189,5 +189,5 @@ The [template repository](https://github.com/mcmarius/oop-template) itself is li - FTXUI - - Versiune: [v6.1.9](https://github.com/ArthurSonzogni/ftxui/releases/tag/v6.1.9) (MIT) + - Versiune: [v7.0.3](https://github.com/ArthurSonzogni/ftxui/releases/tag/v7.0.3) (MIT) - adăugați trimiteri **detaliate** către resursele externe care v-au ajutat sau pe care le-ați folosit \ No newline at end of file From 9ce940e691444721b5dfe2dafdcb04b41a21f634 Mon Sep 17 00:00:00 2001 From: mcmarius <23401453+mcmarius@users.noreply.github.com> Date: Thu, 24 Sep 2026 13:37:11 +0300 Subject: [PATCH 2/4] fix(cmake): treat RUN_SANITIZERS as a boolean option set_compiler_flags() compared the value of the RUN_SANITIZERS keyword against the literal string "TRUE", so callers that pass an option variable, e.g. `RUN_SANITIZERS ${USE_ASAN}` (which expands to ON/OFF), never matched and the sanitizer flags were silently dropped: CI jobs configured with -DUSE_ASAN=ON built and ran completely uninstrumented binaries. Use a real boolean test so that ON/OFF, TRUE/FALSE and 1/0 all behave as expected. Omitting RUN_SANITIZERS still defaults to running the sanitizers. --- cmake/CompilerFlags.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/CompilerFlags.cmake b/cmake/CompilerFlags.cmake index 79192738..7ffdfe10 100644 --- a/cmake/CompilerFlags.cmake +++ b/cmake/CompilerFlags.cmake @@ -35,7 +35,9 @@ function(set_compiler_flags) ############################################################################### # sanitizers - if("${ARG_RUN_SANITIZERS}" STREQUAL "TRUE") + # NOTE: this must be a boolean test and not a string comparison, so that + # callers can pass `RUN_SANITIZERS ${USE_ASAN}` (which expands to ON/OFF) + if(ARG_RUN_SANITIZERS) set_custom_stdlib_and_sanitizers(${TARGET_NAME} true) set_custom_stdlib_and_sanitizers(screen true) # ftxui::screen set_custom_stdlib_and_sanitizers(dom true) # ftxui::dom From fda67ff6c04cf5abc90e7945e8b97cae3609f177 Mon Sep 17 00:00:00 2001 From: mcmarius <23401453+mcmarius@users.noreply.github.com> Date: Thu, 24 Sep 2026 13:37:25 +0300 Subject: [PATCH 3/4] fix(valgrind): suppress uninitialized termios reports on recent glibc Recent glibc implements tcsetattr() through the termios2 ioctl, so memcheck no longer reports the syscall parameter as ioctl(TCSETS) but as ioctl(generic), and it additionally reports an 8 byte read of an uninitialized value inside ___cbaud_to_speed(). Both come from libraries that ignore the return value of tcgetattr() and then hand the untouched struct termios to tcsetattr(), which happens whenever stdin is not a tty (e.g. when the executable is fed from a file in CI). Add narrow suppressions for these call stacks so scripts/run_valgrind.sh keeps passing on recent distributions. The existing entry is kept as is, since it is what older distributions used to report. --- scripts/valgrind-suppressions.supp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/scripts/valgrind-suppressions.supp b/scripts/valgrind-suppressions.supp index 3e71ec85..3b3dc468 100644 --- a/scripts/valgrind-suppressions.supp +++ b/scripts/valgrind-suppressions.supp @@ -3327,5 +3327,25 @@ ioctl(TCSET{S,SW,SF}) fun:tcsetattr ... - fun:main +} + +{ + + Memcheck:Param + ioctl(TCSETS) + fun:tcsetattr + ... +} +{ + + Memcheck:Param + ioctl(generic) + fun:tcsetattr + ... +} +{ + + Memcheck:Value8 + fun:*cbaud_to_speed* + ... } From a10d44500e84d26008b893b540d14e9f32e66f31 Mon Sep 17 00:00:00 2001 From: mcmarius <23401453+mcmarius@users.noreply.github.com> Date: Thu, 24 Sep 2026 13:37:39 +0300 Subject: [PATCH 4/4] fix(ftxui): adapt the example to FTXUI v7 - include , and explicitly: the v7 headers do not provide them transitively anymore, so std::thread was not declared - use ftxui::App (and ) instead of ScreenInteractive, which was renamed in v7 (the old name only survives as a compatibility alias) - link Threads::Threads explicitly: v7 dropped the PUBLIC Threads::Threads link it used to propagate, while the example still spawns a thread; without this the link may fail on targets that need an explicit thread library (winpthread with MinGW) --- CMakeLists.txt | 9 +++++++-- main.cpp | 14 ++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec96cfdf..dd6be8c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,12 @@ FetchContent_MakeAvailable(ftxui) # external dependencies with find_package -# find_package(Threads REQUIRED) +# NOTE: FTXUI v7 no longer propagates Threads::Threads publicly (FTXUI v6 linked +# it PUBLIC on ftxui::component). main.cpp uses std::thread, so link threads +# explicitly; otherwise linking may fail (e.g. winpthread with MinGW on Windows). +find_package(Threads REQUIRED) + +# find_package( REQUIRED) ############################################################################### @@ -89,7 +94,7 @@ target_include_directories(${MAIN_EXECUTABLE_NAME} SYSTEM PRIVATE # target_link_directories(${MAIN_EXECUTABLE_NAME} PRIVATE ${_BINARY_DIR}/lib) # target_link_libraries(${MAIN_EXECUTABLE_NAME} ) -target_link_libraries(${MAIN_EXECUTABLE_NAME} ftxui::screen ftxui::dom ftxui::component) +target_link_libraries(${MAIN_EXECUTABLE_NAME} ftxui::screen ftxui::dom ftxui::component Threads::Threads) ############################################################################### diff --git a/main.cpp b/main.cpp index 821a8c07..79b786d7 100644 --- a/main.cpp +++ b/main.cpp @@ -1,6 +1,10 @@ +#include // for seconds +#include // for to_string +#include // for thread + +#include // for App (renamed from ScreenInteractive in FTXUI v7) #include // for Slider, Renderer, Vertical #include // for ComponentBase -#include // for ScreenInteractive #include // for separator, operator|, Element, size, text, vbox, xflex, bgcolor, hbox, GREATER_THAN, WIDTH, border, HEIGHT, LESS_THAN #include // for Color @@ -55,7 +59,9 @@ int main() { /// /////////////////////////////////////////////////////////////////////////// - ftxui::ScreenInteractive screen = ftxui::ScreenInteractive::TerminalOutput(); + // FTXUI v7: `ScreenInteractive` a fost redenumit `App` (numele vechi există + // în continuare ca alias de compatibilitate în ). + ftxui::App app = ftxui::App::TerminalOutput(); /////////////////////////////////////////////////////////////////////////////////////////////////////// /// Exemplu culori RGB /// @@ -99,11 +105,11 @@ int main() { /// Programul se va opri automat dupa 5 secunde // std::thread auto_close([&] { // std::this_thread::sleep_for(std::chrono::seconds(5)); // - screen.Exit(); // + app.Exit(); // }); // ////////////////////////////////////////////////////////////////////// - screen.Loop(renderer); + app.Loop(renderer); auto_close.join();