Skip to content

Commit

Permalink
Move regex module to Noa (#1456)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti authored Jan 21, 2025
1 parent 110f9e6 commit 4ad4547
Show file tree
Hide file tree
Showing 128 changed files with 283 additions and 424 deletions.
1 change: 0 additions & 1 deletion .github/workflows/website-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
- run: >
cmake -S . -B ./build
-DCMAKE_BUILD_TYPE:STRING=Release
-DJSONTOOLKIT_REGEX:BOOL=OFF
-DJSONTOOLKIT_URI:BOOL=OFF
-DJSONTOOLKIT_JSON:BOOL=OFF
-DJSONTOOLKIT_JSONSCHEMA:BOOL=OFF
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/website-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
- run: >
cmake -S . -B ./build
-DCMAKE_BUILD_TYPE:STRING=Release
-DJSONTOOLKIT_REGEX:BOOL=OFF
-DJSONTOOLKIT_URI:BOOL=OFF
-DJSONTOOLKIT_JSON:BOOL=OFF
-DJSONTOOLKIT_JSONSCHEMA:BOOL=OFF
Expand Down
10 changes: 0 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
# Options
option(JSONTOOLKIT_URI "Build the JSON Toolkit URI library" ON)
option(JSONTOOLKIT_JSON "Build the JSON Toolkit JSON library" ON)
option(JSONTOOLKIT_REGEX "Build the JSON Toolkit Regex library" ON)
option(JSONTOOLKIT_JSONSCHEMA "Build the JSON Toolkit JSON Schema library" ON)
option(JSONTOOLKIT_JSONPOINTER "Build the JSON Toolkit JSON Pointer library" ON)
option(JSONTOOLKIT_JSONL "Build the JSON Toolkit JSONL library" ON)
Expand Down Expand Up @@ -49,11 +48,6 @@ if(JSONTOOLKIT_JSON)
add_subdirectory(src/json)
endif()

if(JSONTOOLKIT_JSON AND JSONTOOLKIT_REGEX)
find_package(BoostRegex REQUIRED)
add_subdirectory(src/regex)
endif()

if(JSONTOOLKIT_JSON AND JSONTOOLKIT_JSONPOINTER)
add_subdirectory(src/jsonpointer)
endif()
Expand Down Expand Up @@ -104,10 +98,6 @@ if(JSONTOOLKIT_TESTS)
add_subdirectory(test/json)
endif()

if(JSONTOOLKIT_JSON AND JSONTOOLKIT_REGEX)
add_subdirectory(test/regex)
endif()

if(JSONTOOLKIT_JSON AND JSONTOOLKIT_JSONPOINTER)
add_subdirectory(test/jsonpointer)
endif()
Expand Down
3 changes: 1 addition & 2 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
vendorpull https://github.com/sourcemeta/vendorpull 70342aaf458e6cb80baeb5b718901075fc42ede6
noa https://github.com/sourcemeta/noa 7f32f55327d9679bf45e5c2831e9501175ad441e
noa https://github.com/sourcemeta/noa 4fe72e795c684035712bc7ac38d96e84f62ff414
jsontestsuite https://github.com/nst/JSONTestSuite d64aefb55228d9584d3e5b2433f720ea8fd00c82
jsonschema-2020-12 https://github.com/json-schema-org/json-schema-spec 769daad75a9553562333a8937a187741cb708c72
jsonschema-2019-09 https://github.com/json-schema-org/json-schema-spec 41014ea723120ce70b314d72f863c6929d9f3cfd
Expand All @@ -13,5 +13,4 @@ jsonschema-draft0 https://github.com/json-schema-org/json-schema-spec 7ea575aef8
referencing-suite https://github.com/python-jsonschema/referencing-suite 61c4cc202b1e96ed5adcaf4842a595f68d659212
jsonschema-test-suite https://github.com/json-schema-org/JSON-Schema-Test-Suite c2badb1298a8698f86dadf1aea7b44b3a894e5ac
uriparser https://github.com/uriparser/uriparser bfe94f6e54d0abb5afa7bb0411940b7242cb835a
boost-regex https://github.com/boostorg/regex boost-1.86.0
yaml https://github.com/yaml/libyaml 0.2.5
9 changes: 0 additions & 9 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ if(JSONTOOLKIT_JSON)
list(APPEND BENCHMARK_SOURCES json.cc)
endif()

if(JSONTOOLKIT_REGEX)
list(APPEND BENCHMARK_SOURCES regex.cc)
endif()

if(JSONTOOLKIT_JSONPOINTER)
list(APPEND BENCHMARK_SOURCES jsonpointer.cc)
endif()
Expand All @@ -24,11 +20,6 @@ if(BENCHMARK_SOURCES)
PRIVATE sourcemeta::jsontoolkit::json)
endif()

if(JSONTOOLKIT_REGEX)
target_link_libraries(sourcemeta_jsontoolkit_benchmark
PRIVATE sourcemeta::jsontoolkit::regex)
endif()

if(JSONTOOLKIT_JSONPOINTER)
target_link_libraries(sourcemeta_jsontoolkit_benchmark
PRIVATE sourcemeta::jsontoolkit::jsonpointer)
Expand Down
5 changes: 0 additions & 5 deletions config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ list(APPEND JSONTOOLKIT_COMPONENTS ${jsontoolkit_FIND_COMPONENTS})
if(NOT JSONTOOLKIT_COMPONENTS)
list(APPEND JSONTOOLKIT_COMPONENTS uri)
list(APPEND JSONTOOLKIT_COMPONENTS json)
list(APPEND JSONTOOLKIT_COMPONENTS regex)
list(APPEND JSONTOOLKIT_COMPONENTS jsonl)
list(APPEND JSONTOOLKIT_COMPONENTS jsonpointer)
list(APPEND JSONTOOLKIT_COMPONENTS jsonschema)
Expand All @@ -22,10 +21,6 @@ foreach(component ${JSONTOOLKIT_COMPONENTS})
elseif(component STREQUAL "json")
find_dependency(noa)
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_jsontoolkit_json.cmake")
elseif(component STREQUAL "regex")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_jsontoolkit_json.cmake")
find_dependency(BoostRegex)
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_jsontoolkit_regex.cmake")
elseif(component STREQUAL "jsonl")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_jsontoolkit_json.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_jsontoolkit_jsonl.cmake")
Expand Down
1 change: 0 additions & 1 deletion doxygen/index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ CMake
|-----------------------------------|---------|---------|-------------------------------------------------------|
| `JSONTOOLKIT_URI` | Boolean | `ON` | Build the JSON Toolkit URI library |
| `JSONTOOLKIT_JSON` | Boolean | `ON` | Build the JSON Toolkit JSON library |
| `JSONTOOLKIT_REGEX` | Boolean | `ON` | Build the JSON Toolkit Regex library |
| `JSONTOOLKIT_JSONSCHEMA` | Boolean | `ON` | Build the JSON Toolkit JSON Schema library |
| `JSONTOOLKIT_JSONPOINTER` | Boolean | `ON` | Build the JSON Toolkit JSON Pointer library |
| `JSONTOOLKIT_JSONL` | Boolean | `ON` | Build the JSON Toolkit JSONL library |
Expand Down
12 changes: 0 additions & 12 deletions src/regex/CMakeLists.txt

This file was deleted.

111 changes: 0 additions & 111 deletions src/regex/include/sourcemeta/jsontoolkit/regex.h

This file was deleted.

98 changes: 0 additions & 98 deletions src/regex/regex.cc

This file was deleted.

1 change: 0 additions & 1 deletion test/packaging/find_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
find_package(JSONToolkit REQUIRED)
add_executable(jsontoolkit_hello hello.cc)
target_link_libraries(jsontoolkit_hello PRIVATE sourcemeta::jsontoolkit::regex)
target_link_libraries(jsontoolkit_hello PRIVATE sourcemeta::jsontoolkit::uri)
target_link_libraries(jsontoolkit_hello PRIVATE sourcemeta::jsontoolkit::json)
target_link_libraries(jsontoolkit_hello PRIVATE sourcemeta::jsontoolkit::jsonschema)
Expand Down
1 change: 0 additions & 1 deletion test/packaging/find_package/hello.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include <sourcemeta/jsontoolkit/jsonl.h>
#include <sourcemeta/jsontoolkit/jsonpointer.h>
#include <sourcemeta/jsontoolkit/jsonschema.h>
#include <sourcemeta/jsontoolkit/regex.h>
#include <sourcemeta/jsontoolkit/uri.h>
#include <sourcemeta/jsontoolkit/yaml.h>

Expand Down
10 changes: 0 additions & 10 deletions test/regex/CMakeLists.txt

This file was deleted.

Loading

4 comments on commit 4ad4547

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark (macos/llvm)

Benchmark suite Current: 4ad4547 Previous: 110f9e6 Ratio
JSON_Array_Of_Objects_Unique 384.0827465976933 ns/iter 327.98580605959023 ns/iter 1.17
JSON_Parse_1 30856.25011808221 ns/iter 21682.2454057761 ns/iter 1.42
JSON_Fast_Hash_Helm_Chart_Lock 62.069100387455556 ns/iter 45.893325842666954 ns/iter 1.35
JSON_Equality_Helm_Chart_Lock 159.15235411418917 ns/iter 131.2028991716755 ns/iter 1.21
Pointer_Object_Traverse 35.445330906443374 ns/iter 27.097324971076404 ns/iter 1.31
Pointer_Object_Try_Traverse 51.34121670000127 ns/iter 42.79891190250337 ns/iter 1.20
Pointer_Push_Back_Pointer_To_Weak_Pointer 205.1446249314535 ns/iter 175.35959408680648 ns/iter 1.17

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark (linux/llvm)

Benchmark suite Current: 4ad4547 Previous: 110f9e6 Ratio
JSON_Array_Of_Objects_Unique 449.2769641544686 ns/iter 412.4002721317359 ns/iter 1.09
JSON_Parse_1 30099.82374593366 ns/iter 30174.17230121693 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 55.44617410924271 ns/iter 58.76643081586518 ns/iter 0.94
JSON_Equality_Helm_Chart_Lock 140.54427288235675 ns/iter 150.9035636231175 ns/iter 0.93
Pointer_Object_Traverse 44.910295181602834 ns/iter 44.85904000193915 ns/iter 1.00
Pointer_Object_Try_Traverse 50.191290974064096 ns/iter 52.58506782467269 ns/iter 0.95
Pointer_Push_Back_Pointer_To_Weak_Pointer 352.40322224152357 ns/iter 354.79489382626633 ns/iter 0.99

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark (linux/gcc)

Benchmark suite Current: 4ad4547 Previous: 110f9e6 Ratio
JSON_Array_Of_Objects_Unique 305.1695158571812 ns/iter 311.0930196204818 ns/iter 0.98
JSON_Parse_1 32977.05620182131 ns/iter 33190.198225975444 ns/iter 0.99
JSON_Fast_Hash_Helm_Chart_Lock 27.632327066331985 ns/iter 27.119856742634006 ns/iter 1.02
JSON_Equality_Helm_Chart_Lock 144.26116654738055 ns/iter 156.25628001083012 ns/iter 0.92
Pointer_Object_Traverse 70.5737194622065 ns/iter 71.2516168153853 ns/iter 0.99
Pointer_Object_Try_Traverse 56.13043895470469 ns/iter 57.34896159182148 ns/iter 0.98
Pointer_Push_Back_Pointer_To_Weak_Pointer 213.03342890796375 ns/iter 213.8559966421231 ns/iter 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark (windows/msvc)

Benchmark suite Current: 4ad4547 Previous: 110f9e6 Ratio
JSON_Array_Of_Objects_Unique 447.81873835240197 ns/iter 419.86507230026155 ns/iter 1.07
JSON_Parse_1 85259.20717825416 ns/iter 81584.85491068948 ns/iter 1.05
JSON_Fast_Hash_Helm_Chart_Lock 69.06221428571209 ns/iter 55.97316964284005 ns/iter 1.23
JSON_Equality_Helm_Chart_Lock 209.57789466171585 ns/iter 219.22346874994503 ns/iter 0.96
Pointer_Object_Traverse 50.671490000001995 ns/iter 56.042241071431974 ns/iter 0.90
Pointer_Object_Try_Traverse 76.21212053571723 ns/iter 75.90283482143332 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 174.4886165952061 ns/iter 183.18509932042335 ns/iter 0.95

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.