From 7427adee538c1f6f3447a302d8a495cdf80ebc28 Mon Sep 17 00:00:00 2001 From: Greg Huels Date: Tue, 13 Jan 2026 09:57:25 -0600 Subject: [PATCH 1/3] fix: build issues with `-fmodules` flag --- third_party/nlohmann/json.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/third_party/nlohmann/json.hpp b/third_party/nlohmann/json.hpp index 8b72ea6..8961e50 100644 --- a/third_party/nlohmann/json.hpp +++ b/third_party/nlohmann/json.hpp @@ -6159,6 +6159,7 @@ NLOHMANN_JSON_NAMESPACE_END #ifndef JSON_NO_IO #include // FILE * #include // istream + #include // streambuf #endif // JSON_NO_IO // #include @@ -7378,6 +7379,7 @@ NLOHMANN_JSON_NAMESPACE_END #include // array #include // localeconv #include // size_t +#include // errno #include // snprintf #include // strtof, strtod, strtold, strtoll, strtoull #include // initializer_list From d7b97995fc35f14a672732c7ff3d684e34700606 Mon Sep 17 00:00:00 2001 From: Greg Huels Date: Tue, 13 Jan 2026 10:24:40 -0600 Subject: [PATCH 2/3] chore: CI verification to make sure library builds with modules enabled --- .github/workflows/test.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e57a80f..20f27c5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -144,3 +144,26 @@ jobs: - name: Run memory tests run: make test-memory TEST_DATA_BRANCH=${{env.TEST_DATA_BRANCH_NAME}} + + cxx-modules-test: + runs-on: macos-latest + name: Build with C++20 modules + + steps: + - name: Checkout code + uses: actions/checkout@v5 + with: + repository: ${{ github.event.pull_request.head.repo.full_name || 'Eppo-exp/cpp-sdk' }} + ref: ${{ env.SDK_BRANCH_NAME }} + + - name: Set up build environment + run: | + brew install re2 + brew install cmake + + - name: Build with -fmodules flag + run: | + mkdir -p build-modules + cd build-modules + cmake .. -DCMAKE_CXX_FLAGS="-fmodules" -DEPPOCLIENT_BUILD_TESTS=OFF -DEPPOCLIENT_ERR_ON_WARNINGS=OFF + cmake --build . From a1c32f6a05d9da7fb7f4d46ddb92197505113895 Mon Sep 17 00:00:00 2001 From: Greg Huels Date: Tue, 13 Jan 2026 10:32:29 -0600 Subject: [PATCH 3/3] Update .github/workflows/test.yml Co-authored-by: Oleksii Shmalko --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 20f27c5..8dcf350 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -151,7 +151,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: repository: ${{ github.event.pull_request.head.repo.full_name || 'Eppo-exp/cpp-sdk' }} ref: ${{ env.SDK_BRANCH_NAME }}