Skip to content

Commit

Permalink
Upgrade Blaze to cf0c89cd419ffb70cc334d395ac5ab1035702e30 (#192)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti authored Nov 7, 2024
1 parent e77f2e5 commit 4db93a1
Show file tree
Hide file tree
Showing 14 changed files with 227 additions and 178 deletions.
2 changes: 1 addition & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ jsontoolkit https://github.com/sourcemeta/jsontoolkit 7a398224cc2e76ea9ae8541a87
hydra https://github.com/sourcemeta/hydra a4a74f3cabd32f2f829f449d67339dac33f9910e
alterschema https://github.com/sourcemeta/alterschema 92e370ce9c1f0582014b54d43e388ee012dfe13d
jsonbinpack https://github.com/sourcemeta/jsonbinpack d777179441d3c703e1fda1187742541aa26836b5
blaze https://github.com/sourcemeta/blaze a7885ab63fcbb4f8d974e574a34bd9c5ccf31a2c
blaze https://github.com/sourcemeta/blaze cf0c89cd419ffb70cc334d395ac5ab1035702e30
2 changes: 1 addition & 1 deletion src/command_metaschema.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ auto sourcemeta::jsonschema::cli::metaschema(
cache.insert({dialect.value(), metaschema_template});
}

sourcemeta::blaze::ErrorTraceOutput output{entry.second};
sourcemeta::blaze::ErrorOutput output{entry.second};
if (sourcemeta::blaze::evaluate(cache.at(dialect.value()), entry.second,
std::ref(output))) {
log_verbose(options)
Expand Down
2 changes: 1 addition & 1 deletion src/command_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ auto sourcemeta::jsonschema::cli::test(
const auto instance{
get_data(test_case, entry.first.parent_path(), verbose)};
const std::string ref{"$ref"};
sourcemeta::blaze::ErrorTraceOutput output{instance, {std::cref(ref)}};
sourcemeta::blaze::ErrorOutput output{instance, {std::cref(ref)}};
const auto case_result{sourcemeta::blaze::evaluate(
schema_template, instance, std::ref(output))};

Expand Down
4 changes: 2 additions & 2 deletions src/command_validate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ auto sourcemeta::jsonschema::cli::validate(
for (const auto &instance : sourcemeta::jsontoolkit::JSONL{stream}) {
index += 1;
std::ostringstream error;
sourcemeta::blaze::ErrorTraceOutput output{instance};
sourcemeta::blaze::ErrorOutput output{instance};
bool subresult = true;
if (benchmark) {
const auto timestamp_start{
Expand Down Expand Up @@ -124,7 +124,7 @@ auto sourcemeta::jsonschema::cli::validate(
} else {
const auto instance{sourcemeta::jsontoolkit::from_file(instance_path)};
std::ostringstream error;
sourcemeta::blaze::ErrorTraceOutput output{instance};
sourcemeta::blaze::ErrorOutput output{instance};
bool subresult{true};
if (benchmark) {
const auto timestamp_start{std::chrono::high_resolution_clock::now()};
Expand Down
4 changes: 2 additions & 2 deletions src/utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ auto parse_options(const std::span<const std::string> &arguments,
return options;
}

auto print(const sourcemeta::blaze::ErrorTraceOutput &output,
std::ostream &stream) -> void {
auto print(const sourcemeta::blaze::ErrorOutput &output, std::ostream &stream)
-> void {
stream << "error: Schema validation failure\n";
for (const auto &entry : output) {
stream << " " << entry.message << "\n";
Expand Down
4 changes: 2 additions & 2 deletions src/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ auto for_each_json(const std::vector<std::string> &arguments,
-> std::vector<
std::pair<std::filesystem::path, sourcemeta::jsontoolkit::JSON>>;

auto print(const sourcemeta::blaze::ErrorTraceOutput &output,
std::ostream &stream) -> void;
auto print(const sourcemeta::blaze::ErrorOutput &output, std::ostream &stream)
-> void;

auto resolver(const std::map<std::string, std::vector<std::string>> &options,
const bool remote = false)
Expand Down
5 changes: 5 additions & 0 deletions vendor/blaze/src/compiler/compile_describe.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 13 additions & 6 deletions vendor/blaze/src/compiler/compile_helpers.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/blaze/src/compiler/compile_json.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 7 additions & 12 deletions vendor/blaze/src/compiler/compile_output.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4db93a1

Please sign in to comment.