From b35c3dbcfe4a01e500239feb3a591b55c61f5caa Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Tue, 15 Sep 2026 12:51:11 -0300 Subject: [PATCH 1/2] Upgrade Sourcemeta dependencies Signed-off-by: Juan Cruz Viotti --- DEPENDENCIES | 4 +- src/compiler/mapper/enum_8_bit.h | 17 +- src/compiler/mapper/enum_8_bit_top_level.h | 17 +- src/compiler/mapper/enum_arbitrary.h | 17 +- src/compiler/mapper/enum_singleton.h | 17 +- src/compiler/mapper/integer_bounded_8_bit.h | 17 +- .../integer_bounded_greater_than_8_bit.h | 17 +- .../mapper/integer_bounded_multiplier_8_bit.h | 17 +- ...er_bounded_multiplier_greater_than_8_bit.h | 17 +- src/compiler/mapper/integer_lower_bound.h | 17 +- .../mapper/integer_lower_bound_multiplier.h | 17 +- src/compiler/mapper/integer_unbound.h | 17 +- .../mapper/integer_unbound_multiplier.h | 17 +- src/compiler/mapper/integer_upper_bound.h | 17 +- .../mapper/integer_upper_bound_multiplier.h | 17 +- src/compiler/mapper/number_arbitrary.h | 17 +- vendor/blaze/CMakeLists.txt | 9 + vendor/blaze/DEPENDENCIES | 2 +- vendor/blaze/config.cmake.in | 3 + vendor/blaze/ports/javascript/index.mjs | 5 +- vendor/blaze/src/alterschema/CMakeLists.txt | 2 + vendor/blaze/src/alterschema/alterschema.cc | 187 +- .../alterschema/common/allof_false_simplify.h | 2 +- .../alterschema/common/anyof_false_simplify.h | 2 +- .../common/anyof_remove_false_schemas.h | 2 +- .../alterschema/common/anyof_true_simplify.h | 2 +- .../src/alterschema/common/const_in_enum.h | 2 +- .../src/alterschema/common/const_with_type.h | 2 +- .../content_media_type_without_encoding.h | 2 +- .../content_schema_without_media_type.h | 2 +- .../common/dependencies_property_tautology.h | 2 +- .../common/dependent_required_tautology.h | 2 +- .../common/disallow_narrows_type.h | 2 +- .../common/double_negation_elimination.h | 2 +- .../draft_official_dialect_with_https.h | 2 +- ..._official_dialect_without_empty_fragment.h | 3 +- .../alterschema/common/draft_ref_siblings.h | 2 +- .../common/drop_allof_empty_schemas.h | 10 +- .../common/drop_extends_empty_schemas.h | 2 +- .../common/duplicate_allof_branches.h | 2 +- .../common/duplicate_anyof_branches.h | 2 +- .../common/duplicate_enum_values.h | 2 +- .../common/duplicate_required_values.h | 2 +- .../common/dynamic_ref_to_static_ref.h | 2 +- .../src/alterschema/common/else_without_if.h | 2 +- .../alterschema/common/empty_object_as_true.h | 2 +- .../src/alterschema/common/enum_with_type.h | 2 +- .../common/equal_numeric_bounds_to_enum.h | 2 +- .../common/exclusive_bounds_false_drop.h | 2 +- .../exclusive_maximum_number_and_maximum.h | 2 +- .../exclusive_minimum_number_and_minimum.h | 2 +- .../alterschema/common/flatten_nested_allof.h | 2 +- .../alterschema/common/flatten_nested_anyof.h | 2 +- .../common/flatten_nested_extends.h | 2 +- .../alterschema/common/if_without_then_else.h | 2 +- .../alterschema/common/ignored_metaschema.h | 2 +- .../common/max_contains_without_contains.h | 2 +- .../common/maximum_real_for_integer.h | 2 +- .../common/min_contains_without_contains.h | 2 +- .../common/minimum_real_for_integer.h | 2 +- ...ern_official_dialect_with_empty_fragment.h | 3 +- .../modern_official_dialect_with_http.h | 2 +- .../common/non_applicable_additional_items.h | 2 +- .../common/non_applicable_disallow_types.h | 2 +- .../non_applicable_enum_validation_keywords.h | 2 +- .../non_applicable_type_specific_keywords.h | 2 +- .../blaze/src/alterschema/common/not_false.h | 2 +- .../alterschema/common/oneof_false_simplify.h | 2 +- .../common/oneof_to_anyof_disjoint_types.h | 2 +- .../alterschema/common/orphan_definitions.h | 41 +- .../required_properties_in_properties.h | 2 +- .../alterschema/common/single_type_array.h | 2 +- .../src/alterschema/common/then_without_if.h | 2 +- .../common/unknown_keywords_prefix.h | 2 +- .../alterschema/common/unknown_local_ref.h | 2 +- .../unnecessary_allof_ref_wrapper_draft.h | 2 +- .../common/unnecessary_extends_ref_wrapper.h | 2 +- .../common/unsatisfiable_drop_validation.h | 2 +- .../unsatisfiable_in_place_applicator_type.h | 2 +- .../include/sourcemeta/blaze/alterschema.h | 29 +- .../blaze/alterschema_transformer.h | 52 +- .../src/alterschema/linter/comment_trim.h | 2 +- .../linter/conflicting_readonly_writeonly.h | 2 +- .../alterschema/linter/const_not_in_enum.h | 2 +- .../linter/content_schema_default.h | 2 +- .../alterschema/linter/definitions_to_defs.h | 2 +- .../alterschema/linter/dependencies_default.h | 2 +- .../linter/dependent_required_default.h | 2 +- .../linter/description_trailing_period.h | 2 +- .../src/alterschema/linter/description_trim.h | 2 +- .../src/alterschema/linter/disallow_default.h | 2 +- .../alterschema/linter/divisible_by_default.h | 2 +- .../alterschema/linter/duplicate_examples.h | 2 +- .../blaze/src/alterschema/linter/else_empty.h | 2 +- .../src/alterschema/linter/enum_to_const.h | 2 +- .../linter/equal_numeric_bounds_to_const.h | 2 +- .../alterschema/linter/forbid_empty_enum.h | 2 +- .../linter/incoherent_min_max_contains.h | 2 +- .../alterschema/linter/invalid_external_ref.h | 2 +- .../alterschema/linter/items_array_default.h | 2 +- .../alterschema/linter/items_schema_default.h | 2 +- .../alterschema/linter/multiple_of_default.h | 2 +- .../linter/pattern_non_ecma_regex.h | 2 +- .../linter/pattern_properties_default.h | 2 +- .../pattern_properties_non_ecma_regex.h | 2 +- .../linter/portable_anchor_names.h | 2 +- .../alterschema/linter/properties_default.h | 2 +- .../linter/property_names_default.h | 2 +- .../linter/property_names_type_default.h | 2 +- .../linter/simple_properties_identifiers.h | 2 +- .../blaze/src/alterschema/linter/then_empty.h | 2 +- .../linter/title_description_equal.h | 2 +- .../linter/title_trailing_period.h | 2 +- .../blaze/src/alterschema/linter/title_trim.h | 2 +- .../linter/top_level_description.h | 4 +- .../alterschema/linter/top_level_examples.h | 4 +- .../src/alterschema/linter/top_level_title.h | 4 +- .../linter/unevaluated_items_default.h | 2 +- .../linter/unevaluated_properties_default.h | 2 +- .../linter/unknown_format_prefix.h | 2 +- .../unnecessary_allof_ref_wrapper_modern.h | 2 +- .../linter/unnecessary_allof_wrapper.h | 2 +- .../linter/unnecessary_extends_wrapper.h | 2 +- .../linter/unsatisfiable_max_contains.h | 2 +- .../linter/unsatisfiable_min_properties.h | 2 +- .../src/alterschema/linter/valid_default.h | 32 +- .../src/alterschema/linter/valid_examples.h | 32 +- vendor/blaze/src/alterschema/schema_helpers.h | 8 - vendor/blaze/src/alterschema/schema_rule.cc | 4 +- vendor/blaze/src/alterschema/transformer.cc | 123 +- vendor/blaze/src/bundle/bundle.cc | 35 +- vendor/blaze/src/bundle/helpers.h | 5 +- .../bundle/include/sourcemeta/blaze/bundle.h | 8 + .../blaze/src/canonicalizer/canonicalize.cc | 3 +- .../rules/type_union_distribute_keywords.h | 107 +- .../blaze/src/canonicalizer/schema_helpers.h | 8 - vendor/blaze/src/compiler/compile.cc | 24 +- vendor/blaze/src/compiler/compile_helpers.h | 32 +- vendor/blaze/src/convert/CMakeLists.txt | 33 + vendor/blaze/src/convert/convert.cc | 312 + .../upgrade => convert}/helpers.h | 43 +- .../include/sourcemeta/blaze/convert.h | 75 + .../include/sourcemeta/blaze/convert_error.h | 57 + vendor/blaze/src/convert/rule.h | 45 + .../src/convert/rules/definitions_to_defs.h | 36 + .../rules/draft_official_dialect_with_https.h | 72 + ..._official_dialect_without_empty_fragment.h | 43 + .../src/convert/rules/empty_object_as_true.h | 28 + .../blaze/src/convert/rules/enum_to_const.h | 34 + .../rules}/prefix_promoted_2020_12_keywords.h | 10 +- .../prefix_promoted_draft_2019_09_keywords.h | 10 +- .../rules}/prefix_promoted_draft_4_keywords.h | 10 +- .../rules}/prefix_promoted_draft_6_keywords.h | 10 +- .../rules}/prefix_promoted_draft_7_keywords.h | 10 +- .../rules}/upgrade_2019_09_to_2020_12.h | 21 +- .../rules}/upgrade_dialect_override_cleanup.h | 8 +- .../rules}/upgrade_draft_3_to_draft_4.h | 8 +- .../rules}/upgrade_draft_4_to_draft_6.h | 20 +- .../rules}/upgrade_draft_6_to_draft_7.h | 8 +- .../rules}/upgrade_draft_7_to_draft_2019_09.h | 27 +- vendor/core/CMakeLists.txt | 1 - vendor/core/DEPENDENCIES | 2 +- vendor/core/cmake/FindLibDeflate.cmake | 137 - vendor/core/cmake/common/compiler/simd.cmake | 26 +- vendor/core/config.cmake.in | 1 + vendor/core/src/core/crypto/CMakeLists.txt | 9 +- vendor/core/src/core/crypto/crypto_base64.cc | 59 +- vendor/core/src/core/crypto/crypto_bignum.h | 1005 +- vendor/core/src/core/crypto/crypto_crc32.cc | 828 +- vendor/core/src/core/crypto/crypto_der.h | 34 - vendor/core/src/core/crypto/crypto_ecc.h | 371 +- .../core/src/core/crypto/crypto_ecdh_other.cc | 11 +- vendor/core/src/core/crypto/crypto_eddsa.h | 580 +- vendor/core/src/core/crypto/crypto_helpers.h | 66 +- vendor/core/src/core/crypto/crypto_other.h | 7 + .../src/core/crypto/crypto_random_other.cc | 54 +- .../src/core/crypto/crypto_rsa_oaep_other.cc | 6 +- .../core/src/core/crypto/crypto_rsa_other.h | 144 + .../core/src/core/crypto/crypto_sha1_other.cc | 40 +- .../src/core/crypto/crypto_sha256_other.h | 69 +- vendor/core/src/core/crypto/crypto_sha2_64.h | 67 +- vendor/core/src/core/crypto/crypto_shake256.h | 43 +- .../core/src/core/crypto/crypto_sign_apple.cc | 1 + .../core/src/core/crypto/crypto_sign_other.cc | 138 +- .../src/core/crypto/crypto_sign_windows.cc | 1 + vendor/core/src/core/crypto/crypto_system.h | 120 + .../src/core/crypto/crypto_verify_apple.cc | 1 + .../src/core/crypto/crypto_verify_openssl.cc | 1 + .../src/core/crypto/crypto_verify_other.cc | 20 +- .../src/core/crypto/crypto_verify_windows.cc | 1 + vendor/core/src/core/gzip/CMakeLists.txt | 3 - vendor/core/src/core/gzip/bit_reader.h | 155 - vendor/core/src/core/gzip/deflate.h | 1363 ++- vendor/core/src/core/gzip/gzip.cc | 223 +- vendor/core/src/core/gzip/huffman.h | 168 - .../core/gzip/include/sourcemeta/core/gzip.h | 7 +- vendor/core/src/core/gzip/inflate.h | 1680 +++ vendor/core/src/core/gzip/streambuf.cc | 274 +- vendor/core/src/core/html/CMakeLists.txt | 32 +- vendor/core/src/core/html/codegen.cc | 293 + vendor/core/src/core/html/entity.cc | 30 + vendor/core/src/core/html/entity_hash.h | 58 + .../core/html/include/sourcemeta/core/html.h | 5 +- .../include/sourcemeta/core/html_entity.h | 34 + vendor/core/src/core/jsonschema/helpers.h | 3 - vendor/core/src/core/jsonschema/iterator.h | 8 - vendor/core/src/core/jsonschema/jsonschema.cc | 36 - .../core/src/core/jsonschema/known_walker.cc | 9343 +++++++++-------- vendor/core/src/core/markdown/CMakeLists.txt | 3 + vendor/core/src/core/markdown/markdown.cc | 30 +- vendor/core/src/core/oidc/oidc_userinfo.cc | 28 +- vendor/core/src/core/openapi/helpers.h | 5 - vendor/core/src/core/openapi/path_item.h | 13 +- vendor/core/src/core/regex/permissive.h | 60 +- .../include/sourcemeta/core/terminal.h | 51 +- vendor/core/src/core/terminal/terminal.cc | 26 +- .../src/core/terminal/terminal_internal.h | 4 + .../core/src/core/terminal/terminal_posix.cc | 4 - vendor/core/src/core/unicode/CMakeLists.txt | 2 + vendor/core/src/core/unicode/codegen.cc | 178 +- .../unicode/include/sourcemeta/core/unicode.h | 56 +- .../include/sourcemeta/core/unicode_ucd.h | 45 + vendor/core/src/core/unicode/unicode.cc | 39 +- .../sourcemeta/core/parallel_for_each.h | 52 +- vendor/core/src/lang/process/spawn.cc | 13 +- vendor/core/vendor/libdeflate/COPYING | 22 - vendor/core/vendor/libdeflate/common_defs.h | 735 -- vendor/core/vendor/libdeflate/lib/adler32.c | 162 - .../vendor/libdeflate/lib/arm/adler32_impl.h | 365 - .../vendor/libdeflate/lib/arm/cpu_features.c | 292 - .../vendor/libdeflate/lib/arm/cpu_features.h | 214 - .../vendor/libdeflate/lib/arm/crc32_impl.h | 594 -- .../libdeflate/lib/arm/crc32_pmull_helpers.h | 156 - .../libdeflate/lib/arm/crc32_pmull_wide.h | 226 - .../libdeflate/lib/arm/matchfinder_impl.h | 78 - .../vendor/libdeflate/lib/bt_matchfinder.h | 342 - .../libdeflate/lib/cpu_features_common.h | 93 - vendor/core/vendor/libdeflate/lib/crc32.c | 262 - .../vendor/libdeflate/lib/crc32_multipliers.h | 375 - .../core/vendor/libdeflate/lib/crc32_tables.h | 587 -- .../libdeflate/lib/decompress_template.h | 777 -- .../vendor/libdeflate/lib/deflate_compress.c | 4135 -------- .../vendor/libdeflate/lib/deflate_compress.h | 15 - .../vendor/libdeflate/lib/deflate_constants.h | 56 - .../libdeflate/lib/deflate_decompress.c | 1208 --- .../vendor/libdeflate/lib/gzip_compress.c | 90 - .../vendor/libdeflate/lib/gzip_constants.h | 45 - .../vendor/libdeflate/lib/gzip_decompress.c | 144 - .../vendor/libdeflate/lib/hc_matchfinder.h | 401 - .../vendor/libdeflate/lib/ht_matchfinder.h | 234 - .../core/vendor/libdeflate/lib/lib_common.h | 113 - .../libdeflate/lib/matchfinder_common.h | 224 - .../libdeflate/lib/riscv/matchfinder_impl.h | 97 - vendor/core/vendor/libdeflate/lib/utils.c | 141 - .../vendor/libdeflate/lib/x86/adler32_impl.h | 136 - .../libdeflate/lib/x86/adler32_template.h | 518 - .../vendor/libdeflate/lib/x86/cpu_features.c | 213 - .../vendor/libdeflate/lib/x86/cpu_features.h | 170 - .../vendor/libdeflate/lib/x86/crc32_impl.h | 160 - .../lib/x86/crc32_pclmul_template.h | 424 - .../libdeflate/lib/x86/decompress_impl.h | 57 - .../libdeflate/lib/x86/matchfinder_impl.h | 122 - .../vendor/libdeflate/lib/zlib_compress.c | 82 - .../vendor/libdeflate/lib/zlib_constants.h | 21 - .../vendor/libdeflate/lib/zlib_decompress.c | 104 - vendor/core/vendor/libdeflate/libdeflate.h | 412 - .../unicodetools/data/ucd/dev/CaseFolding.txt | 1682 +++ vendor/core/vendor/whatwg-html-build/LICENSE | 356 + 268 files changed, 15208 insertions(+), 21745 deletions(-) create mode 100644 vendor/blaze/src/convert/CMakeLists.txt create mode 100644 vendor/blaze/src/convert/convert.cc rename vendor/blaze/src/{alterschema/upgrade => convert}/helpers.h (61%) create mode 100644 vendor/blaze/src/convert/include/sourcemeta/blaze/convert.h create mode 100644 vendor/blaze/src/convert/include/sourcemeta/blaze/convert_error.h create mode 100644 vendor/blaze/src/convert/rule.h create mode 100644 vendor/blaze/src/convert/rules/definitions_to_defs.h create mode 100644 vendor/blaze/src/convert/rules/draft_official_dialect_with_https.h create mode 100644 vendor/blaze/src/convert/rules/draft_official_dialect_without_empty_fragment.h create mode 100644 vendor/blaze/src/convert/rules/empty_object_as_true.h create mode 100644 vendor/blaze/src/convert/rules/enum_to_const.h rename vendor/blaze/src/{alterschema/upgrade => convert/rules}/prefix_promoted_2020_12_keywords.h (88%) rename vendor/blaze/src/{alterschema/upgrade => convert/rules}/prefix_promoted_draft_2019_09_keywords.h (89%) rename vendor/blaze/src/{alterschema/upgrade => convert/rules}/prefix_promoted_draft_4_keywords.h (88%) rename vendor/blaze/src/{alterschema/upgrade => convert/rules}/prefix_promoted_draft_6_keywords.h (88%) rename vendor/blaze/src/{alterschema/upgrade => convert/rules}/prefix_promoted_draft_7_keywords.h (88%) rename vendor/blaze/src/{alterschema/upgrade => convert/rules}/upgrade_2019_09_to_2020_12.h (97%) rename vendor/blaze/src/{alterschema/upgrade => convert/rules}/upgrade_dialect_override_cleanup.h (84%) rename vendor/blaze/src/{alterschema/upgrade => convert/rules}/upgrade_draft_3_to_draft_4.h (98%) rename vendor/blaze/src/{alterschema/upgrade => convert/rules}/upgrade_draft_4_to_draft_6.h (97%) rename vendor/blaze/src/{alterschema/upgrade => convert/rules}/upgrade_draft_6_to_draft_7.h (92%) rename vendor/blaze/src/{alterschema/upgrade => convert/rules}/upgrade_draft_7_to_draft_2019_09.h (95%) delete mode 100644 vendor/core/cmake/FindLibDeflate.cmake create mode 100644 vendor/core/src/core/crypto/crypto_rsa_other.h create mode 100644 vendor/core/src/core/crypto/crypto_system.h delete mode 100644 vendor/core/src/core/gzip/bit_reader.h delete mode 100644 vendor/core/src/core/gzip/huffman.h create mode 100644 vendor/core/src/core/gzip/inflate.h create mode 100644 vendor/core/src/core/html/codegen.cc create mode 100644 vendor/core/src/core/html/entity.cc create mode 100644 vendor/core/src/core/html/entity_hash.h create mode 100644 vendor/core/src/core/html/include/sourcemeta/core/html_entity.h delete mode 100644 vendor/core/vendor/libdeflate/COPYING delete mode 100644 vendor/core/vendor/libdeflate/common_defs.h delete mode 100644 vendor/core/vendor/libdeflate/lib/adler32.c delete mode 100644 vendor/core/vendor/libdeflate/lib/arm/adler32_impl.h delete mode 100644 vendor/core/vendor/libdeflate/lib/arm/cpu_features.c delete mode 100644 vendor/core/vendor/libdeflate/lib/arm/cpu_features.h delete mode 100644 vendor/core/vendor/libdeflate/lib/arm/crc32_impl.h delete mode 100644 vendor/core/vendor/libdeflate/lib/arm/crc32_pmull_helpers.h delete mode 100644 vendor/core/vendor/libdeflate/lib/arm/crc32_pmull_wide.h delete mode 100644 vendor/core/vendor/libdeflate/lib/arm/matchfinder_impl.h delete mode 100644 vendor/core/vendor/libdeflate/lib/bt_matchfinder.h delete mode 100644 vendor/core/vendor/libdeflate/lib/cpu_features_common.h delete mode 100644 vendor/core/vendor/libdeflate/lib/crc32.c delete mode 100644 vendor/core/vendor/libdeflate/lib/crc32_multipliers.h delete mode 100644 vendor/core/vendor/libdeflate/lib/crc32_tables.h delete mode 100644 vendor/core/vendor/libdeflate/lib/decompress_template.h delete mode 100644 vendor/core/vendor/libdeflate/lib/deflate_compress.c delete mode 100644 vendor/core/vendor/libdeflate/lib/deflate_compress.h delete mode 100644 vendor/core/vendor/libdeflate/lib/deflate_constants.h delete mode 100644 vendor/core/vendor/libdeflate/lib/deflate_decompress.c delete mode 100644 vendor/core/vendor/libdeflate/lib/gzip_compress.c delete mode 100644 vendor/core/vendor/libdeflate/lib/gzip_constants.h delete mode 100644 vendor/core/vendor/libdeflate/lib/gzip_decompress.c delete mode 100644 vendor/core/vendor/libdeflate/lib/hc_matchfinder.h delete mode 100644 vendor/core/vendor/libdeflate/lib/ht_matchfinder.h delete mode 100644 vendor/core/vendor/libdeflate/lib/lib_common.h delete mode 100644 vendor/core/vendor/libdeflate/lib/matchfinder_common.h delete mode 100644 vendor/core/vendor/libdeflate/lib/riscv/matchfinder_impl.h delete mode 100644 vendor/core/vendor/libdeflate/lib/utils.c delete mode 100644 vendor/core/vendor/libdeflate/lib/x86/adler32_impl.h delete mode 100644 vendor/core/vendor/libdeflate/lib/x86/adler32_template.h delete mode 100644 vendor/core/vendor/libdeflate/lib/x86/cpu_features.c delete mode 100644 vendor/core/vendor/libdeflate/lib/x86/cpu_features.h delete mode 100644 vendor/core/vendor/libdeflate/lib/x86/crc32_impl.h delete mode 100644 vendor/core/vendor/libdeflate/lib/x86/crc32_pclmul_template.h delete mode 100644 vendor/core/vendor/libdeflate/lib/x86/decompress_impl.h delete mode 100644 vendor/core/vendor/libdeflate/lib/x86/matchfinder_impl.h delete mode 100644 vendor/core/vendor/libdeflate/lib/zlib_compress.c delete mode 100644 vendor/core/vendor/libdeflate/lib/zlib_constants.h delete mode 100644 vendor/core/vendor/libdeflate/lib/zlib_decompress.c delete mode 100644 vendor/core/vendor/libdeflate/libdeflate.h create mode 100644 vendor/core/vendor/unicodetools/unicodetools/data/ucd/dev/CaseFolding.txt create mode 100644 vendor/core/vendor/whatwg-html-build/LICENSE diff --git a/DEPENDENCIES b/DEPENDENCIES index f16c548ef..3892a6405 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -1,4 +1,4 @@ vendorpull https://github.com/sourcemeta/vendorpull 1dcbac42809cf87cb5b045106b863e17ad84ba02 -core https://github.com/sourcemeta/core 4b948ea794732147e017281c523c1b6f934c8174 -blaze https://github.com/sourcemeta/blaze 32e5c5d68aaad434bedb0a2c59d86e0a08478057 +core https://github.com/sourcemeta/core 5dabb7f983b54e302b35ab74547b58c86576537b +blaze https://github.com/sourcemeta/blaze f25c2ab22cb13964a47be77acb8bbcc01ad1f2dd bootstrap https://github.com/twbs/bootstrap 1a6fdfae6be09b09eaced8f0e442ca6f7680a61e diff --git a/src/compiler/mapper/enum_8_bit.h b/src/compiler/mapper/enum_8_bit.h index e5cc8806f..f5c6032e3 100644 --- a/src/compiler/mapper/enum_8_bit.h +++ b/src/compiler/mapper/enum_8_bit.h @@ -5,15 +5,14 @@ class Enum8Bit final : public sourcemeta::blaze::SchemaTransformRule { using reframe_after_transform = std::true_type; Enum8Bit() : sourcemeta::blaze::SchemaTransformRule{"enum_8_bit", ""} {}; - [[nodiscard]] auto - condition(const sourcemeta::core::JSON &schema, - [[maybe_unused]] const sourcemeta::core::JSON &root, - const sourcemeta::core::SchemaVocabularies &vocabularies, - [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, - const sourcemeta::core::SchemaFrame::Location &location, - [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, - [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver, - [[maybe_unused]] const bool is_metaschema) const + [[nodiscard]] auto condition( + const sourcemeta::core::JSON &schema, + [[maybe_unused]] const sourcemeta::core::JSON &root, + const sourcemeta::core::SchemaVocabularies &vocabularies, + [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, + const sourcemeta::core::SchemaFrame::Location &location, + [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, + [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver) const -> sourcemeta::blaze::SchemaTransformRule::Result override { return location.dialect == "https://json-schema.org/draft/2020-12/schema" && vocabularies.contains(sourcemeta::core::SchemaVocabularies::Known:: diff --git a/src/compiler/mapper/enum_8_bit_top_level.h b/src/compiler/mapper/enum_8_bit_top_level.h index 0a1ab28c5..7810e8f4c 100644 --- a/src/compiler/mapper/enum_8_bit_top_level.h +++ b/src/compiler/mapper/enum_8_bit_top_level.h @@ -5,15 +5,14 @@ class Enum8BitTopLevel final : public sourcemeta::blaze::SchemaTransformRule { Enum8BitTopLevel() : sourcemeta::blaze::SchemaTransformRule{"enum_8_bit_top_level", ""} {}; - [[nodiscard]] auto - condition(const sourcemeta::core::JSON &schema, - [[maybe_unused]] const sourcemeta::core::JSON &root, - const sourcemeta::core::SchemaVocabularies &vocabularies, - [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, - const sourcemeta::core::SchemaFrame::Location &location, - [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, - [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver, - [[maybe_unused]] const bool is_metaschema) const + [[nodiscard]] auto condition( + const sourcemeta::core::JSON &schema, + [[maybe_unused]] const sourcemeta::core::JSON &root, + const sourcemeta::core::SchemaVocabularies &vocabularies, + [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, + const sourcemeta::core::SchemaFrame::Location &location, + [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, + [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver) const -> sourcemeta::blaze::SchemaTransformRule::Result override { return location.dialect == "https://json-schema.org/draft/2020-12/schema" && vocabularies.contains(sourcemeta::core::SchemaVocabularies::Known:: diff --git a/src/compiler/mapper/enum_arbitrary.h b/src/compiler/mapper/enum_arbitrary.h index b95e13dba..34b4b5a90 100644 --- a/src/compiler/mapper/enum_arbitrary.h +++ b/src/compiler/mapper/enum_arbitrary.h @@ -6,15 +6,14 @@ class EnumArbitrary final : public sourcemeta::blaze::SchemaTransformRule { EnumArbitrary() : sourcemeta::blaze::SchemaTransformRule{"enum_arbitrary", ""} {}; - [[nodiscard]] auto - condition(const sourcemeta::core::JSON &schema, - [[maybe_unused]] const sourcemeta::core::JSON &root, - const sourcemeta::core::SchemaVocabularies &vocabularies, - [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, - const sourcemeta::core::SchemaFrame::Location &location, - [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, - [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver, - [[maybe_unused]] const bool is_metaschema) const + [[nodiscard]] auto condition( + const sourcemeta::core::JSON &schema, + [[maybe_unused]] const sourcemeta::core::JSON &root, + const sourcemeta::core::SchemaVocabularies &vocabularies, + [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, + const sourcemeta::core::SchemaFrame::Location &location, + [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, + [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver) const -> sourcemeta::blaze::SchemaTransformRule::Result override { return location.dialect == "https://json-schema.org/draft/2020-12/schema" && vocabularies.contains(sourcemeta::core::SchemaVocabularies::Known:: diff --git a/src/compiler/mapper/enum_singleton.h b/src/compiler/mapper/enum_singleton.h index 2690b92e3..bc61d34d9 100644 --- a/src/compiler/mapper/enum_singleton.h +++ b/src/compiler/mapper/enum_singleton.h @@ -5,15 +5,14 @@ class EnumSingleton final : public sourcemeta::blaze::SchemaTransformRule { EnumSingleton() : sourcemeta::blaze::SchemaTransformRule{"enum_singleton", ""} {}; - [[nodiscard]] auto - condition(const sourcemeta::core::JSON &schema, - [[maybe_unused]] const sourcemeta::core::JSON &root, - const sourcemeta::core::SchemaVocabularies &vocabularies, - [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, - const sourcemeta::core::SchemaFrame::Location &location, - [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, - [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver, - [[maybe_unused]] const bool is_metaschema) const + [[nodiscard]] auto condition( + const sourcemeta::core::JSON &schema, + [[maybe_unused]] const sourcemeta::core::JSON &root, + const sourcemeta::core::SchemaVocabularies &vocabularies, + [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, + const sourcemeta::core::SchemaFrame::Location &location, + [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, + [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver) const -> sourcemeta::blaze::SchemaTransformRule::Result override { return location.dialect == "https://json-schema.org/draft/2020-12/schema" && vocabularies.contains(sourcemeta::core::SchemaVocabularies::Known:: diff --git a/src/compiler/mapper/integer_bounded_8_bit.h b/src/compiler/mapper/integer_bounded_8_bit.h index 0c5a524b1..c9661da6d 100644 --- a/src/compiler/mapper/integer_bounded_8_bit.h +++ b/src/compiler/mapper/integer_bounded_8_bit.h @@ -5,15 +5,14 @@ class IntegerBounded8Bit final : public sourcemeta::blaze::SchemaTransformRule { IntegerBounded8Bit() : sourcemeta::blaze::SchemaTransformRule{"integer_bounded_8_bit", ""} {}; - [[nodiscard]] auto - condition(const sourcemeta::core::JSON &schema, - [[maybe_unused]] const sourcemeta::core::JSON &root, - const sourcemeta::core::SchemaVocabularies &vocabularies, - [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, - const sourcemeta::core::SchemaFrame::Location &location, - [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, - [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver, - [[maybe_unused]] const bool is_metaschema) const + [[nodiscard]] auto condition( + const sourcemeta::core::JSON &schema, + [[maybe_unused]] const sourcemeta::core::JSON &root, + const sourcemeta::core::SchemaVocabularies &vocabularies, + [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, + const sourcemeta::core::SchemaFrame::Location &location, + [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, + [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver) const -> sourcemeta::blaze::SchemaTransformRule::Result override { return location.dialect == "https://json-schema.org/draft/2020-12/schema" && vocabularies.contains(sourcemeta::core::SchemaVocabularies::Known:: diff --git a/src/compiler/mapper/integer_bounded_greater_than_8_bit.h b/src/compiler/mapper/integer_bounded_greater_than_8_bit.h index 7983adecd..85f8fe652 100644 --- a/src/compiler/mapper/integer_bounded_greater_than_8_bit.h +++ b/src/compiler/mapper/integer_bounded_greater_than_8_bit.h @@ -7,15 +7,14 @@ class IntegerBoundedGreaterThan8Bit final : sourcemeta::blaze::SchemaTransformRule{ "integer_bounded_greater_than_8_bit", ""} {}; - [[nodiscard]] auto - condition(const sourcemeta::core::JSON &schema, - [[maybe_unused]] const sourcemeta::core::JSON &root, - const sourcemeta::core::SchemaVocabularies &vocabularies, - [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, - const sourcemeta::core::SchemaFrame::Location &location, - [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, - [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver, - [[maybe_unused]] const bool is_metaschema) const + [[nodiscard]] auto condition( + const sourcemeta::core::JSON &schema, + [[maybe_unused]] const sourcemeta::core::JSON &root, + const sourcemeta::core::SchemaVocabularies &vocabularies, + [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, + const sourcemeta::core::SchemaFrame::Location &location, + [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, + [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver) const -> sourcemeta::blaze::SchemaTransformRule::Result override { return location.dialect == "https://json-schema.org/draft/2020-12/schema" && vocabularies.contains(sourcemeta::core::SchemaVocabularies::Known:: diff --git a/src/compiler/mapper/integer_bounded_multiplier_8_bit.h b/src/compiler/mapper/integer_bounded_multiplier_8_bit.h index 2a5eb044b..29414f411 100644 --- a/src/compiler/mapper/integer_bounded_multiplier_8_bit.h +++ b/src/compiler/mapper/integer_bounded_multiplier_8_bit.h @@ -7,15 +7,14 @@ class IntegerBoundedMultiplier8Bit final : sourcemeta::blaze::SchemaTransformRule{ "integer_bounded_multiplier_8_bit", ""} {}; - [[nodiscard]] auto - condition(const sourcemeta::core::JSON &schema, - [[maybe_unused]] const sourcemeta::core::JSON &root, - const sourcemeta::core::SchemaVocabularies &vocabularies, - [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, - const sourcemeta::core::SchemaFrame::Location &location, - [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, - [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver, - [[maybe_unused]] const bool is_metaschema) const + [[nodiscard]] auto condition( + const sourcemeta::core::JSON &schema, + [[maybe_unused]] const sourcemeta::core::JSON &root, + const sourcemeta::core::SchemaVocabularies &vocabularies, + [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, + const sourcemeta::core::SchemaFrame::Location &location, + [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, + [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver) const -> sourcemeta::blaze::SchemaTransformRule::Result override { if (location.dialect != "https://json-schema.org/draft/2020-12/schema" || !vocabularies.contains(sourcemeta::core::SchemaVocabularies::Known:: diff --git a/src/compiler/mapper/integer_bounded_multiplier_greater_than_8_bit.h b/src/compiler/mapper/integer_bounded_multiplier_greater_than_8_bit.h index 8a304b994..267399c41 100644 --- a/src/compiler/mapper/integer_bounded_multiplier_greater_than_8_bit.h +++ b/src/compiler/mapper/integer_bounded_multiplier_greater_than_8_bit.h @@ -7,15 +7,14 @@ class IntegerBoundedMultiplierGreaterThan8Bit final : sourcemeta::blaze::SchemaTransformRule{ "integer_bounded_multiplier_greater_than_8_bit", ""} {}; - [[nodiscard]] auto - condition(const sourcemeta::core::JSON &schema, - [[maybe_unused]] const sourcemeta::core::JSON &root, - const sourcemeta::core::SchemaVocabularies &vocabularies, - [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, - const sourcemeta::core::SchemaFrame::Location &location, - [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, - [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver, - [[maybe_unused]] const bool is_metaschema) const + [[nodiscard]] auto condition( + const sourcemeta::core::JSON &schema, + [[maybe_unused]] const sourcemeta::core::JSON &root, + const sourcemeta::core::SchemaVocabularies &vocabularies, + [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, + const sourcemeta::core::SchemaFrame::Location &location, + [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, + [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver) const -> sourcemeta::blaze::SchemaTransformRule::Result override { if (location.dialect != "https://json-schema.org/draft/2020-12/schema" || !vocabularies.contains(sourcemeta::core::SchemaVocabularies::Known:: diff --git a/src/compiler/mapper/integer_lower_bound.h b/src/compiler/mapper/integer_lower_bound.h index 25071e395..d9a68ff30 100644 --- a/src/compiler/mapper/integer_lower_bound.h +++ b/src/compiler/mapper/integer_lower_bound.h @@ -5,15 +5,14 @@ class IntegerLowerBound final : public sourcemeta::blaze::SchemaTransformRule { IntegerLowerBound() : sourcemeta::blaze::SchemaTransformRule{"integer_lower_bound", ""} {}; - [[nodiscard]] auto - condition(const sourcemeta::core::JSON &schema, - [[maybe_unused]] const sourcemeta::core::JSON &root, - const sourcemeta::core::SchemaVocabularies &vocabularies, - [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, - const sourcemeta::core::SchemaFrame::Location &location, - [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, - [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver, - [[maybe_unused]] const bool is_metaschema) const + [[nodiscard]] auto condition( + const sourcemeta::core::JSON &schema, + [[maybe_unused]] const sourcemeta::core::JSON &root, + const sourcemeta::core::SchemaVocabularies &vocabularies, + [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, + const sourcemeta::core::SchemaFrame::Location &location, + [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, + [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver) const -> sourcemeta::blaze::SchemaTransformRule::Result override { return location.dialect == "https://json-schema.org/draft/2020-12/schema" && vocabularies.contains(sourcemeta::core::SchemaVocabularies::Known:: diff --git a/src/compiler/mapper/integer_lower_bound_multiplier.h b/src/compiler/mapper/integer_lower_bound_multiplier.h index b34f8c328..e0a1195c8 100644 --- a/src/compiler/mapper/integer_lower_bound_multiplier.h +++ b/src/compiler/mapper/integer_lower_bound_multiplier.h @@ -7,15 +7,14 @@ class IntegerLowerBoundMultiplier final : sourcemeta::blaze::SchemaTransformRule{"integer_lower_bound_multiplier", ""} {}; - [[nodiscard]] auto - condition(const sourcemeta::core::JSON &schema, - [[maybe_unused]] const sourcemeta::core::JSON &root, - const sourcemeta::core::SchemaVocabularies &vocabularies, - [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, - const sourcemeta::core::SchemaFrame::Location &location, - [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, - [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver, - [[maybe_unused]] const bool is_metaschema) const + [[nodiscard]] auto condition( + const sourcemeta::core::JSON &schema, + [[maybe_unused]] const sourcemeta::core::JSON &root, + const sourcemeta::core::SchemaVocabularies &vocabularies, + [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, + const sourcemeta::core::SchemaFrame::Location &location, + [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, + [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver) const -> sourcemeta::blaze::SchemaTransformRule::Result override { return location.dialect == "https://json-schema.org/draft/2020-12/schema" && vocabularies.contains(sourcemeta::core::SchemaVocabularies::Known:: diff --git a/src/compiler/mapper/integer_unbound.h b/src/compiler/mapper/integer_unbound.h index 32fca4952..506df0bd8 100644 --- a/src/compiler/mapper/integer_unbound.h +++ b/src/compiler/mapper/integer_unbound.h @@ -5,15 +5,14 @@ class IntegerUnbound final : public sourcemeta::blaze::SchemaTransformRule { IntegerUnbound() : sourcemeta::blaze::SchemaTransformRule{"integer_unbound", ""} {}; - [[nodiscard]] auto - condition(const sourcemeta::core::JSON &schema, - [[maybe_unused]] const sourcemeta::core::JSON &root, - const sourcemeta::core::SchemaVocabularies &vocabularies, - [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, - const sourcemeta::core::SchemaFrame::Location &location, - [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, - [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver, - [[maybe_unused]] const bool is_metaschema) const + [[nodiscard]] auto condition( + const sourcemeta::core::JSON &schema, + [[maybe_unused]] const sourcemeta::core::JSON &root, + const sourcemeta::core::SchemaVocabularies &vocabularies, + [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, + const sourcemeta::core::SchemaFrame::Location &location, + [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, + [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver) const -> sourcemeta::blaze::SchemaTransformRule::Result override { return location.dialect == "https://json-schema.org/draft/2020-12/schema" && vocabularies.contains(sourcemeta::core::SchemaVocabularies::Known:: diff --git a/src/compiler/mapper/integer_unbound_multiplier.h b/src/compiler/mapper/integer_unbound_multiplier.h index 4d060b24d..2e839fde9 100644 --- a/src/compiler/mapper/integer_unbound_multiplier.h +++ b/src/compiler/mapper/integer_unbound_multiplier.h @@ -7,15 +7,14 @@ class IntegerUnboundMultiplier final : sourcemeta::blaze::SchemaTransformRule{"integer_unbound_multiplier", ""} {}; - [[nodiscard]] auto - condition(const sourcemeta::core::JSON &schema, - [[maybe_unused]] const sourcemeta::core::JSON &root, - const sourcemeta::core::SchemaVocabularies &vocabularies, - [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, - const sourcemeta::core::SchemaFrame::Location &location, - [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, - [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver, - [[maybe_unused]] const bool is_metaschema) const + [[nodiscard]] auto condition( + const sourcemeta::core::JSON &schema, + [[maybe_unused]] const sourcemeta::core::JSON &root, + const sourcemeta::core::SchemaVocabularies &vocabularies, + [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, + const sourcemeta::core::SchemaFrame::Location &location, + [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, + [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver) const -> sourcemeta::blaze::SchemaTransformRule::Result override { return location.dialect == "https://json-schema.org/draft/2020-12/schema" && vocabularies.contains(sourcemeta::core::SchemaVocabularies::Known:: diff --git a/src/compiler/mapper/integer_upper_bound.h b/src/compiler/mapper/integer_upper_bound.h index 60969dc42..c6b4009d1 100644 --- a/src/compiler/mapper/integer_upper_bound.h +++ b/src/compiler/mapper/integer_upper_bound.h @@ -5,15 +5,14 @@ class IntegerUpperBound final : public sourcemeta::blaze::SchemaTransformRule { IntegerUpperBound() : sourcemeta::blaze::SchemaTransformRule{"integer_upper_bound", ""} {}; - [[nodiscard]] auto - condition(const sourcemeta::core::JSON &schema, - [[maybe_unused]] const sourcemeta::core::JSON &root, - const sourcemeta::core::SchemaVocabularies &vocabularies, - [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, - const sourcemeta::core::SchemaFrame::Location &location, - [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, - [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver, - [[maybe_unused]] const bool is_metaschema) const + [[nodiscard]] auto condition( + const sourcemeta::core::JSON &schema, + [[maybe_unused]] const sourcemeta::core::JSON &root, + const sourcemeta::core::SchemaVocabularies &vocabularies, + [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, + const sourcemeta::core::SchemaFrame::Location &location, + [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, + [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver) const -> sourcemeta::blaze::SchemaTransformRule::Result override { return location.dialect == "https://json-schema.org/draft/2020-12/schema" && vocabularies.contains(sourcemeta::core::SchemaVocabularies::Known:: diff --git a/src/compiler/mapper/integer_upper_bound_multiplier.h b/src/compiler/mapper/integer_upper_bound_multiplier.h index 7ece146f4..404e2b0ac 100644 --- a/src/compiler/mapper/integer_upper_bound_multiplier.h +++ b/src/compiler/mapper/integer_upper_bound_multiplier.h @@ -7,15 +7,14 @@ class IntegerUpperBoundMultiplier final : sourcemeta::blaze::SchemaTransformRule{"integer_upper_bound_multiplier", ""} {}; - [[nodiscard]] auto - condition(const sourcemeta::core::JSON &schema, - [[maybe_unused]] const sourcemeta::core::JSON &root, - const sourcemeta::core::SchemaVocabularies &vocabularies, - [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, - const sourcemeta::core::SchemaFrame::Location &location, - [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, - [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver, - [[maybe_unused]] const bool is_metaschema) const + [[nodiscard]] auto condition( + const sourcemeta::core::JSON &schema, + [[maybe_unused]] const sourcemeta::core::JSON &root, + const sourcemeta::core::SchemaVocabularies &vocabularies, + [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, + const sourcemeta::core::SchemaFrame::Location &location, + [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, + [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver) const -> sourcemeta::blaze::SchemaTransformRule::Result override { return location.dialect == "https://json-schema.org/draft/2020-12/schema" && vocabularies.contains(sourcemeta::core::SchemaVocabularies::Known:: diff --git a/src/compiler/mapper/number_arbitrary.h b/src/compiler/mapper/number_arbitrary.h index c2be25abb..a81379253 100644 --- a/src/compiler/mapper/number_arbitrary.h +++ b/src/compiler/mapper/number_arbitrary.h @@ -5,15 +5,14 @@ class NumberArbitrary final : public sourcemeta::blaze::SchemaTransformRule { NumberArbitrary() : sourcemeta::blaze::SchemaTransformRule{"number_arbitrary", ""} {}; - [[nodiscard]] auto - condition(const sourcemeta::core::JSON &schema, - [[maybe_unused]] const sourcemeta::core::JSON &root, - const sourcemeta::core::SchemaVocabularies &vocabularies, - [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, - const sourcemeta::core::SchemaFrame::Location &location, - [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, - [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver, - [[maybe_unused]] const bool is_metaschema) const + [[nodiscard]] auto condition( + const sourcemeta::core::JSON &schema, + [[maybe_unused]] const sourcemeta::core::JSON &root, + const sourcemeta::core::SchemaVocabularies &vocabularies, + [[maybe_unused]] const sourcemeta::core::SchemaFrame &frame, + const sourcemeta::core::SchemaFrame::Location &location, + [[maybe_unused]] const sourcemeta::core::SchemaWalker &walker, + [[maybe_unused]] const sourcemeta::core::SchemaResolver &resolver) const -> sourcemeta::blaze::SchemaTransformRule::Result override { return location.dialect == "https://json-schema.org/draft/2020-12/schema" && vocabularies.contains(sourcemeta::core::SchemaVocabularies::Known:: diff --git a/vendor/blaze/CMakeLists.txt b/vendor/blaze/CMakeLists.txt index 3e5a8b1a1..d0e6be383 100644 --- a/vendor/blaze/CMakeLists.txt +++ b/vendor/blaze/CMakeLists.txt @@ -13,6 +13,7 @@ option(BLAZE_CONFIGURATION "Build the Blaze configuration file library" ON) option(BLAZE_ALTERSCHEMA "Build the Blaze alterschema rule library" ON) option(BLAZE_CODEGEN "Build the Blaze codegen library" ON) option(BLAZE_CANONICALIZER "Build the Blaze canonicalizer library" ON) +option(BLAZE_CONVERT "Build the Blaze convert library" ON) option(BLAZE_EDITOR "Build the Blaze editor schema compatibility library" ON) option(BLAZE_BUNDLE "Build the Blaze bundle library" ON) option(BLAZE_FORMAT "Build the Blaze format library" ON) @@ -95,6 +96,10 @@ if(BLAZE_CANONICALIZER) add_subdirectory(src/canonicalizer) endif() +if(BLAZE_CONVERT) + add_subdirectory(src/convert) +endif() + if(BLAZE_EDITOR) add_subdirectory(src/editor) endif() @@ -185,6 +190,10 @@ if(BLAZE_TESTS) add_subdirectory(test/canonicalizer) endif() + if(BLAZE_CONVERT) + add_subdirectory(test/convert) + endif() + if(BLAZE_EDITOR) add_subdirectory(test/editor) endif() diff --git a/vendor/blaze/DEPENDENCIES b/vendor/blaze/DEPENDENCIES index 5bcbed292..5e63aabcf 100644 --- a/vendor/blaze/DEPENDENCIES +++ b/vendor/blaze/DEPENDENCIES @@ -1,3 +1,3 @@ vendorpull https://github.com/sourcemeta/vendorpull 1dcbac42809cf87cb5b045106b863e17ad84ba02 -core https://github.com/sourcemeta/core 4b948ea794732147e017281c523c1b6f934c8174 +core https://github.com/sourcemeta/core 5dabb7f983b54e302b35ab74547b58c86576537b jsonschema-test-suite https://github.com/json-schema-org/JSON-Schema-Test-Suite 6648e8194c69697b2e1a15fe76a06a480b183a51 diff --git a/vendor/blaze/config.cmake.in b/vendor/blaze/config.cmake.in index 98cfeb553..3b3d6aebb 100644 --- a/vendor/blaze/config.cmake.in +++ b/vendor/blaze/config.cmake.in @@ -12,6 +12,7 @@ if(NOT BLAZE_COMPONENTS) list(APPEND BLAZE_COMPONENTS alterschema) list(APPEND BLAZE_COMPONENTS codegen) list(APPEND BLAZE_COMPONENTS canonicalizer) + list(APPEND BLAZE_COMPONENTS convert) list(APPEND BLAZE_COMPONENTS editor) list(APPEND BLAZE_COMPONENTS bundle) list(APPEND BLAZE_COMPONENTS format) @@ -55,6 +56,8 @@ foreach(component ${BLAZE_COMPONENTS}) include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_codegen.cmake") elseif(component STREQUAL "canonicalizer") include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_canonicalizer.cmake") + elseif(component STREQUAL "convert") + include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_convert.cmake") elseif(component STREQUAL "editor") include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_editor.cmake") elseif(component STREQUAL "bundle") diff --git a/vendor/blaze/ports/javascript/index.mjs b/vendor/blaze/ports/javascript/index.mjs index bd76d551c..3a1d47e47 100644 --- a/vendor/blaze/ports/javascript/index.mjs +++ b/vendor/blaze/ports/javascript/index.mjs @@ -323,8 +323,9 @@ function compileInstructionToCode(instruction, captures, visited, budget) { case 68: { var r=R('t'); if(!r)return null; if(!children||children.length===0)return r+'return true;'; return r+TO+'return true;for(var k in t){'+lb(children,'t[k]')+'}return true;'; } case 69: return fb(69); case 70: return fb(70); case 71: return fb(71); case 72: return fb(72); case 73: return fb(73); case 74: return fb(74); case 75: return fb(75); case 76: return fb(76); - case 77: { var r=R('t'); return r?r+TO+'return true;for(var k in t){if(_es(t[k])!=='+value+')return false;}return true;':null; } - case 78: return fb(78); case 79: return fb(79); case 80: return fb(80); case 81: return fb(81); + case 77: return fb(77); + case 78: { var r=R('t'); return r?r+TO+'return true;for(var k in t){if(_es(t[k])!=='+value+')return false;}return true;':null; } + case 79: return fb(79); case 80: return fb(80); case 81: return fb(81); case 82: return fb(82); case 83: { var r=R('t'); if(!r)return null; if(!children||children.length===0)return r+'return true;'; return r+'if(!Array.isArray(t))return true;for(var j=0;j=t.length)return true;for(var j='+value+';j +#include #include #include #include @@ -15,10 +16,11 @@ #include // assert #include // std::floor, std::ceil, std::isfinite #include // std::size_t -#include // std::ref +#include // std::ref, std::reference_wrapper #include // std::back_inserter #include // std::numeric_limits #include // std::unique_ptr, std::make_unique +#include // std::optional #include // std::ostringstream #include // std::string_view #include // std::unordered_map @@ -135,6 +137,131 @@ auto walk_up_in_place_applicators(const JSON &root, const SchemaFrame &frame, is_in_place_applicator, matches); } +// Compile a subschema of a wrapper document, whose frame locates schemas +// within it rather than one at its top. Every schema that the frame locates is +// bundled into a copy of the document at once, so that the subschema may +// reference any of them as well as a remote schema +inline auto compile_embedded_subschema(const JSON &root, + const SchemaFrame &frame, + const SchemaFrame::Location &location, + const SchemaWalker &walker, + const SchemaResolver &resolver, + const Compiler &compiler) -> Template { + std::unordered_set roots; + std::string_view default_dialect{location.dialect}; + std::string_view default_base; + frame.for_each_subschema([&](const SchemaFrame::Location &entry) -> void { + if (entry.parent.has_value()) { + return; + } + + const auto [iterator, inserted] = roots.insert(to_pointer(entry.pointer)); + if (!inserted) { + return; + } + + // A schema that declares no dialect of its own reports the default one + // that the document was framed with + if (declared_dialect(get(root, *iterator)).empty()) { + default_dialect = entry.dialect; + } + + // A schema that declares no identifier of its own is addressed from the + // top of the document, by the base that the document was framed with + if (entry.relative_pointer == 0) { + default_base = entry.base; + } + }); + + SchemaFrame::Paths paths; + paths.reserve(roots.size()); + for (const auto &pointer : roots) { + paths.push_back(to_weak_pointer(pointer)); + } + + // A wrapper document may declare a member of this name of its own, so bundle + // into one that it does not declare, which then only holds what bundling + // embedded + JSON::String container_name{"x-sourcemeta-embedded"}; + while (root.defines(container_name)) { + container_name.push_back('_'); + } + + const Pointer container{container_name}; + auto document{root}; + bundle(document, walker, resolver, BundleMode::References, default_dialect, + "", container, paths, default_base); + + // Bundling embeds every remote schema into the container, outside of every + // schema that the frame located, so each of them is framed as a schema too + std::vector embedded; + const auto *remotes{document.try_at(container_name)}; + if (remotes != nullptr) { + embedded.reserve(remotes->size()); + for (const auto &entry : remotes->as_object()) { + embedded.push_back(container.concat(Pointer{entry.first})); + } + } + + for (const auto &pointer : embedded) { + paths.push_back(to_weak_pointer(pointer)); + } + + const SchemaFrame bundled_frame{SchemaFrame::Mode::References, + document, + walker, + resolver, + default_dialect, + "", + SchemaFrame::IdentifierMode::Additional, + paths, + default_base}; + const auto entrypoint{bundled_frame.uri(location.pointer)}; + assert(entrypoint.has_value()); + return compile(document, walker, resolver, compiler, bundled_frame, + entrypoint.value().get(), Mode::Exhaustive); +} + +// Compile the subschema at a location of a frame that does not stand alone, +// setting the base that evaluate paths are relative to, or report nothing if +// it does not compile +inline auto compile_non_standalone_subschema( + const JSON &root, const SchemaFrame &frame, + const SchemaFrame::Location &location, const SchemaWalker &walker, + const SchemaResolver &resolver, const Compiler &compiler, WeakPointer &base) + -> std::optional