Skip to content

Commit e1636d2

Browse files
authored
Merge pull request #314 from wravery/next
Additional cleanup from enabling C++20 modules
2 parents 37f2264 + 67b56d8 commit e1636d2

40 files changed

+88
-105
lines changed

.github/workflows/macos.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: macOS
33
on: [push, pull_request]
44

55
jobs:
6-
apple-clang:
6+
xcode:
77
strategy:
88
fail-fast: false
99
matrix:
@@ -17,8 +17,6 @@ jobs:
1717
submodules: true
1818
fetch-depth: 0
1919

20-
- uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401
21-
2220
- name: Cache vcpkg
2321
uses: actions/cache@v4.0.2
2422
id: cache-vcpkg
@@ -52,8 +50,7 @@ jobs:
5250
$cacheAccess = $(if ('${{ steps.cache-vcpkg.outputs.cache-hit }}' -eq 'true') { 'read' } else { 'write' })
5351
$env:VCPKG_BINARY_SOURCES = "clear;files,$cachedBinaries,$cacheAccess"
5452
55-
$env:PATH = "${env:PATH}:${{ github.workspace }}/ninja-build"
56-
cmake "-DCMAKE_TOOLCHAIN_FILE=$vcpkgToolchain" "-DCMAKE_BUILD_TYPE=$cmakeBuildType" "-DGRAPHQL_BUILD_MODULES=OFF" -G Ninja ${{ github.workspace }}
53+
cmake "-DCMAKE_TOOLCHAIN_FILE=$vcpkgToolchain" "-DCMAKE_BUILD_TYPE=$cmakeBuildType" "-DGRAPHQL_BUILD_MODULES=OFF" ${{ github.workspace }}
5754
5855
- name: Build
5956
working-directory: build/

cmake/cppgraphqlgen-functions.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function(add_graphql_schema_target SCHEMA_TARGET)
5353
target_sources(${SCHEMA_TARGET}_schema PUBLIC FILE_SET HEADERS
5454
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}
5555
FILES ${SCHEMA_HEADERS})
56+
get_target_property(GRAPHQL_BUILD_MODULES cppgraphqlgen::graphqlservice GRAPHQL_BUILD_MODULES)
5657
if(GRAPHQL_BUILD_MODULES)
5758
file(GLOB SCHEMA_MODULES ${CMAKE_CURRENT_SOURCE_DIR}/*.ixx)
5859
target_sources(${SCHEMA_TARGET}_schema PUBLIC FILE_SET CXX_MODULES
@@ -106,6 +107,7 @@ function(add_graphql_client_target CLIENT_TARGET)
106107
target_sources(${CLIENT_TARGET}_client PUBLIC FILE_SET HEADERS
107108
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}
108109
FILES ${CLIENT_HEADERS})
110+
get_target_property(GRAPHQL_BUILD_MODULES cppgraphqlgen::graphqlclient GRAPHQL_BUILD_MODULES)
109111
if(GRAPHQL_BUILD_MODULES)
110112
file(GLOB CLIENT_MODULES ${CMAKE_CURRENT_SOURCE_DIR}/*.ixx)
111113
target_sources(${CLIENT_TARGET}_client PUBLIC FILE_SET CXX_MODULES

cmake/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.5.8
1+
5.0.0

include/graphqlservice/GraphQLParse.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@ struct [[nodiscard("unnecessary parse")]] ast
2525
bool validated = false;
2626
};
2727

28+
inline namespace constants {
29+
2830
// By default, we want to limit the depth of nested nodes. You can override this with
2931
// another value for the depthLimit parameter in these parse functions.
3032
constexpr std::size_t c_defaultDepthLimit = 25;
3133

34+
} // namespace constants
35+
3236
[[nodiscard("unnecessary parse")]] GRAPHQLPEG_EXPORT ast parseSchemaString(
3337
std::string_view input, std::size_t depthLimit = c_defaultDepthLimit);
3438
[[nodiscard("unnecessary parse")]] GRAPHQLPEG_EXPORT ast parseSchemaFile(

include/graphqlservice/Parse.ixx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ using peg::ast_node;
1616
using peg::ast_input;
1717
using peg::ast;
1818

19-
namespace constants {
20-
21-
constexpr std::size_t c_defaultDepthLimit = peg::c_defaultDepthLimit;
22-
23-
} // namespace constants
19+
constexpr std::size_t c_defaultDepthLimit = constants::c_defaultDepthLimit;
2420

2521
using peg::parseSchemaString;
2622
using peg::parseSchemaFile;

include/graphqlservice/Response.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module;
77

88
export module GraphQL.Response;
99

10-
namespace included = graphql::response;
10+
export import GraphQL.Internal.Awaitable;
1111

1212
export namespace graphql::response {
1313

include/graphqlservice/Service.ixx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ export module GraphQL.Service;
1010
export import GraphQL.Parse;
1111
export import GraphQL.Response;
1212

13+
export import GraphQL.Internal.Awaitable;
14+
export import GraphQL.Internal.SortedMap;
15+
1316
export namespace graphql {
1417

1518
namespace schema {

include/graphqlservice/internal/Version.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ namespace graphql::internal {
1313

1414
inline namespace version {
1515

16-
constexpr std::string_view FullVersion { "4.5.8" };
16+
constexpr std::string_view FullVersion { "5.0.0" };
1717

18-
constexpr std::size_t MajorVersion = 4;
19-
constexpr std::size_t MinorVersion = 5;
20-
constexpr std::size_t PatchVersion = 8;
18+
constexpr std::size_t MajorVersion = 5;
19+
constexpr std::size_t MinorVersion = 0;
20+
constexpr std::size_t PatchVersion = 0;
2121

2222
} // namespace version
2323

include/graphqlservice/introspection/IntrospectionSchema.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
#include <string>
2020
#include <string_view>
2121

22-
// Check if the library version is compatible with schemagen 4.5.0
23-
static_assert(graphql::internal::MajorVersion == 4, "regenerate with schemagen: major version mismatch");
24-
static_assert(graphql::internal::MinorVersion == 5, "regenerate with schemagen: minor version mismatch");
22+
// Check if the library version is compatible with schemagen 5.0.0
23+
static_assert(graphql::internal::MajorVersion == 5, "regenerate with schemagen: major version mismatch");
24+
static_assert(graphql::internal::MinorVersion == 0, "regenerate with schemagen: minor version mismatch");
2525

2626
namespace graphql {
2727
namespace introspection {

res/ClientGen.rc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
#include <winver.h>
55

6-
#define GRAPHQL_RC_VERSION 4,5,8,0
7-
#define GRAPHQL_RC_VERSION_STR "4.5.8"
6+
#define GRAPHQL_RC_VERSION 5,0,0,0
7+
#define GRAPHQL_RC_VERSION_STR "5.0.0"
88

99
#ifndef DEBUG
1010
#define VER_DEBUG 0

0 commit comments

Comments
 (0)