From 17dcab0edd720be44e8d1bd2be4b34e1405bc17f Mon Sep 17 00:00:00 2001 From: Bill Avery Date: Tue, 10 Sep 2024 13:29:24 -0700 Subject: [PATCH 01/15] chore(modules): bump minimum CMake version for modules support --- CMakeLists.txt | 8 +------- cmake/CMakeLists.txt | 2 +- samples/CMakeLists.txt | 2 +- samples/client/CMakeLists.txt | 2 +- samples/client/benchmark/CMakeLists.txt | 2 +- samples/client/multiple/CMakeLists.txt | 2 +- samples/client/mutate/CMakeLists.txt | 2 +- samples/client/nestedinput/CMakeLists.txt | 2 +- samples/client/query/CMakeLists.txt | 2 +- samples/client/subscribe/CMakeLists.txt | 2 +- samples/learn/CMakeLists.txt | 2 +- samples/learn/schema/CMakeLists.txt | 2 +- samples/proxy/CMakeLists.txt | 2 +- samples/proxy/query/CMakeLists.txt | 2 +- samples/proxy/schema/CMakeLists.txt | 2 +- samples/today/CMakeLists.txt | 2 +- samples/today/nointrospection/CMakeLists.txt | 2 +- samples/today/schema/CMakeLists.txt | 2 +- samples/validation/CMakeLists.txt | 2 +- samples/validation/schema/CMakeLists.txt | 2 +- src/CMakeLists.txt | 2 +- src/introspection/CMakeLists.txt | 2 +- test/CMakeLists.txt | 2 +- 23 files changed, 23 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f25e927..8acdcdde 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) - -# Enable CMAKE_MSVC_RUNTIME_LIBRARY on Windows: https://cmake.org/cmake/help/latest/policy/CMP0091.html -cmake_policy(SET CMP0091 NEW) - -# Do not set default MSVC warning flags: https://cmake.org/cmake/help/latest/policy/CMP0092.html -cmake_policy(SET CMP0092 NEW) +cmake_minimum_required(VERSION 3.28) # Export compile commands for other tools, e.g. SonarLint. set(CMAKE_EXPORT_COMPILE_COMMANDS ON) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 1db60cea..1fdaf4a5 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) # Enable version checks in find_package include(CMakePackageConfigHelpers) diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index bddfd792..74452ba8 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) add_subdirectory(client) add_subdirectory(learn) diff --git a/samples/client/CMakeLists.txt b/samples/client/CMakeLists.txt index 71ff74de..b5eb0d8a 100644 --- a/samples/client/CMakeLists.txt +++ b/samples/client/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) add_subdirectory(query) add_subdirectory(mutate) diff --git a/samples/client/benchmark/CMakeLists.txt b/samples/client/benchmark/CMakeLists.txt index ea0ab74c..c2ec979e 100644 --- a/samples/client/benchmark/CMakeLists.txt +++ b/samples/client/benchmark/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) # Normally this would be handled by find_package(cppgraphqlgen CONFIG). include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/cppgraphqlgen-functions.cmake) diff --git a/samples/client/multiple/CMakeLists.txt b/samples/client/multiple/CMakeLists.txt index d011f933..9f72d51d 100644 --- a/samples/client/multiple/CMakeLists.txt +++ b/samples/client/multiple/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) # Normally this would be handled by find_package(cppgraphqlgen CONFIG). include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/cppgraphqlgen-functions.cmake) diff --git a/samples/client/mutate/CMakeLists.txt b/samples/client/mutate/CMakeLists.txt index 61b3ab67..bdf63420 100644 --- a/samples/client/mutate/CMakeLists.txt +++ b/samples/client/mutate/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) # Normally this would be handled by find_package(cppgraphqlgen CONFIG). include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/cppgraphqlgen-functions.cmake) diff --git a/samples/client/nestedinput/CMakeLists.txt b/samples/client/nestedinput/CMakeLists.txt index b9714ed2..470a7c71 100644 --- a/samples/client/nestedinput/CMakeLists.txt +++ b/samples/client/nestedinput/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) # Normally this would be handled by find_package(cppgraphqlgen CONFIG). include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/cppgraphqlgen-functions.cmake) diff --git a/samples/client/query/CMakeLists.txt b/samples/client/query/CMakeLists.txt index dd483b6c..6fbcfcc1 100644 --- a/samples/client/query/CMakeLists.txt +++ b/samples/client/query/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) # Normally this would be handled by find_package(cppgraphqlgen CONFIG). include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/cppgraphqlgen-functions.cmake) diff --git a/samples/client/subscribe/CMakeLists.txt b/samples/client/subscribe/CMakeLists.txt index fb3ea5eb..6d937548 100644 --- a/samples/client/subscribe/CMakeLists.txt +++ b/samples/client/subscribe/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) # Normally this would be handled by find_package(cppgraphqlgen CONFIG). include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/cppgraphqlgen-functions.cmake) diff --git a/samples/learn/CMakeLists.txt b/samples/learn/CMakeLists.txt index 3be7bcf0..7c0db253 100644 --- a/samples/learn/CMakeLists.txt +++ b/samples/learn/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) add_subdirectory(schema) add_library(star_wars STATIC diff --git a/samples/learn/schema/CMakeLists.txt b/samples/learn/schema/CMakeLists.txt index 2cab0cc0..589e3b6a 100644 --- a/samples/learn/schema/CMakeLists.txt +++ b/samples/learn/schema/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) # Normally this would be handled by find_package(cppgraphqlgen CONFIG). include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/cppgraphqlgen-functions.cmake) diff --git a/samples/proxy/CMakeLists.txt b/samples/proxy/CMakeLists.txt index df821c20..e518aca8 100644 --- a/samples/proxy/CMakeLists.txt +++ b/samples/proxy/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) add_subdirectory(query) add_subdirectory(schema) diff --git a/samples/proxy/query/CMakeLists.txt b/samples/proxy/query/CMakeLists.txt index f774c8f8..4c8e5e50 100644 --- a/samples/proxy/query/CMakeLists.txt +++ b/samples/proxy/query/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) # Normally this would be handled by find_package(cppgraphqlgen CONFIG). include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/cppgraphqlgen-functions.cmake) diff --git a/samples/proxy/schema/CMakeLists.txt b/samples/proxy/schema/CMakeLists.txt index 03912cd3..bb9a16a1 100644 --- a/samples/proxy/schema/CMakeLists.txt +++ b/samples/proxy/schema/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) # Normally this would be handled by find_package(cppgraphqlgen CONFIG). include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/cppgraphqlgen-functions.cmake) diff --git a/samples/today/CMakeLists.txt b/samples/today/CMakeLists.txt index 7c9eaa33..c3b9b2bb 100644 --- a/samples/today/CMakeLists.txt +++ b/samples/today/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) # todaygraphql add_subdirectory(schema) diff --git a/samples/today/nointrospection/CMakeLists.txt b/samples/today/nointrospection/CMakeLists.txt index 5bea126a..5f98c0c0 100644 --- a/samples/today/nointrospection/CMakeLists.txt +++ b/samples/today/nointrospection/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) # Normally this would be handled by find_package(cppgraphqlgen CONFIG). include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/cppgraphqlgen-functions.cmake) diff --git a/samples/today/schema/CMakeLists.txt b/samples/today/schema/CMakeLists.txt index 0c6403ec..e7e7ee23 100644 --- a/samples/today/schema/CMakeLists.txt +++ b/samples/today/schema/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) # Normally this would be handled by find_package(cppgraphqlgen CONFIG). include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/cppgraphqlgen-functions.cmake) diff --git a/samples/validation/CMakeLists.txt b/samples/validation/CMakeLists.txt index 8db4b408..5968f24b 100644 --- a/samples/validation/CMakeLists.txt +++ b/samples/validation/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) if(GRAPHQL_BUILD_TESTS) add_subdirectory(schema) diff --git a/samples/validation/schema/CMakeLists.txt b/samples/validation/schema/CMakeLists.txt index 106fad47..4d680f6c 100644 --- a/samples/validation/schema/CMakeLists.txt +++ b/samples/validation/schema/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) # Normally this would be handled by find_package(cppgraphqlgen CONFIG). include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/cppgraphqlgen-functions.cmake) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2d763474..6bab8b34 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) if(GRAPHQL_UPDATE_VERSION) # internal/Version.h diff --git a/src/introspection/CMakeLists.txt b/src/introspection/CMakeLists.txt index 82b8203d..329b95a7 100644 --- a/src/introspection/CMakeLists.txt +++ b/src/introspection/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) # Normally this would be handled by find_package(cppgraphqlgen CONFIG). include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/cppgraphqlgen-functions.cmake) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a3b0d52f..9e0a8150 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.28) find_package(GTest MODULE REQUIRED) From b152a94540371ad929bc739ae5d58dd82234ae9a Mon Sep 17 00:00:00 2001 From: Bill Avery Date: Tue, 10 Sep 2024 13:32:48 -0700 Subject: [PATCH 02/15] chore(modules): make macOS build action use Ninja instead of makefiles --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 16b94358..d594d04c 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -40,7 +40,7 @@ jobs: $cacheAccess = $(if ('${{ steps.cache-vcpkg.outputs.cache-hit }}' -eq 'true') { 'read' } else { 'write' }) $env:VCPKG_BINARY_SOURCES = "clear;files,$cachedBinaries,$cacheAccess" - cmake "-DCMAKE_TOOLCHAIN_FILE=$vcpkgToolchain" "-DCMAKE_BUILD_TYPE=$cmakeBuildType" ${{ github.workspace }} + cmake "-DCMAKE_TOOLCHAIN_FILE=$vcpkgToolchain" "-DCMAKE_BUILD_TYPE=$cmakeBuildType" -G Ninja ${{ github.workspace }} - name: Build working-directory: build/ From cc886944c378353dd72ec98b29bdbb77b1c6cfaa Mon Sep 17 00:00:00 2001 From: Bill Avery Date: Tue, 10 Sep 2024 14:18:58 -0700 Subject: [PATCH 03/15] chore(modules): add vcpkg submodule and update workflows --- .github/workflows/linux.yml | 6 +++--- .github/workflows/macos.yml | 10 ++++++++-- .github/workflows/windows.yml | 7 ++++++- .gitmodules | 3 +++ vcpkg | 1 + 5 files changed, 21 insertions(+), 6 deletions(-) create mode 160000 vcpkg diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 486542c4..95d32441 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -19,7 +19,7 @@ jobs: - name: Install Dependencies run: | sudo apt-get update - sudo apt-get install -yq libgtest-dev libboost-program-options-dev rapidjson-dev ninja-build gcc-10 g++-10 + sudo apt-get install -yq libgtest-dev libboost-program-options-dev rapidjson-dev ninja-build gcc-14 g++-14 - name: Build GTest run: | @@ -35,8 +35,8 @@ jobs: - name: Configure CMake shell: pwsh env: - CC: gcc-10 - CXX: g++-10 + CC: gcc-14 + CXX: g++-14 working-directory: build/ run: | $cmakeBuildType = '${{ matrix.config }}' diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d594d04c..53287e39 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -9,12 +9,13 @@ jobs: matrix: config: [Debug, Release] - runs-on: macos-13 + runs-on: macos-latest steps: - uses: actions/checkout@v4.1.3 with: submodules: true + - uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 - name: Cache vcpkg uses: actions/cache@v4.0.2 @@ -31,9 +32,14 @@ jobs: - name: Configure shell: pwsh + env: + VCPKG_ROOT: ${{ github.workspace }}/vcpkg working-directory: build/ run: | - $vcpkgToolchain = Join-Path $env:VCPKG_INSTALLATION_ROOT './scripts/buildsystems/vcpkg.cmake' -Resolve + & "${env:VCPKG_ROOT}/bootstrap-vcpkg.sh" + & "${env:VCPKG_ROOT}/vcpkg integrate install" + + $vcpkgToolchain = Join-Path $env:VCPKG_ROOT './scripts/buildsystems/vcpkg.cmake' -Resolve $cmakeBuildType = '${{ matrix.config }}' $cachedBinaries = Join-Path $(Get-Location) './vcpkg_cache/' -Resolve diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 3e3796bf..514eee21 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -38,9 +38,14 @@ jobs: - name: Configure shell: pwsh + env: + VCPKG_ROOT: ${{ github.workspace }}\vcpkg working-directory: build/ run: | - $vcpkgToolchain = Join-Path $env:VCPKG_INSTALLATION_ROOT '.\scripts\buildsystems\vcpkg.cmake' -Resolve + & "${env:VCPKG_ROOT}/bootstrap-vcpkg.bat" + & "${env:VCPKG_ROOT}/vcpkg" integrate install + + $vcpkgToolchain = Join-Path $env:VCPKG_ROOT './scripts/buildsystems/vcpkg.cmake' -Resolve $vcpkgTriplet = '${{ steps.set-variables.outputs.vcpkg_triplet }}' $cmakeSharedLibs = $(if ('${{ matrix.libs }}' -eq 'shared') { 'ON' } else { 'OFF' }) $msbuildArch = $(if ('${{ matrix.arch }}' -eq 'x64') { 'X64' } else { 'Win32' }) diff --git a/.gitmodules b/.gitmodules index 63c116a4..425cae62 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "PEGTL"] path = PEGTL url = https://github.com/taocpp/PEGTL.git +[submodule "vcpkg"] + path = vcpkg + url = https://github.com/microsoft/vcpkg.git diff --git a/vcpkg b/vcpkg new file mode 160000 index 00000000..49e1e8f7 --- /dev/null +++ b/vcpkg @@ -0,0 +1 @@ +Subproject commit 49e1e8f77565d452569f39e538b90cb9768e8b11 From 10391bb0ccb76dc2bdf635359271eb2a91f8e2d8 Mon Sep 17 00:00:00 2001 From: Bill Avery Date: Tue, 10 Sep 2024 14:38:37 -0700 Subject: [PATCH 04/15] chore(modules): workflow fixes --- .github/workflows/linux.yml | 3 +++ .github/workflows/macos.yml | 11 ++++++++--- .github/workflows/windows.yml | 11 ++++++++--- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 95d32441..0aad7cf5 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -18,6 +18,9 @@ jobs: - name: Install Dependencies run: | + sudo apt-get update + sudo apt-get upgrade + sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install -yq libgtest-dev libboost-program-options-dev rapidjson-dev ninja-build gcc-14 g++-14 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 53287e39..9a475956 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -30,15 +30,20 @@ jobs: cmake -E make_directory build cmake -E make_directory build/vcpkg_cache + - name: Boostrap vcpkg + shell: pwsh + working-directory: vcpkg/ + run: | + ./bootstrap-vcpkg.sh + ./vcpkg integrate install + git fetch + - name: Configure shell: pwsh env: VCPKG_ROOT: ${{ github.workspace }}/vcpkg working-directory: build/ run: | - & "${env:VCPKG_ROOT}/bootstrap-vcpkg.sh" - & "${env:VCPKG_ROOT}/vcpkg integrate install" - $vcpkgToolchain = Join-Path $env:VCPKG_ROOT './scripts/buildsystems/vcpkg.cmake' -Resolve $cmakeBuildType = '${{ matrix.config }}' diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 514eee21..fe3f3c07 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -36,15 +36,20 @@ jobs: cmake -E make_directory build cmake -E make_directory build/vcpkg_cache + - name: Boostrap vcpkg + shell: pwsh + working-directory: vcpkg/ + run: | + ./bootstrap-vcpkg.bat + ./vcpkg integrate install + git fetch + - name: Configure shell: pwsh env: VCPKG_ROOT: ${{ github.workspace }}\vcpkg working-directory: build/ run: | - & "${env:VCPKG_ROOT}/bootstrap-vcpkg.bat" - & "${env:VCPKG_ROOT}/vcpkg" integrate install - $vcpkgToolchain = Join-Path $env:VCPKG_ROOT './scripts/buildsystems/vcpkg.cmake' -Resolve $vcpkgTriplet = '${{ steps.set-variables.outputs.vcpkg_triplet }}' $cmakeSharedLibs = $(if ('${{ matrix.libs }}' -eq 'shared') { 'ON' } else { 'OFF' }) From 8aad12301191d22454a0d6dcaeb04d315ff89ae1 Mon Sep 17 00:00:00 2001 From: Bill Avery Date: Tue, 10 Sep 2024 14:45:25 -0700 Subject: [PATCH 05/15] chore(modules): rewind vcpkg submodule to match baseline.json --- vcpkg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcpkg b/vcpkg index 49e1e8f7..7aeffc91 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit 49e1e8f77565d452569f39e538b90cb9768e8b11 +Subproject commit 7aeffc91033ad35cc4e2c152f213a866ec6c11ac From 3a6166ab50e51ae79e686c37d8c1fe66ca5577bb Mon Sep 17 00:00:00 2001 From: Bill Avery Date: Tue, 10 Sep 2024 14:49:00 -0700 Subject: [PATCH 06/15] chore(modules): try universe PPA on ubuntu-latest --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 0aad7cf5..60c6106c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -20,7 +20,7 @@ jobs: run: | sudo apt-get update sudo apt-get upgrade - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + sudo add-apt-repository -y universe sudo apt-get update sudo apt-get install -yq libgtest-dev libboost-program-options-dev rapidjson-dev ninja-build gcc-14 g++-14 From ab729b2f2ae2c44bd15560f31fa672018753eac6 Mon Sep 17 00:00:00 2001 From: Bill Avery Date: Tue, 10 Sep 2024 15:25:55 -0700 Subject: [PATCH 07/15] fix(workflow): try synchronizing the submodule with manifest baseline --- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 1 - vcpkg | 2 +- vcpkg.json | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 60c6106c..cec4eb71 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -9,7 +9,7 @@ jobs: matrix: config: [Debug, Release] - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4.1.3 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9a475956..ecb6a990 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -36,7 +36,6 @@ jobs: run: | ./bootstrap-vcpkg.sh ./vcpkg integrate install - git fetch - name: Configure shell: pwsh @@ -51,6 +50,7 @@ jobs: $cacheAccess = $(if ('${{ steps.cache-vcpkg.outputs.cache-hit }}' -eq 'true') { 'read' } else { 'write' }) $env:VCPKG_BINARY_SOURCES = "clear;files,$cachedBinaries,$cacheAccess" + $env:PATH = "${env:PATH}:${{ github.workspace }}/ninja-build" cmake "-DCMAKE_TOOLCHAIN_FILE=$vcpkgToolchain" "-DCMAKE_BUILD_TYPE=$cmakeBuildType" -G Ninja ${{ github.workspace }} - name: Build diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index fe3f3c07..fba67358 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -42,7 +42,6 @@ jobs: run: | ./bootstrap-vcpkg.bat ./vcpkg integrate install - git fetch - name: Configure shell: pwsh diff --git a/vcpkg b/vcpkg index 7aeffc91..b810d1cd 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit 7aeffc91033ad35cc4e2c152f213a866ec6c11ac +Subproject commit b810d1cdd47bfe729a5c78aa1e5b16dfa30da873 diff --git a/vcpkg.json b/vcpkg.json index 7c62b562..273930f9 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -49,5 +49,5 @@ "dependencies": [ "pegtl" ], - "builtin-baseline": "7aeffc91033ad35cc4e2c152f213a866ec6c11ac" + "builtin-baseline": "b810d1cdd47bfe729a5c78aa1e5b16dfa30da873" } From f54f04005ab3c8354b0214b56158d05aa3ed1c08 Mon Sep 17 00:00:00 2001 From: Bill Avery Date: Tue, 10 Sep 2024 15:33:23 -0700 Subject: [PATCH 08/15] fix(workflow): try fetching all history in checkout --- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 ++ .github/workflows/windows.yml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index cec4eb71..58921f51 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -3,7 +3,7 @@ name: Linux on: [push, pull_request] jobs: - gcc10: + gcc14: strategy: fail-fast: false matrix: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index ecb6a990..7bf690db 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -15,6 +15,8 @@ jobs: - uses: actions/checkout@v4.1.3 with: submodules: true + fetch-depth: 0 + - uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 - name: Cache vcpkg diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index fba67358..c93570a0 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -17,6 +17,7 @@ jobs: - uses: actions/checkout@v4.1.3 with: submodules: true + fetch-depth: 0 - name: Set target triplet id: set-variables From 743fb91b482395ba5ecc59f7a4f02631df17c1ff Mon Sep 17 00:00:00 2001 From: Bill Avery Date: Tue, 10 Sep 2024 15:51:19 -0700 Subject: [PATCH 09/15] fix(workflow): hash vcpkg.json manifest in cache key --- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 7bf690db..01eefd0d 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -24,7 +24,7 @@ jobs: id: cache-vcpkg with: path: build/vcpkg_cache/ - key: vcpkg-binaries-x64-osx + key: vcpkg-binaries-x64-osx-${{ hashFiles('vcpkg.json') }} - name: Create Build Environment if: ${{ !steps.cache-vcpkg.outputs.cache-hit }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c93570a0..cd638c24 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -29,7 +29,7 @@ jobs: id: cache-vcpkg with: path: build/vcpkg_cache/ - key: vcpkg-binaries-${{ steps.set-variables.outputs.vcpkg_triplet }} + key: vcpkg-binaries-${{ steps.set-variables.outputs.vcpkg_triplet }}-${{ hashFiles('vcpkg.json') }} - name: Create Build Environment if: ${{ !steps.cache-vcpkg.outputs.cache-hit }} From b045094bedc0b79efaae58611cee968cb9a6c302 Mon Sep 17 00:00:00 2001 From: Bill Avery Date: Tue, 10 Sep 2024 15:54:56 -0700 Subject: [PATCH 10/15] fix(workflow): remove old arch from macos cache key --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 01eefd0d..70cea90b 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -24,7 +24,7 @@ jobs: id: cache-vcpkg with: path: build/vcpkg_cache/ - key: vcpkg-binaries-x64-osx-${{ hashFiles('vcpkg.json') }} + key: vcpkg-binaries-osx-${{ hashFiles('vcpkg.json') }} - name: Create Build Environment if: ${{ !steps.cache-vcpkg.outputs.cache-hit }} From 1c7773333da6e0d75595dac46436dd25f8e4c07a Mon Sep 17 00:00:00 2001 From: Bill Avery Date: Tue, 10 Sep 2024 16:23:49 -0700 Subject: [PATCH 11/15] fix(vcpkg): rollback submodule to match vcpkg distributed with VS --- vcpkg | 2 +- vcpkg.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vcpkg b/vcpkg index b810d1cd..7aeffc91 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit b810d1cdd47bfe729a5c78aa1e5b16dfa30da873 +Subproject commit 7aeffc91033ad35cc4e2c152f213a866ec6c11ac diff --git a/vcpkg.json b/vcpkg.json index 273930f9..7c62b562 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -49,5 +49,5 @@ "dependencies": [ "pegtl" ], - "builtin-baseline": "b810d1cdd47bfe729a5c78aa1e5b16dfa30da873" + "builtin-baseline": "7aeffc91033ad35cc4e2c152f213a866ec6c11ac" } From c0831b7e1afbe977a10d85349e1bf718d4b2ef55 Mon Sep 17 00:00:00 2001 From: Bill Avery Date: Tue, 10 Sep 2024 16:46:02 -0700 Subject: [PATCH 12/15] fix(cmake): opt-in to CMP0167 BoostConfig.cmake policy in 3.30 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8acdcdde..4c6440dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,11 @@ cmake_minimum_required(VERSION 3.28) +if(POLICY CMP0167) + # Prefer the upstream BoostConfig.cmake file instead of the builtin FindBoost module: https://cmake.org/cmake/help/latest/policy/CMP0167.html + cmake_policy(SET CMP0167 NEW) +endif() + # Export compile commands for other tools, e.g. SonarLint. set(CMAKE_EXPORT_COMPILE_COMMANDS ON) From 8553608665001e6851e1ea4ddfddc13a2a1c95c5 Mon Sep 17 00:00:00 2001 From: Bill Avery Date: Tue, 10 Sep 2024 16:58:04 -0700 Subject: [PATCH 13/15] fix(cmake): use the right variable exported from BoostConfig.cmake --- samples/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 74452ba8..99131474 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -15,7 +15,7 @@ if(GRAPHQL_BUILD_HTTP_SAMPLE) try_compile(TEST_RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/test_boost_beast.cpp - CMAKE_FLAGS -DINCLUDE_DIRECTORIES:STRING=${Boost_INCLUDE_DIR} + CMAKE_FLAGS -DINCLUDE_DIRECTORIES:STRING=${Boost_INCLUDE_DIRS} CXX_STANDARD 20) if(TEST_RESULT) From 8f7aabb9a532359cf3dfe059676e4e7521fd0ffc Mon Sep 17 00:00:00 2001 From: Bill Avery Date: Thu, 12 Sep 2024 14:29:53 -0700 Subject: [PATCH 14/15] fix(includes): get rid of dependencies from internal headers on public headers --- include/graphqlservice/GraphQLClient.h | 19 ++----- include/graphqlservice/GraphQLParse.h | 12 +---- include/graphqlservice/GraphQLResponse.h | 15 +----- include/graphqlservice/GraphQLService.h | 25 +++------- include/graphqlservice/JSONResponse.h | 16 ++---- include/graphqlservice/internal/Base64.h | 12 +---- include/graphqlservice/internal/DllExports.h | 49 +++++++++++++++++++ include/graphqlservice/internal/Grammar.h | 2 +- .../graphqlservice/internal/Introspection.h | 3 +- include/graphqlservice/internal/Schema.h | 5 +- include/graphqlservice/internal/SyntaxTree.h | 2 +- .../introspection/IntrospectionSchema.h | 3 ++ samples/learn/schema/StarWarsSchema.h | 3 ++ samples/proxy/schema/ProxySchema.h | 3 ++ samples/today/nointrospection/TodaySchema.h | 3 ++ samples/today/schema/TodaySchema.h | 3 ++ samples/validation/schema/ValidationSchema.h | 3 ++ src/SchemaGenerator.cpp | 5 +- src/introspection/IntrospectionSchema.h | 3 ++ 19 files changed, 100 insertions(+), 86 deletions(-) create mode 100644 include/graphqlservice/internal/DllExports.h diff --git a/include/graphqlservice/GraphQLClient.h b/include/graphqlservice/GraphQLClient.h index 1321c1b4..2aa7835d 100644 --- a/include/graphqlservice/GraphQLClient.h +++ b/include/graphqlservice/GraphQLClient.h @@ -6,21 +6,10 @@ #ifndef GRAPHQLCLIENT_H #define GRAPHQLCLIENT_H -// clang-format off -#ifdef GRAPHQL_DLLEXPORTS - #ifdef IMPL_GRAPHQLCLIENT_DLL - #define GRAPHQLCLIENT_EXPORT __declspec(dllexport) - #else // !IMPL_GRAPHQLCLIENT_DLL - #define GRAPHQLCLIENT_EXPORT __declspec(dllimport) - #endif // !IMPL_GRAPHQLCLIENT_DLL -#else // !GRAPHQL_DLLEXPORTS - #define GRAPHQLCLIENT_EXPORT -#endif // !GRAPHQL_DLLEXPORTS -// clang-format on - -#include "graphqlservice/GraphQLResponse.h" - -#include "graphqlservice/internal/Version.h" +#include "GraphQLResponse.h" + +#include "internal/Version.h" +#include "internal/DllExports.h" #include #include diff --git a/include/graphqlservice/GraphQLParse.h b/include/graphqlservice/GraphQLParse.h index e983b224..cfd8682f 100644 --- a/include/graphqlservice/GraphQLParse.h +++ b/include/graphqlservice/GraphQLParse.h @@ -6,17 +6,7 @@ #ifndef GRAPHQLPARSE_H #define GRAPHQLPARSE_H -// clang-format off -#ifdef GRAPHQL_DLLEXPORTS - #ifdef IMPL_GRAPHQLPEG_DLL - #define GRAPHQLPEG_EXPORT __declspec(dllexport) - #else // !IMPL_GRAPHQLPEG_DLL - #define GRAPHQLPEG_EXPORT __declspec(dllimport) - #endif // !IMPL_GRAPHQLPEG_DLL -#else // !GRAPHQL_DLLEXPORTS - #define GRAPHQLPEG_EXPORT -#endif // !GRAPHQL_DLLEXPORTS -// clang-format on +#include "internal/DllExports.h" #include #include diff --git a/include/graphqlservice/GraphQLResponse.h b/include/graphqlservice/GraphQLResponse.h index 5ff8cb07..b8249926 100644 --- a/include/graphqlservice/GraphQLResponse.h +++ b/include/graphqlservice/GraphQLResponse.h @@ -6,19 +6,8 @@ #ifndef GRAPHQLRESPONSE_H #define GRAPHQLRESPONSE_H -// clang-format off -#ifdef GRAPHQL_DLLEXPORTS - #ifdef IMPL_GRAPHQLRESPONSE_DLL - #define GRAPHQLRESPONSE_EXPORT __declspec(dllexport) - #else // !IMPL_GRAPHQLRESPONSE_DLL - #define GRAPHQLRESPONSE_EXPORT __declspec(dllimport) - #endif // !IMPL_GRAPHQLRESPONSE_DLL -#else // !GRAPHQL_DLLEXPORTS - #define GRAPHQLRESPONSE_EXPORT -#endif // !GRAPHQL_DLLEXPORTS -// clang-format on - -#include "graphqlservice/internal/Awaitable.h" +#include "internal/Awaitable.h" +#include "internal/DllExports.h" #include #include diff --git a/include/graphqlservice/GraphQLService.h b/include/graphqlservice/GraphQLService.h index 0e7f2ea6..a412b1a4 100644 --- a/include/graphqlservice/GraphQLService.h +++ b/include/graphqlservice/GraphQLService.h @@ -6,24 +6,13 @@ #ifndef GRAPHQLSERVICE_H #define GRAPHQLSERVICE_H -// clang-format off -#ifdef GRAPHQL_DLLEXPORTS - #ifdef IMPL_GRAPHQLSERVICE_DLL - #define GRAPHQLSERVICE_EXPORT __declspec(dllexport) - #else // !IMPL_GRAPHQLSERVICE_DLL - #define GRAPHQLSERVICE_EXPORT __declspec(dllimport) - #endif // !IMPL_GRAPHQLSERVICE_DLL -#else // !GRAPHQL_DLLEXPORTS - #define GRAPHQLSERVICE_EXPORT -#endif // !GRAPHQL_DLLEXPORTS -// clang-format on - -#include "graphqlservice/GraphQLParse.h" -#include "graphqlservice/GraphQLResponse.h" - -#include "graphqlservice/internal/Awaitable.h" -#include "graphqlservice/internal/SortedMap.h" -#include "graphqlservice/internal/Version.h" +#include "GraphQLParse.h" +#include "GraphQLResponse.h" + +#include "internal/Awaitable.h" +#include "internal/DllExports.h" +#include "internal/SortedMap.h" +#include "internal/Version.h" #include #include diff --git a/include/graphqlservice/JSONResponse.h b/include/graphqlservice/JSONResponse.h index c264fd82..aeb8609c 100644 --- a/include/graphqlservice/JSONResponse.h +++ b/include/graphqlservice/JSONResponse.h @@ -6,19 +6,9 @@ #ifndef JSONRESPONSE_H #define JSONRESPONSE_H -// clang-format off -#ifdef GRAPHQL_DLLEXPORTS - #ifdef IMPL_JSONRESPONSE_DLL - #define JSONRESPONSE_EXPORT __declspec(dllexport) - #else // !IMPL_JSONRESPONSE_DLL - #define JSONRESPONSE_EXPORT __declspec(dllimport) - #endif // !IMPL_JSONRESPONSE_DLL -#else // !GRAPHQL_DLLEXPORTS - #define JSONRESPONSE_EXPORT -#endif // !GRAPHQL_DLLEXPORTS -// clang-format on - -#include "graphqlservice/GraphQLResponse.h" +#include "GraphQLResponse.h" + +#include "internal/DllExports.h" namespace graphql::response { diff --git a/include/graphqlservice/internal/Base64.h b/include/graphqlservice/internal/Base64.h index 163e1e84..5aaf1713 100644 --- a/include/graphqlservice/internal/Base64.h +++ b/include/graphqlservice/internal/Base64.h @@ -6,17 +6,7 @@ #ifndef GRAPHQLBASE64_H #define GRAPHQLBASE64_H -// clang-format off -#ifdef GRAPHQL_DLLEXPORTS - #ifdef IMPL_GRAPHQLRESPONSE_DLL - #define GRAPHQLRESPONSE_EXPORT __declspec(dllexport) - #else // !IMPL_GRAPHQLRESPONSE_DLL - #define GRAPHQLRESPONSE_EXPORT __declspec(dllimport) - #endif // !IMPL_GRAPHQLRESPONSE_DLL -#else // !GRAPHQL_DLLEXPORTS - #define GRAPHQLRESPONSE_EXPORT -#endif // !GRAPHQL_DLLEXPORTS -// clang-format on +#include "DllExports.h" #include #include diff --git a/include/graphqlservice/internal/DllExports.h b/include/graphqlservice/internal/DllExports.h new file mode 100644 index 00000000..b6cbfb39 --- /dev/null +++ b/include/graphqlservice/internal/DllExports.h @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +#ifndef DLLEXPORTS_H +#define DLLEXPORTS_H + +// clang-format off +#ifdef GRAPHQL_DLLEXPORTS + #ifdef IMPL_GRAPHQLCLIENT_DLL + #define GRAPHQLCLIENT_EXPORT __declspec(dllexport) + #else // !IMPL_GRAPHQLCLIENT_DLL + #define GRAPHQLCLIENT_EXPORT __declspec(dllimport) + #endif // !IMPL_GRAPHQLCLIENT_DLL + + #ifdef IMPL_GRAPHQLPEG_DLL + #define GRAPHQLPEG_EXPORT __declspec(dllexport) + #else // !IMPL_GRAPHQLPEG_DLL + #define GRAPHQLPEG_EXPORT __declspec(dllimport) + #endif // !IMPL_GRAPHQLPEG_DLL + + #ifdef IMPL_GRAPHQLRESPONSE_DLL + #define GRAPHQLRESPONSE_EXPORT __declspec(dllexport) + #else // !IMPL_GRAPHQLRESPONSE_DLL + #define GRAPHQLRESPONSE_EXPORT __declspec(dllimport) + #endif // !IMPL_GRAPHQLRESPONSE_DLL + + #ifdef IMPL_GRAPHQLSERVICE_DLL + #define GRAPHQLSERVICE_EXPORT __declspec(dllexport) + #else // !IMPL_GRAPHQLSERVICE_DLL + #define GRAPHQLSERVICE_EXPORT __declspec(dllimport) + #endif // !IMPL_GRAPHQLSERVICE_DLL + + #ifdef IMPL_JSONRESPONSE_DLL + #define JSONRESPONSE_EXPORT __declspec(dllexport) + #else // !IMPL_JSONRESPONSE_DLL + #define JSONRESPONSE_EXPORT __declspec(dllimport) + #endif // !IMPL_JSONRESPONSE_DLL +#else // !GRAPHQL_DLLEXPORTS + #define GRAPHQLCLIENT_EXPORT + #define GRAPHQLPEG_EXPORT + #define GRAPHQLRESPONSE_EXPORT + #define GRAPHQLSERVICE_EXPORT + #define JSONRESPONSE_EXPORT +#endif // !GRAPHQL_DLLEXPORTS +// clang-format on + +#endif // DLLEXPORTS_H diff --git a/include/graphqlservice/internal/Grammar.h b/include/graphqlservice/internal/Grammar.h index 8f3824b1..89bfe0a2 100644 --- a/include/graphqlservice/internal/Grammar.h +++ b/include/graphqlservice/internal/Grammar.h @@ -9,7 +9,7 @@ #ifndef GRAPHQLGRAMMAR_H #define GRAPHQLGRAMMAR_H -#include "graphqlservice/internal/SyntaxTree.h" +#include "SyntaxTree.h" #include diff --git a/include/graphqlservice/internal/Introspection.h b/include/graphqlservice/internal/Introspection.h index 885af384..e7b926f1 100644 --- a/include/graphqlservice/internal/Introspection.h +++ b/include/graphqlservice/internal/Introspection.h @@ -8,7 +8,8 @@ #include "graphqlservice/introspection/IntrospectionSchema.h" -#include "graphqlservice/internal/Schema.h" +#include "DllExports.h" +#include "Schema.h" namespace graphql::introspection { diff --git a/include/graphqlservice/internal/Schema.h b/include/graphqlservice/internal/Schema.h index 24480943..661ef00f 100644 --- a/include/graphqlservice/internal/Schema.h +++ b/include/graphqlservice/internal/Schema.h @@ -6,9 +6,12 @@ #ifndef GRAPHQLSCHEMA_H #define GRAPHQLSCHEMA_H -#include "graphqlservice/GraphQLService.h" +#include "DllExports.h" +#include "SortedMap.h" +#include "Version.h" #include +#include namespace graphql { namespace introspection { diff --git a/include/graphqlservice/internal/SyntaxTree.h b/include/graphqlservice/internal/SyntaxTree.h index 7e9be03a..fad8ef41 100644 --- a/include/graphqlservice/internal/SyntaxTree.h +++ b/include/graphqlservice/internal/SyntaxTree.h @@ -6,7 +6,7 @@ #ifndef GRAPHQLSYNTAXTREE_H #define GRAPHQLSYNTAXTREE_H -#include "graphqlservice/GraphQLParse.h" +#include "DllExports.h" #define TAO_PEGTL_NAMESPACE tao::graphqlpeg diff --git a/include/graphqlservice/introspection/IntrospectionSchema.h b/include/graphqlservice/introspection/IntrospectionSchema.h index 4adaa9af..363d67f2 100644 --- a/include/graphqlservice/introspection/IntrospectionSchema.h +++ b/include/graphqlservice/introspection/IntrospectionSchema.h @@ -8,6 +8,9 @@ #ifndef INTROSPECTIONSCHEMA_H #define INTROSPECTIONSCHEMA_H +#include "graphqlservice/GraphQLResponse.h" +#include "graphqlservice/GraphQLService.h" + #include "graphqlservice/internal/Schema.h" // Check if the library version is compatible with schemagen 4.5.0 diff --git a/samples/learn/schema/StarWarsSchema.h b/samples/learn/schema/StarWarsSchema.h index 01308601..2511eac0 100644 --- a/samples/learn/schema/StarWarsSchema.h +++ b/samples/learn/schema/StarWarsSchema.h @@ -8,6 +8,9 @@ #ifndef STARWARSSCHEMA_H #define STARWARSSCHEMA_H +#include "graphqlservice/GraphQLResponse.h" +#include "graphqlservice/GraphQLService.h" + #include "graphqlservice/internal/Schema.h" // Check if the library version is compatible with schemagen 4.5.0 diff --git a/samples/proxy/schema/ProxySchema.h b/samples/proxy/schema/ProxySchema.h index c1d565d3..eebe09e9 100644 --- a/samples/proxy/schema/ProxySchema.h +++ b/samples/proxy/schema/ProxySchema.h @@ -8,6 +8,9 @@ #ifndef PROXYSCHEMA_H #define PROXYSCHEMA_H +#include "graphqlservice/GraphQLResponse.h" +#include "graphqlservice/GraphQLService.h" + #include "graphqlservice/internal/Schema.h" // Check if the library version is compatible with schemagen 4.5.0 diff --git a/samples/today/nointrospection/TodaySchema.h b/samples/today/nointrospection/TodaySchema.h index ebcd3905..ef18f867 100644 --- a/samples/today/nointrospection/TodaySchema.h +++ b/samples/today/nointrospection/TodaySchema.h @@ -8,6 +8,9 @@ #ifndef TODAYSCHEMA_H #define TODAYSCHEMA_H +#include "graphqlservice/GraphQLResponse.h" +#include "graphqlservice/GraphQLService.h" + #include "graphqlservice/internal/Schema.h" // Check if the library version is compatible with schemagen 4.5.0 diff --git a/samples/today/schema/TodaySchema.h b/samples/today/schema/TodaySchema.h index ebcd3905..ef18f867 100644 --- a/samples/today/schema/TodaySchema.h +++ b/samples/today/schema/TodaySchema.h @@ -8,6 +8,9 @@ #ifndef TODAYSCHEMA_H #define TODAYSCHEMA_H +#include "graphqlservice/GraphQLResponse.h" +#include "graphqlservice/GraphQLService.h" + #include "graphqlservice/internal/Schema.h" // Check if the library version is compatible with schemagen 4.5.0 diff --git a/samples/validation/schema/ValidationSchema.h b/samples/validation/schema/ValidationSchema.h index be93c2b8..66208163 100644 --- a/samples/validation/schema/ValidationSchema.h +++ b/samples/validation/schema/ValidationSchema.h @@ -8,6 +8,9 @@ #ifndef VALIDATIONSCHEMA_H #define VALIDATIONSCHEMA_H +#include "graphqlservice/GraphQLResponse.h" +#include "graphqlservice/GraphQLService.h" + #include "graphqlservice/internal/Schema.h" // Check if the library version is compatible with schemagen 4.5.0 diff --git a/src/SchemaGenerator.cpp b/src/SchemaGenerator.cpp index 59c41549..6feaea8d 100644 --- a/src/SchemaGenerator.cpp +++ b/src/SchemaGenerator.cpp @@ -109,7 +109,10 @@ bool Generator::outputHeader() const noexcept IncludeGuardScope includeGuard { headerFile, std::filesystem::path(_headerPath).filename().string() }; - headerFile << R"cpp(#include "graphqlservice/internal/Schema.h" + headerFile << R"cpp(#include "graphqlservice/GraphQLResponse.h" +#include "graphqlservice/GraphQLService.h" + +#include "graphqlservice/internal/Schema.h" // Check if the library version is compatible with schemagen )cpp" << graphql::internal::MajorVersion << R"cpp(.)cpp" << graphql::internal::MinorVersion diff --git a/src/introspection/IntrospectionSchema.h b/src/introspection/IntrospectionSchema.h index 4adaa9af..363d67f2 100644 --- a/src/introspection/IntrospectionSchema.h +++ b/src/introspection/IntrospectionSchema.h @@ -8,6 +8,9 @@ #ifndef INTROSPECTIONSCHEMA_H #define INTROSPECTIONSCHEMA_H +#include "graphqlservice/GraphQLResponse.h" +#include "graphqlservice/GraphQLService.h" + #include "graphqlservice/internal/Schema.h" // Check if the library version is compatible with schemagen 4.5.0 From 7dc77fafc6410c77740773984cedfbf68fde569b Mon Sep 17 00:00:00 2001 From: Bill Avery Date: Thu, 12 Sep 2024 14:37:23 -0700 Subject: [PATCH 15/15] fix(includes): missing standard headers --- include/graphqlservice/internal/Schema.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/graphqlservice/internal/Schema.h b/include/graphqlservice/internal/Schema.h index 661ef00f..bdc87926 100644 --- a/include/graphqlservice/internal/Schema.h +++ b/include/graphqlservice/internal/Schema.h @@ -10,7 +10,10 @@ #include "SortedMap.h" #include "Version.h" +#include +#include #include +#include #include namespace graphql {