Start implementing migration to fb-cpp (modern C++ wrapper)#543
Start implementing migration to fb-cpp (modern C++ wrapper)#543
Conversation
mariuz
commented
Apr 27, 2026
- Upgrade project to C++20.
- Add fb-cpp as a git submodule.
- Implement Database Abstraction Layer (DAL) in src/engine/db/.
- Implement IBPP backend for DAL.
- Implement fb-cpp backend for DAL.
- Add DAL infrastructure to Database and Server metadata classes.
- Integrate DAL and fb-cpp into CMake build system.
- Fix C++20 compatibility issues in collection.h.
- Upgrade project to C++20. - Add fb-cpp as a git submodule. - Implement Database Abstraction Layer (DAL) in src/engine/db/. - Implement IBPP backend for DAL. - Implement fb-cpp backend for DAL. - Add DAL infrastructure to Database and Server metadata classes. - Integrate DAL and fb-cpp into CMake build system. - Fix C++20 compatibility issues in collection.h.
|
I have initiated the migration of FlameRobin to the modern fb-cpp C++ wrapper. This first phase establishes the Summary of Changes
Verification https://gist.github.com/mariuz/fbfbb2d1df8e02308fb5e62dd06ed395 |
There was a problem hiding this comment.
Code Review
This pull request introduces a database abstraction layer (DAL) to support multiple backends, adding a new fb-cpp backend alongside the existing IBPP implementation. It includes new interfaces for databases, transactions, statements, and services, and updates the metadata classes to integrate these components. Review feedback highlights several issues in the IBPP backend implementation where transaction parameters and connection strings were ignored, as well as potential crashes due to missing null checks. Additionally, improvements were suggested for the CMake configuration to avoid source tree pollution and the use of backend-independent enums for column types.
- Fix ignored transaction parameters and missing null checks in IbppTransaction. - Fix ignored connection string in IbppService. - Use backend-independent ColumnType enum in IStatement. - Add connection check in FbCppDatabase::getAttachment(). - Resolve unused parameter warning in Server::getDALService().
- Remove invalid 160000 gitlink for wxWidgets. - Add wxWidgets/ to .gitignore to prevent accidental re-addition. - This resolves the 'No url found for submodule path wxWidgets' error in GitHub Actions.
- Add doxygen and libboost-all-dev to linux-build.yml and ccpp.yml. - Disable fb-cpp tests by default in CMakeLists.txt and CI to avoid Boost dependency. - Explicitly pass -DBUILD_TESTING=OFF in CI workflows.
- Add vcpkg as a git submodule. - Add vcpkg.json with dependencies (boost, firebird, icu, wxwidgets). - Update CMakeLists.txt to automatically use vcpkg toolchain if present.
- Add vcpkg artifacts caching to all platforms. - Consistently use actions/cache@v4. - Align with fb-cpp CI strategy for dependency persistence.
- Set fetch-depth: 0 in all checkout steps. - vcpkg versioning requires full git history of the vcpkg submodule to check out specific versions of ports.
- Copy registry configuration from fb-cpp to root. - This fixes the 'firebird does not exist' error by pointing to Adriano's custom firebird-vcpkg-registry.
- Update fedora-flatpak-build.yml to use submodules: recursive. - Add ENABLE_VCPKG option to CMakeLists.txt and disable it in Flatpak manifest. - Disable fb-cpp tests in Flatpak manifest.
- Remove redundant vcpkg directory from fb-cpp submodule in CodeQL and Flatpak workflows. - Ensures the build doesn't attempt to use the submodule's vcpkg when ENABLE_VCPKG=OFF.
- Add missing system dependencies for X11, Wayland, and ibus required by sdl2 port. - Synchronize builtin-baseline in vcpkg-configuration.json and remove it from vcpkg.json to fix warning.
- Explicitly disable BUILD_TESTING when adding fb-cpp subdirectory. - This prevents fb-cpp from looking for Boost::unit_test_framework and other test dependencies.
- Add detailed directory listing in CI to verify submodule content. - Switch flamerobin source in Flatpak manifest to type: git with submodules: true.
- Build fb-cpp as a separate Flatpak module to avoid submodule empty directory issues. - Make fb-cpp subdirectory optional in CMakeLists.txt and fallback to find_package. - Provide firebirdConfig.cmake and headers to the fb-cpp Flatpak module.
- Use GitHub Actions native binary caching for vcpkg (clear;x-gha,readwrite). - Replace manual directory caching with a more robust and efficient strategy. - Applied to linux-build, ccpp, macos-build, and windows-build workflows.
…rror - Use sed to replace emplace_back with push_back and list initialization in BackupManager.h. - This avoids modifying the submodule source while resolving a compatibility issue with AppleClang 15 and C++20.
- Resolves build failures in gtk3 and related ports by providing necessary dev headers. - Includes pango, cairo, gdk-pixbuf, epoxy, and various X11 extensions.
- Replace unreliable CodeQL autobuild with explicit cmake --build. - Install ninja-build and use -G Ninja to ensure a consistent build environment. - This avoids CodeQL picking up the legacy root Makefile which has hardcoded local paths.
Changes: - Switch fb-cpp module to cmake-ninja buildsystem for better environment setup. - Add defensive CMAKE_TOOLCHAIN_FILE unsetting in CMakeLists.txt when ENABLE_VCPKG is OFF. - This prevents CMake 3.31 from picking up relative toolchain paths from presets when vcpkg is disabled.
Changes: - Fix fb_get_master_interface redefinition by removing redundant forward declaration in FbCppDatabase.cpp. - Resolve ternary expression ambiguity (wxString vs const char*) by explicitly casting to wxString.
Changes: - Revert src/fb-cpp submodule pointer to original upstream commit to fix checkout failures. - Re-add and enhance perl patching in workflows to safely disable vcpkg in the submodule during build. - This approach avoids the need to push changes to the submodule's remote while still fixing the build.
Changes: - firebird-client: install development headers to /app/include. - fb-cpp: switch to cmake-ninja, hardcode firebird_DIR in root CMakeLists.txt via shell source. - firebirdConfig.cmake: update include directories for both build and installed states.
Wrap FIREBIRD_INCLUDE_DIRS in $<BUILD_INTERFACE:...> to allow use in external targets without triggering CMake validation errors during generation.
Changes: - wxWidgets: switch to shared build and explicitly enable webview with WebKit backend. - flamerobin: correct firebird_DIR path to match fb-cpp installation.
Re-add forward declaration with ISC_EXPORT to match Firebird headers on Windows (fixing C2373) while remaining visible to Clang on macOS (fixing C3861/undeclared identifier).
Changes: - Use job matrix to parallelize x86 and x64 builds. - Enable multi-processor compilation in MSBuild (-m). - Separate caches for x86 and x64 binaries and wxWidgets. - This should roughly halve the total wall-clock time for Windows builds.
Changes: - Set wxWidgets_CONFIG_EXECUTABLE and CMAKE_PREFIX_PATH for reliable shared lib discovery. - Standardize fb-cpp install path to lib/cmake/fb-cpp via on-the-fly patching.
Changes: - Switch wxWidgets to autotools buildsystem for better Linux compatibility. - Revert to static build for simpler dependency management in sandbox. - Explicitly enable unicode, webview, aui, stc, and graphics_ctx. - Use builtin libraries for dependencies to avoid sandbox mismatches.
This fixes the 'VCPKG_DEFAULT_BINARY_CACHE must be a directory' error observed on Windows and ensures consistent behavior across all platforms.
Changes: - CMakeLists.txt: make webview an optional component for wxWidgets on Linux to improve build resilience. - Flatpak: switch wxWidgets to shared build and explicitly set libdir to /app/lib. - Flatpak: disable OpenGL and use cmake-ninja for wxWidgets for consistency.
