Skip to content

Commit 01763b1

Browse files
authored
Upgrade Core to 375cdcacefe7f8bedb038c761fce1802e4954244 (#441)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent b0c6c32 commit 01763b1

File tree

14 files changed

+234
-100
lines changed

14 files changed

+234
-100
lines changed

DEPENDENCIES

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
vendorpull https://github.com/sourcemeta/vendorpull dea311b5bfb53b6926a4140267959ae334d3ecf4
2-
core https://github.com/sourcemeta/core 1aa4a617548bf482420e8757ecd10308cddae7a2
2+
core https://github.com/sourcemeta/core 375cdcacefe7f8bedb038c761fce1802e4954244
33
jsonschema-test-suite https://github.com/json-schema-org/JSON-Schema-Test-Suite bc919bdb266a4949f8a2425f2f540371604d82b4

src/compiler/compile.cc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,12 @@ auto compile(const sourcemeta::core::JSON &schema,
108108
const std::optional<std::string> &default_dialect) -> Template {
109109
assert(is_schema(schema));
110110

111-
const std::string base{sourcemeta::core::URI{
111+
const std::string base{sourcemeta::core::URI::canonicalize(
112112
sourcemeta::core::identify(
113113
schema, resolver,
114114
sourcemeta::core::SchemaIdentificationStrategy::Strict,
115115
default_dialect)
116-
.value_or("")}
117-
.canonicalize()
118-
.recompose()};
116+
.value_or(""))};
119117

120118
assert(frame.locations().contains(
121119
{sourcemeta::core::SchemaReferenceType::Static, base}));
@@ -137,7 +135,7 @@ auto compile(const sourcemeta::core::JSON &schema,
137135
sourcemeta::core::empty_pointer,
138136
schema,
139137
vocabularies(schema, resolver, root_frame_entry.dialect),
140-
sourcemeta::core::URI{root_frame_entry.base}.canonicalize().recompose(),
138+
sourcemeta::core::URI::canonicalize(root_frame_entry.base),
141139
{},
142140
{}};
143141

@@ -295,7 +293,7 @@ auto compile(const Context &context, const SchemaContext &schema_context,
295293
// Determine URI of the destination after recursion
296294
const std::string destination{
297295
uri.has_value()
298-
? sourcemeta::core::URI{uri.value()}.canonicalize().recompose()
296+
? sourcemeta::core::URI::canonicalize(uri.value())
299297
: to_uri(schema_context.relative_pointer.concat(schema_suffix),
300298
schema_context.base)
301299
.canonicalize()

src/compiler/compile_helpers.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ inline auto property_relative_dynamic_context() -> DynamicContext {
3131

3232
inline auto schema_resource_id(const Context &context,
3333
const std::string &resource) -> std::size_t {
34-
const auto iterator{
35-
std::find(context.resources.cbegin(), context.resources.cend(),
36-
sourcemeta::core::URI{resource}.canonicalize().recompose())};
34+
const auto iterator{std::find(context.resources.cbegin(),
35+
context.resources.cend(),
36+
sourcemeta::core::URI::canonicalize(resource))};
3737
if (iterator == context.resources.cend()) {
3838
assert(resource.empty());
3939
return 0;

test/evaluator/evaluator_draft4_test.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,12 +2119,12 @@ TEST(Evaluator_draft4, patternProperties_11) {
21192119
"#/patternProperties", "");
21202120
EVALUATE_TRACE_PRE(1, AssertionTypeStrict, "/patternProperties/^[a-z]+$/type",
21212121
// Note that the caret needs to be URI escaped
2122-
"#/patternProperties/%5E%5Ba-z%5D%2B$/type", "/foo");
2122+
"#/patternProperties/%5E%5Ba-z%5D+$/type", "/foo");
21232123

21242124
EVALUATE_TRACE_POST_SUCCESS(
21252125
0, AssertionTypeStrict, "/patternProperties/^[a-z]+$/type",
21262126
// Note that the caret needs to be URI escaped
2127-
"#/patternProperties/%5E%5Ba-z%5D%2B$/type", "/foo");
2127+
"#/patternProperties/%5E%5Ba-z%5D+$/type", "/foo");
21282128
EVALUATE_TRACE_POST_SUCCESS(1, LoopPropertiesRegexClosed,
21292129
"/patternProperties", "#/patternProperties", "");
21302130

@@ -2153,14 +2153,14 @@ TEST(Evaluator_draft4, patternProperties_11_exhaustive) {
21532153
"#/patternProperties", "");
21542154
EVALUATE_TRACE_PRE(1, AssertionTypeStrict, "/patternProperties/^[a-z]+$/type",
21552155
// Note that the caret needs to be URI escaped
2156-
"#/patternProperties/%5E%5Ba-z%5D%2B$/type", "/foo");
2156+
"#/patternProperties/%5E%5Ba-z%5D+$/type", "/foo");
21572157
EVALUATE_TRACE_PRE(2, LoopPropertiesExcept, "/additionalProperties",
21582158
"#/additionalProperties", "");
21592159

21602160
EVALUATE_TRACE_POST_SUCCESS(
21612161
0, AssertionTypeStrict, "/patternProperties/^[a-z]+$/type",
21622162
// Note that the caret needs to be URI escaped
2163-
"#/patternProperties/%5E%5Ba-z%5D%2B$/type", "/foo");
2163+
"#/patternProperties/%5E%5Ba-z%5D+$/type", "/foo");
21642164
EVALUATE_TRACE_POST_SUCCESS(1, LoopPropertiesRegex, "/patternProperties",
21652165
"#/patternProperties", "");
21662166
EVALUATE_TRACE_POST_SUCCESS(2, LoopPropertiesExcept, "/additionalProperties",
@@ -2196,12 +2196,12 @@ TEST(Evaluator_draft4, patternProperties_12) {
21962196
EVALUATE_TRACE_PRE(1, AssertionTypeStrict,
21972197
"/patternProperties/^[a-z]+$/type",
21982198
// Note that the caret needs to be URI escaped
2199-
"#/patternProperties/%5E%5Ba-z%5D%2B$/type", "/foo");
2199+
"#/patternProperties/%5E%5Ba-z%5D+$/type", "/foo");
22002200

22012201
EVALUATE_TRACE_POST_SUCCESS(
22022202
0, AssertionTypeStrict, "/patternProperties/^[a-z]+$/type",
22032203
// Note that the caret needs to be URI escaped
2204-
"#/patternProperties/%5E%5Ba-z%5D%2B$/type", "/foo");
2204+
"#/patternProperties/%5E%5Ba-z%5D+$/type", "/foo");
22052205
EVALUATE_TRACE_POST_FAILURE(1, LoopPropertiesRegexClosed,
22062206
"/patternProperties", "#/patternProperties",
22072207
"");

vendor/core/src/core/jsonpointer/stringify.h

Lines changed: 3 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/core/src/core/jsonschema/frame.cc

Lines changed: 5 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/core/src/core/jsonschema/include/sourcemeta/core/jsonschema_transform.h

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/core/src/core/jsonschema/jsonschema.cc

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/core/src/core/jsonschema/transformer.cc

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/core/src/core/uri/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)