Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ both schema-driven and schema-less support."
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")

# Options
option(JSONBINPACK_NUMERIC "Build the JSON BinPack numeric library" ON)
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JSONBINPACK_NUMERIC is removed here, but other entrypoints (e.g., the repo Makefile/CI configure steps) still pass -DJSONBINPACK_NUMERIC=ON, which will now produce “unused variable” CMake warnings (and can break stricter builds).

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

option(JSONBINPACK_RUNTIME "Build the JSON BinPack runtime" ON)
option(JSONBINPACK_COMPILER "Build the JSON BinPack compiler" ON)
option(JSONBINPACK_TESTS "Build the JSON BinPack tests" OFF)
Expand Down Expand Up @@ -37,11 +36,6 @@ if(JSONBINPACK_INSTALL)
COMPONENT sourcemeta_jsonbinpack_dev)
endif()

# Numeric
if(JSONBINPACK_NUMERIC)
add_subdirectory(src/numeric)
endif()

# Runtime
if(JSONBINPACK_RUNTIME)
add_subdirectory(src/runtime)
Expand Down Expand Up @@ -73,10 +67,6 @@ endif()
if(JSONBINPACK_TESTS)
enable_testing()

if(JSONBINPACK_NUMERIC)
add_subdirectory(test/numeric)
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With test/numeric no longer being added, JSON BinPack loses local unit coverage for numeric helpers heavily used by the runtime (e.g., zigzag/divide/uint_max); it’d be good to ensure equivalent coverage is still exercised via Core’s tests or runtime-level tests.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

endif()

if(JSONBINPACK_RUNTIME)
add_subdirectory(test/runtime)
endif()
Expand Down
2 changes: 1 addition & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
vendorpull https://github.com/sourcemeta/vendorpull 1dcbac42809cf87cb5b045106b863e17ad84ba02
core https://github.com/sourcemeta/core efaed8a73fa1ba38f0c2fdcbd11d0b3223c5a70e
core https://github.com/sourcemeta/core 3ea3a54756071232ca017b96bc15f17d8b5be370
blaze https://github.com/sourcemeta/blaze 0ff98cb5e537f571bdf04f0d59a031a0d8634e07
bootstrap https://github.com/twbs/bootstrap 1a6fdfae6be09b09eaced8f0e442ca6f7680a61e
9 changes: 2 additions & 7 deletions config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,18 @@
list(APPEND JSONBINPACK_COMPONENTS ${JSONBinPack_FIND_COMPONENTS})
list(APPEND JSONBINPACK_COMPONENTS ${jsonbinpack_FIND_COMPONENTS})
if(NOT JSONBINPACK_COMPONENTS)
list(APPEND JSONBINPACK_COMPONENTS numeric)
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping the numeric component from the default JSONBINPACK_COMPONENTS set (and no longer supporting it in the component loop) is a breaking change for downstream consumers that used find_package(JSONBinPack COMPONENTS numeric) / #include <sourcemeta/jsonbinpack/numeric.h>, so this likely needs to be explicitly communicated as part of the upgrade.

Severity: medium

Other Locations
  • src/numeric/CMakeLists.txt:1
  • src/numeric/include/sourcemeta/jsonbinpack/numeric.h:1

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

list(APPEND JSONBINPACK_COMPONENTS runtime)
list(APPEND JSONBINPACK_COMPONENTS compiler)
endif()

include(CMakeFindDependencyMacro)
find_dependency(Core COMPONENTS regex uri json jsonpointer jsonschema)
find_dependency(Core COMPONENTS numeric regex uri json jsonpointer jsonschema)
find_dependency(Blaze COMPONENTS alterschema)

foreach(component ${JSONBINPACK_COMPONENTS})
if(component STREQUAL "numeric")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_jsonbinpack_numeric.cmake")
elseif(component STREQUAL "runtime")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_jsonbinpack_numeric.cmake")
if(component STREQUAL "runtime")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_jsonbinpack_runtime.cmake")
elseif(component STREQUAL "compiler")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_jsonbinpack_numeric.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_jsonbinpack_compiler.cmake")
else()
message(FATAL_ERROR "Unknown JSON BinPack component: ${component}")
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if(JSONBINPACK_INSTALL)
endif()

target_link_libraries(sourcemeta_jsonbinpack_compiler PRIVATE
sourcemeta::jsonbinpack::numeric)
sourcemeta::core::numeric)
target_link_libraries(sourcemeta_jsonbinpack_compiler PUBLIC
sourcemeta::core::json)
target_link_libraries(sourcemeta_jsonbinpack_compiler PRIVATE
Expand Down
3 changes: 2 additions & 1 deletion src/compiler/compiler.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <sourcemeta/jsonbinpack/compiler.h>
#include <sourcemeta/jsonbinpack/numeric.h>

#include <sourcemeta/core/numeric.h>

#include <sourcemeta/blaze/alterschema.h>
#include <sourcemeta/core/jsonpointer.h>
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/mapper/enum_8_bit.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Enum8Bit final : public sourcemeta::blaze::SchemaTransformRule {
schema.is_object() && schema.defines("enum") &&
schema.at("enum").is_array() && !location.pointer.empty() &&
schema.at("enum").size() > 1 &&
is_byte(schema.at("enum").size() - 1);
sourcemeta::core::is_byte(schema.at("enum").size() - 1);
}

auto transform(sourcemeta::core::JSON &schema,
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/mapper/enum_8_bit_top_level.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Enum8BitTopLevel final : public sourcemeta::blaze::SchemaTransformRule {
schema.is_object() && schema.defines("enum") &&
schema.at("enum").is_array() && location.pointer.empty() &&
schema.at("enum").size() > 1 &&
is_byte(schema.at("enum").size() - 1);
sourcemeta::core::is_byte(schema.at("enum").size() - 1);
}

auto transform(sourcemeta::core::JSON &schema,
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/mapper/enum_arbitrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class EnumArbitrary final : public sourcemeta::blaze::SchemaTransformRule {
schema.is_object() && schema.defines("enum") &&
schema.at("enum").is_array() && !location.pointer.empty() &&
schema.at("enum").size() > 1 &&
!is_byte(schema.at("enum").size() - 1);
!sourcemeta::core::is_byte(schema.at("enum").size() - 1);
}

auto transform(sourcemeta::core::JSON &schema,
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/mapper/integer_bounded_8_bit.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class IntegerBounded8Bit final : public sourcemeta::blaze::SchemaTransformRule {
schema.is_object() && schema.defines("type") &&
schema.at("type").to_string() == "integer" &&
schema.defines("minimum") && schema.defines("maximum") &&
is_byte(schema.at("maximum").to_integer() -
schema.at("minimum").to_integer()) &&
sourcemeta::core::is_byte(schema.at("maximum").to_integer() -
schema.at("minimum").to_integer()) &&
!schema.defines("multipleOf");
}

Expand Down
4 changes: 2 additions & 2 deletions src/compiler/mapper/integer_bounded_greater_than_8_bit.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class IntegerBoundedGreaterThan8Bit final
schema.is_object() && schema.defines("type") &&
schema.at("type").to_string() == "integer" &&
schema.defines("minimum") && schema.defines("maximum") &&
!is_byte(schema.at("maximum").to_integer() -
schema.at("minimum").to_integer()) &&
!sourcemeta::core::is_byte(schema.at("maximum").to_integer() -
schema.at("minimum").to_integer()) &&
!schema.defines("multipleOf");
}

Expand Down
6 changes: 3 additions & 3 deletions src/compiler/mapper/integer_bounded_multiplier_8_bit.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ class IntegerBoundedMultiplier8Bit final
return false;
}

return is_byte(count_multiples(schema.at("minimum").to_integer(),
schema.at("maximum").to_integer(),
schema.at("multipleOf").to_integer()));
return sourcemeta::core::is_byte(sourcemeta::core::count_multiples(
schema.at("minimum").to_integer(), schema.at("maximum").to_integer(),
schema.at("multipleOf").to_integer()));
}

auto transform(sourcemeta::core::JSON &schema,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ class IntegerBoundedMultiplierGreaterThan8Bit final
return false;
}

return !is_byte(count_multiples(schema.at("minimum").to_integer(),
schema.at("maximum").to_integer(),
schema.at("multipleOf").to_integer()));
return !sourcemeta::core::is_byte(sourcemeta::core::count_multiples(
schema.at("minimum").to_integer(), schema.at("maximum").to_integer(),
schema.at("multipleOf").to_integer()));
}

auto transform(sourcemeta::core::JSON &schema,
Expand Down
7 changes: 0 additions & 7 deletions src/numeric/CMakeLists.txt

This file was deleted.

17 changes: 0 additions & 17 deletions src/numeric/include/sourcemeta/jsonbinpack/numeric.h

This file was deleted.

130 changes: 0 additions & 130 deletions src/numeric/include/sourcemeta/jsonbinpack/numeric_integral.h

This file was deleted.

54 changes: 0 additions & 54 deletions src/numeric/include/sourcemeta/jsonbinpack/numeric_real.h

This file was deleted.

31 changes: 0 additions & 31 deletions src/numeric/include/sourcemeta/jsonbinpack/numeric_zigzag.h

This file was deleted.

Loading
Loading