Skip to content

Commit 8d2afea

Browse files
authored
Merge pull request #256 from wravery/fix-source-lifetime
Fix source lifetime and preserve input strings in response::IdType
2 parents ab07b35 + 86d9822 commit 8d2afea

27 files changed

+136
-110
lines changed

cmake/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.4.1
1+
4.5.0

include/graphqlservice/internal/Base64.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,12 @@ class Base64
5959
const std::vector<std::uint8_t>& bytes);
6060

6161
enum class [[nodiscard]] Comparison {
62+
// Valid Base64 always compares as less than non-empty invalid Base64.
63+
InvalidBase64 = -2,
64+
6265
LessThan = -1,
6366
EqualTo = 0,
6467
GreaterThan = 1,
65-
66-
InvalidBase64 = 2,
6768
};
6869

6970
// Compare a set of bytes to a possible Base64 string without performing any heap allocations.

include/graphqlservice/internal/Grammar.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
1111

1212
#include "graphqlservice/internal/SyntaxTree.h"
1313

14-
#define TAO_PEGTL_NAMESPACE tao::graphqlpeg
15-
16-
#include <tao/pegtl.hpp>
17-
#include <tao/pegtl/contrib/parse_tree.hpp>
18-
1914
#include <functional>
2015

2116
namespace graphql::peg {

include/graphqlservice/internal/SyntaxTree.h

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -86,36 +86,6 @@ class [[nodiscard]] ast_node : public parse_tree::basic_node<ast_node>
8686
mutable std::unique_ptr<unescaped_t> _unescaped;
8787
};
8888

89-
template <class ParseInput>
90-
class [[nodiscard]] depth_limit_input : public ParseInput
91-
{
92-
public:
93-
template <typename... Args>
94-
explicit depth_limit_input(size_t depthLimit, Args&&... args) noexcept
95-
: ParseInput(std::forward<Args>(args)...)
96-
, _depthLimit(depthLimit)
97-
{
98-
}
99-
100-
size_t depthLimit() const noexcept
101-
{
102-
return _depthLimit;
103-
}
104-
105-
size_t selectionSetDepth = 0;
106-
107-
private:
108-
const size_t _depthLimit;
109-
};
110-
111-
using ast_file = depth_limit_input<file_input<>>;
112-
using ast_memory = depth_limit_input<memory_input<>>;
113-
114-
struct [[nodiscard]] ast_input
115-
{
116-
std::variant<std::vector<char>, std::unique_ptr<ast_file>, std::string_view> data;
117-
};
118-
11989
} // namespace graphql::peg
12090

12191
#endif // GRAPHQLSYNTAXTREE_H

include/graphqlservice/internal/Version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
namespace graphql::internal {
1212

13-
constexpr std::string_view FullVersion { "4.4.1" };
13+
constexpr std::string_view FullVersion { "4.5.0" };
1414

1515
constexpr size_t MajorVersion = 4;
16-
constexpr size_t MinorVersion = 4;
17-
constexpr size_t PatchVersion = 1;
16+
constexpr size_t MinorVersion = 5;
17+
constexpr size_t PatchVersion = 0;
1818

1919
} // namespace graphql::internal
2020

include/graphqlservice/introspection/IntrospectionSchema.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
#include "graphqlservice/internal/Schema.h"
1212

13-
// Check if the library version is compatible with schemagen 4.4.0
13+
// Check if the library version is compatible with schemagen 4.5.0
1414
static_assert(graphql::internal::MajorVersion == 4, "regenerate with schemagen: major version mismatch");
15-
static_assert(graphql::internal::MinorVersion == 4, "regenerate with schemagen: minor version mismatch");
15+
static_assert(graphql::internal::MinorVersion == 5, "regenerate with schemagen: minor version mismatch");
1616

1717
#include <array>
1818
#include <memory>

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,4,1,0
7-
#define GRAPHQL_RC_VERSION_STR "4.4.1"
6+
#define GRAPHQL_RC_VERSION 4,5,0,0
7+
#define GRAPHQL_RC_VERSION_STR "4.5.0"
88

99
#ifndef DEBUG
1010
#define VER_DEBUG 0

res/SchemaGen.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,4,1,0
7-
#define GRAPHQL_RC_VERSION_STR "4.4.1"
6+
#define GRAPHQL_RC_VERSION 4,5,0,0
7+
#define GRAPHQL_RC_VERSION_STR "4.5.0"
88

99
#ifndef DEBUG
1010
#define VER_DEBUG 0

res/graphqlclient_version.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,4,1,0
7-
#define GRAPHQL_RC_VERSION_STR "4.4.1"
6+
#define GRAPHQL_RC_VERSION 4,5,0,0
7+
#define GRAPHQL_RC_VERSION_STR "4.5.0"
88

99
#ifndef DEBUG
1010
#define VER_DEBUG 0

res/graphqljson_version.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,4,1,0
7-
#define GRAPHQL_RC_VERSION_STR "4.4.1"
6+
#define GRAPHQL_RC_VERSION 4,5,0,0
7+
#define GRAPHQL_RC_VERSION_STR "4.5.0"
88

99
#ifndef DEBUG
1010
#define VER_DEBUG 0

0 commit comments

Comments
 (0)