Skip to content

Commit dba66cf

Browse files
authored
Upgrade Core to b97cf5b157022765ae54380bbb0b65b8b2d1792f (#776)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent fc61f15 commit dba66cf

75 files changed

Lines changed: 2865 additions & 2105 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DEPENDENCIES

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
vendorpull https://github.com/sourcemeta/vendorpull 1dcbac42809cf87cb5b045106b863e17ad84ba02
22
uwebsockets https://github.com/uNetworking/uWebSockets v20.76.0
3-
core https://github.com/sourcemeta/core 3c800567cf63aea812b03d97d39adff1f9530d16
4-
blaze https://github.com/sourcemeta/blaze e13f882afb70da70bcfa8df2bf0374220567a61e
5-
jsonbinpack https://github.com/sourcemeta/jsonbinpack c9038f1ca016890cf0dc6929e668b77784f91332
3+
core https://github.com/sourcemeta/core b97cf5b157022765ae54380bbb0b65b8b2d1792f
4+
blaze https://github.com/sourcemeta/blaze 983545b134e5fcd64a5820088339699af5df9010
5+
jsonbinpack https://github.com/sourcemeta/jsonbinpack 73ce1ed4df479094c2876458494c8f3417fc08dc
66
hydra https://github.com/sourcemeta/hydra eef9a60014ec16f00bbebb5f272522207d48a9f8
77
codegen https://github.com/sourcemeta/codegen 615532845e07353c3a4a95af40d0f4ad1a03b6ec
88
libdeflate https://github.com/ebiggers/libdeflate v1.25
9-
jsonschema https://github.com/sourcemeta/jsonschema v14.13.4
9+
jsonschema https://github.com/sourcemeta/jsonschema 220af0a37b98a05be34012ba6184f80e2c50900a
1010
bootstrap https://github.com/twbs/bootstrap v5.3.3
1111
bootstrap-icons https://github.com/twbs/icons v1.11.3
1212
collections/sourcemeta/std/v0 https://github.com/sourcemeta/std v0.4.0

src/index/generators.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ struct GENERATE_POINTER_POSITIONS {
184184
std::ostringstream schema_stream;
185185
sourcemeta::core::prettify(schema, schema_stream);
186186
sourcemeta::core::PointerPositionTracker tracker;
187-
sourcemeta::core::parse_json(schema_stream.str(), std::ref(tracker));
187+
sourcemeta::core::JSON parsed{nullptr};
188+
sourcemeta::core::parse_json(schema_stream.str(), parsed,
189+
std::ref(tracker));
188190
const auto result{sourcemeta::core::to_json(tracker)};
189191
const auto timestamp_end{std::chrono::steady_clock::now()};
190192
sourcemeta::one::metapack_write_pretty_json(
@@ -210,7 +212,9 @@ struct GENERATE_FRAME_LOCATIONS {
210212
std::ostringstream contents_stream;
211213
sourcemeta::core::prettify(contents, contents_stream);
212214
sourcemeta::core::PointerPositionTracker tracker;
213-
sourcemeta::core::parse_json(contents_stream.str(), std::ref(tracker));
215+
sourcemeta::core::JSON parsed{nullptr};
216+
sourcemeta::core::parse_json(contents_stream.str(), parsed,
217+
std::ref(tracker));
214218
sourcemeta::core::SchemaFrame frame{
215219
sourcemeta::core::SchemaFrame::Mode::Locations};
216220
frame.analyse(contents, sourcemeta::core::schema_walker,

src/index/index.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,10 @@ auto main(int argc, char *argv[]) noexcept -> int {
524524
} catch (const sourcemeta::one::CustomRuleError &error) {
525525
std::cerr << "error: " << error.what() << "\n";
526526
return EXIT_FAILURE;
527+
} catch (const sourcemeta::blaze::LinterInvalidNamePatternError &error) {
528+
std::cerr << "error: The schema rule name must match " << error.regex()
529+
<< "\n at name " << error.identifier() << "\n";
530+
return EXIT_FAILURE;
527531
} catch (const sourcemeta::blaze::LinterInvalidNameError &error) {
528532
std::cerr << "error: " << error.what() << "\n at name "
529533
<< error.identifier() << "\n";

src/server/action_jsonschema_evaluate.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,14 @@ auto trace(sourcemeta::blaze::Evaluator &evaluator,
4343
const auto &static_locations{locations.at("static")};
4444

4545
sourcemeta::core::PointerPositionTracker tracker;
46-
const auto instance_json{
47-
sourcemeta::core::parse_json(instance, std::ref(tracker))};
46+
sourcemeta::core::JSON instance_json{nullptr};
47+
sourcemeta::core::parse_json(instance, instance_json, std::ref(tracker));
4848
const auto result{evaluator.validate(
4949
schema_template, instance_json,
5050
[&steps, &tracker, &static_locations, &instance_json](
5151
const sourcemeta::blaze::EvaluationType type, const bool valid,
5252
const sourcemeta::blaze::Instruction &instruction,
53+
const sourcemeta::blaze::InstructionExtra &extra,
5354
const sourcemeta::core::WeakPointer &evaluate_path,
5455
const sourcemeta::core::WeakPointer &instance_location,
5556
const sourcemeta::core::JSON &annotation) {
@@ -82,7 +83,7 @@ auto trace(sourcemeta::blaze::Evaluator &evaluator,
8283
"instancePositions",
8384
sourcemeta::core::to_json(std::move(instance_positions).value()));
8485
step.assign("keywordLocation",
85-
sourcemeta::core::to_json(instruction.keyword_location));
86+
sourcemeta::core::to_json(extra.keyword_location));
8687
step.assign("annotation", annotation);
8788

8889
if (type == sourcemeta::blaze::EvaluationType::Pre) {
@@ -96,7 +97,7 @@ auto trace(sourcemeta::blaze::Evaluator &evaluator,
9697

9798
// Determine keyword vocabulary
9899
const auto &current_location{
99-
static_locations.at(instruction.keyword_location)};
100+
static_locations.at(extra.keyword_location)};
100101
if (!current_location.is_object() ||
101102
!current_location.defines("baseDialect") ||
102103
!current_location.defines("dialect")) {

vendor/blaze/DEPENDENCIES

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

vendor/blaze/src/compiler/compile.cc

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

vendor/blaze/src/compiler/compile_helpers.h

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

vendor/blaze/src/compiler/compile_json.cc

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

vendor/blaze/src/compiler/default_compiler.cc

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

0 commit comments

Comments
 (0)