From 06fc873ec64b473d57a60db4d5efe92569985df5 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Thu, 24 Apr 2025 05:23:03 -0400 Subject: [PATCH 01/35] mv taskfiles/deps.yaml taskfiles/deps/main.yaml --- .github/workflows/clp-core-build-macos.yaml | 4 ++-- .github/workflows/clp-core-build.yaml | 6 +++--- taskfile.yaml | 2 +- taskfiles/{deps.yaml => deps/main.yaml} | 2 +- taskfiles/lint.yaml | 2 +- tools/yscope-dev-utils | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) rename taskfiles/{deps.yaml => deps/main.yaml} (99%) diff --git a/.github/workflows/clp-core-build-macos.yaml b/.github/workflows/clp-core-build-macos.yaml index d48d32c4f8..48139d5f5c 100644 --- a/.github/workflows/clp-core-build-macos.yaml +++ b/.github/workflows/clp-core-build-macos.yaml @@ -13,7 +13,7 @@ on: - "components/core/tools/scripts/deps-download/**" - "components/core/tools/scripts/utils/build-and-run-unit-tests.py" - "taskfile.yaml" - - "taskfiles/deps.yaml" + - "taskfiles/deps/main.yaml" - "tools/scripts/deps-download/**" push: paths: @@ -27,7 +27,7 @@ on: - "components/core/tools/scripts/deps-download/**" - "components/core/tools/scripts/utils/build-and-run-unit-tests.py" - "taskfile.yaml" - - "taskfiles/deps.yaml" + - "taskfiles/deps/main.yaml" - "tools/scripts/deps-download/**" schedule: # Run daily at 00:15 UTC (the 15 is to avoid periods of high load) diff --git a/.github/workflows/clp-core-build.yaml b/.github/workflows/clp-core-build.yaml index f2c6424174..6147b96c93 100644 --- a/.github/workflows/clp-core-build.yaml +++ b/.github/workflows/clp-core-build.yaml @@ -9,7 +9,7 @@ on: - ".gitmodules" - "components/core/**" - "taskfile.yaml" - - "taskfiles/deps.yaml" + - "taskfiles/deps/main.yaml" - "tools/scripts/deps-download/**" - "!components/core/tools/scripts/lib_install/macos/**" push: @@ -20,7 +20,7 @@ on: - ".gitmodules" - "components/core/**" - "taskfile.yaml" - - "taskfiles/deps.yaml" + - "taskfiles/deps/main.yaml" - "tools/scripts/deps-download/**" - "!components/core/tools/scripts/lib_install/macos/**" schedule: @@ -88,7 +88,7 @@ jobs: - "components/core/tests/**" - "components/core/tools/scripts/utils/build-and-run-unit-tests.py" - "taskfile.yaml" - - "taskfiles/deps.yaml" + - "taskfiles/deps/main.yaml" - "tools/scripts/deps-download/**" centos-stream-9-deps-image: diff --git a/taskfile.yaml b/taskfile.yaml index 5fdec767eb..b25588102c 100644 --- a/taskfile.yaml +++ b/taskfile.yaml @@ -1,7 +1,7 @@ version: "3" includes: - deps: "taskfiles/deps.yaml" + deps: "taskfiles/deps/main.yaml" docs: "taskfiles/docs.yaml" lint: "taskfiles/lint.yaml" utils: "tools/yscope-dev-utils/exports/taskfiles/utils/utils.yaml" diff --git a/taskfiles/deps.yaml b/taskfiles/deps/main.yaml similarity index 99% rename from taskfiles/deps.yaml rename to taskfiles/deps/main.yaml index 027ac8faa6..bbb14135e7 100644 --- a/taskfiles/deps.yaml +++ b/taskfiles/deps/main.yaml @@ -1,7 +1,7 @@ version: "3" includes: - yscope-dev-utils: "../tools/yscope-dev-utils/exports/taskfiles/utils/utils.yaml" + yscope-dev-utils: "../../tools/yscope-dev-utils/exports/taskfiles/utils/utils.yaml" vars: # Utility script path diff --git a/taskfiles/lint.yaml b/taskfiles/lint.yaml index 01c7252f56..fe1955fc21 100644 --- a/taskfiles/lint.yaml +++ b/taskfiles/lint.yaml @@ -118,7 +118,7 @@ tasks: components/package-template/src/etc \ docs \ taskfile.yaml \ - taskfiles/deps.yaml \ + taskfiles/deps/main.yaml \ taskfiles/lint.yaml check-cpp-format: diff --git a/tools/yscope-dev-utils b/tools/yscope-dev-utils index 30640b0af5..e300d1bab4 160000 --- a/tools/yscope-dev-utils +++ b/tools/yscope-dev-utils @@ -1 +1 @@ -Subproject commit 30640b0af5a8d344ae57afe02e8ae88a79233809 +Subproject commit e300d1bab4c2f33cbf9ddf9f0c08185faf035070 From b67730e53ac39e1e8c931481fbf367116f65b635 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Thu, 24 Apr 2025 11:17:59 -0400 Subject: [PATCH 02/35] Update to latest yscope-dev-utils. --- taskfile.yaml | 2 +- tools/scripts/deps-download/init.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/taskfile.yaml b/taskfile.yaml index b25588102c..605a698c59 100644 --- a/taskfile.yaml +++ b/taskfile.yaml @@ -27,7 +27,7 @@ vars: G_WEBUI_BUILD_DIR: "{{.G_BUILD_DIR}}/webui" # Taskfile paths - G_UTILS_TASKFILE: "{{.ROOT_DIR}}/tools/yscope-dev-utils/exports/taskfiles/utils.yaml" + G_UTILS_TASKFILE: "{{.ROOT_DIR}}/tools/yscope-dev-utils/exports/taskfiles/utils/utils.yaml" # Versions G_PACKAGE_VERSION: "0.2.0-dev" diff --git a/tools/scripts/deps-download/init.sh b/tools/scripts/deps-download/init.sh index 9395541250..486c5c4c11 100755 --- a/tools/scripts/deps-download/init.sh +++ b/tools/scripts/deps-download/init.sh @@ -11,7 +11,7 @@ project_root_dir="$script_dir/../../../" download_dep_script="$script_dir/download-dep.py" python3 "${download_dep_script}" \ - https://github.com/y-scope/yscope-dev-utils/archive/30640b0.zip \ - yscope-dev-utils-30640b0af5a8d344ae57afe02e8ae88a79233809 \ + https://github.com/y-scope/yscope-dev-utils/archive/e300d1b.zip \ + yscope-dev-utils-e300d1bab4c2f33cbf9ddf9f0c08185faf035070 \ "${project_root_dir}/tools/yscope-dev-utils" \ --extract From c6dac9aa158b469153d1cef9c79f7fbb95f4b81c Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Fri, 25 Apr 2025 05:09:00 -0400 Subject: [PATCH 03/35] Move dependency checksums into build/deps directory; Combine core's dependency checksum files from a directory. --- taskfiles/deps/main.yaml | 117 ++++++++++++++------------------------ taskfiles/deps/utils.yaml | 37 ++++++++++++ 2 files changed, 79 insertions(+), 75 deletions(-) create mode 100644 taskfiles/deps/utils.yaml diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index bbb14135e7..1131548d1e 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -1,30 +1,21 @@ version: "3" includes: + utils: "./utils.yaml" yscope-dev-utils: "../../tools/yscope-dev-utils/exports/taskfiles/utils/utils.yaml" vars: - # Utility script path - G_DEP_DOWNLOAD_SCRIPT: "{{.ROOT_DIR}}/tools/scripts/deps-download/download-dep.py" + # Directories + G_DEPS_DIR: "{{.G_BUILD_DIR}}/deps" + G_DEPS_CORE_DIR: "{{.G_DEPS_DIR}}/core" + G_DEPS_CORE_CHECKSUMS_DIR: "{{.G_DEPS_CORE_DIR}}/checksums" - # Target checksum files - G_DEPS_CORE_CHECKSUM_FILE: "{{.G_BUILD_DIR}}/deps#core.md5" - G_DEPS_LOG_VIEWER_CHECKSUM_FILE: "{{.G_BUILD_DIR}}/deps#log-viewer.md5" + # Checksum file paths + G_DEPS_CORE_CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/all.md5" + G_DEPS_LOG_VIEWER_CHECKSUM_FILE: "{{.G_DEPS_DIR}}/log-viewer.md5" - # Submodule checksum files - G_ABSEIL_CPP_CHECKSUM_FILE: "{{.G_BUILD_DIR}}/deps#abseil-cpp.md5" - G_ANTLR4_CHECKSUM_FILE: "{{.G_BUILD_DIR}}/deps#antlr4.md5" - G_CATCH2_CHECKSUM_FILE: "{{.G_BUILD_DIR}}/deps#Catch2.md5" - G_DATE_CHECKSUM_FILE: "{{.G_BUILD_DIR}}/deps#date.md5" - G_JSON_CHECKSUM_FILE: "{{.G_BUILD_DIR}}/deps#json.md5" - G_LOG_SURGEON_CHECKSUM_FILE: "{{.G_BUILD_DIR}}/deps#log-surgeon.md5" - G_OUTCOME_CHECKSUM_FILE: "{{.G_BUILD_DIR}}/deps#outcome.md5" - G_SIMDJSON_CHECKSUM_FILE: "{{.G_BUILD_DIR}}/deps#simdjson.md5" - G_SQLITE3_CHECKSUM_FILE: "{{.G_BUILD_DIR}}/deps#sqlite3.md5" - G_UTFCPP_CHECKSUM_FILE: "{{.G_BUILD_DIR}}/deps#utfcpp.md5" - G_YAML_CPP_CHECKSUM_FILE: "{{.G_BUILD_DIR}}/deps#yaml-cpp.md5" - G_YSCOPE_LOG_VIEWER_CHECKSUM_FILE: "{{.G_BUILD_DIR}}/deps#yscope-log-viewer.md5" - G_YSTDLIB_CPP_CHECKSUM_FILE: "{{.G_BUILD_DIR}}/deps#ystdlib-cpp.md5" + # Utility script path + G_DEP_DOWNLOAD_SCRIPT: "{{.ROOT_DIR}}/tools/scripts/deps-download/download-dep.py" tasks: default: @@ -33,40 +24,16 @@ tasks: - "log-viewer" core: - vars: - sources: - - "{{.G_ABSEIL_CPP_CHECKSUM_FILE}}" - - "{{.G_ANTLR4_CHECKSUM_FILE}}" - - "{{.G_CATCH2_CHECKSUM_FILE}}" - - "{{.G_DATE_CHECKSUM_FILE}}" - - "{{.G_JSON_CHECKSUM_FILE}}" - - "{{.G_LOG_SURGEON_CHECKSUM_FILE}}" - - "{{.G_OUTCOME_CHECKSUM_FILE}}" - - "{{.G_SIMDJSON_CHECKSUM_FILE}}" - - "{{.G_SQLITE3_CHECKSUM_FILE}}" - - "{{.G_UTFCPP_CHECKSUM_FILE}}" - - "{{.G_YAML_CPP_CHECKSUM_FILE}}" - - "{{.G_YSTDLIB_CPP_CHECKSUM_FILE}}" - generates: ["{{.G_DEPS_CORE_CHECKSUM_FILE}}"] - deps: ["all-internal-deps"] + deps: + - "utils:clean-old-core-checksum-files" + - "utils:init" cmds: - - >- - cat - "{{.G_ABSEIL_CPP_CHECKSUM_FILE}}" - "{{.G_ANTLR4_CHECKSUM_FILE}}" - "{{.G_CATCH2_CHECKSUM_FILE}}" - "{{.G_DATE_CHECKSUM_FILE}}" - "{{.G_JSON_CHECKSUM_FILE}}" - "{{.G_LOG_SURGEON_CHECKSUM_FILE}}" - "{{.G_OUTCOME_CHECKSUM_FILE}}" - "{{.G_SIMDJSON_CHECKSUM_FILE}}" - "{{.G_SQLITE3_CHECKSUM_FILE}}" - "{{.G_UTFCPP_CHECKSUM_FILE}}" - "{{.G_YAML_CPP_CHECKSUM_FILE}}" - "{{.G_YSTDLIB_CPP_CHECKSUM_FILE}}" - >> "{{.G_DEPS_CORE_CHECKSUM_FILE}}" + - task: "all-internal-deps" + - task: "utils:combine-core-checksum-files" log-viewer: + deps: + - "utils:init" cmds: - task: "yscope-dev-utils:remote:download-and-extract-tar" vars: @@ -109,7 +76,7 @@ tasks: abseil-cpp: internal: true vars: - CHECKSUM_FILE: "{{.G_ABSEIL_CPP_CHECKSUM_FILE}}" + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/abseil-cpp.md5" DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/abseil-cpp" sources: - "{{.G_DEP_DOWNLOAD_SCRIPT}}" @@ -118,7 +85,7 @@ tasks: - "{{.TASKFILE}}" generates: ["{{.CHECKSUM_FILE}}"] deps: - - ":init" + - "utils:init" - task: ":utils:checksum:validate" vars: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" @@ -139,7 +106,7 @@ tasks: antlr4: internal: true vars: - CHECKSUM_FILE: "{{.G_ANTLR4_CHECKSUM_FILE}}" + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/antlr4.md5" DEST_DIR: "{{.G_CORE_COMPONENT_DIR}}/third-party/antlr" DEST: "{{.DEST_DIR}}/antlr-4.13.1-complete.jar" sources: @@ -149,7 +116,7 @@ tasks: - "{{.TASKFILE}}" generates: ["{{.CHECKSUM_FILE}}"] deps: - - ":init" + - "utils:init" - task: ":utils:checksum:validate" vars: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" @@ -170,7 +137,7 @@ tasks: Catch2: internal: true vars: - CHECKSUM_FILE: "{{.G_CATCH2_CHECKSUM_FILE}}" + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/Catch2.md5" DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/Catch2" sources: - "{{.G_DEP_DOWNLOAD_SCRIPT}}" @@ -179,7 +146,7 @@ tasks: - "{{.TASKFILE}}" generates: ["{{.CHECKSUM_FILE}}"] deps: - - ":init" + - "utils:init" - task: ":utils:checksum:validate" vars: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" @@ -200,7 +167,7 @@ tasks: date: internal: true vars: - CHECKSUM_FILE: "{{.G_DATE_CHECKSUM_FILE}}" + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/date.md5" DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/date" sources: - "{{.G_DEP_DOWNLOAD_SCRIPT}}" @@ -209,7 +176,7 @@ tasks: - "{{.TASKFILE}}" generates: ["{{.CHECKSUM_FILE}}"] deps: - - ":init" + - "utils:init" - task: ":utils:checksum:validate" vars: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" @@ -230,7 +197,7 @@ tasks: json: internal: true vars: - CHECKSUM_FILE: "{{.G_JSON_CHECKSUM_FILE}}" + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/json.md5" DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/json" sources: - "{{.G_DEP_DOWNLOAD_SCRIPT}}" @@ -239,7 +206,7 @@ tasks: - "{{.TASKFILE}}" generates: ["{{.CHECKSUM_FILE}}"] deps: - - ":init" + - "utils:init" - task: ":utils:checksum:validate" vars: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" @@ -260,7 +227,7 @@ tasks: log-surgeon: internal: true vars: - CHECKSUM_FILE: "{{.G_LOG_SURGEON_CHECKSUM_FILE}}" + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/log-surgeon.md5" DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/log-surgeon" sources: - "{{.G_DEP_DOWNLOAD_SCRIPT}}" @@ -269,7 +236,7 @@ tasks: - "{{.TASKFILE}}" generates: ["{{.CHECKSUM_FILE}}"] deps: - - ":init" + - "utils:init" - task: ":utils:checksum:validate" vars: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" @@ -290,7 +257,7 @@ tasks: outcome: internal: true vars: - CHECKSUM_FILE: "{{.G_OUTCOME_CHECKSUM_FILE}}" + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/outcome.md5" DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/outcome" sources: - "{{.G_DEP_DOWNLOAD_SCRIPT}}" @@ -299,7 +266,7 @@ tasks: - "{{.TASKFILE}}" generates: ["{{.CHECKSUM_FILE}}"] deps: - - ":init" + - "utils:init" - task: ":utils:checksum:validate" vars: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" @@ -320,7 +287,7 @@ tasks: simdjson: internal: true vars: - CHECKSUM_FILE: "{{.G_SIMDJSON_CHECKSUM_FILE}}" + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/simdjson.md5" DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/simdjson" sources: - "{{.G_DEP_DOWNLOAD_SCRIPT}}" @@ -329,7 +296,7 @@ tasks: - "{{.TASKFILE}}" generates: ["{{.CHECKSUM_FILE}}"] deps: - - ":init" + - "utils:init" - task: ":utils:checksum:validate" vars: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" @@ -352,7 +319,7 @@ tasks: sqlite3: internal: true vars: - CHECKSUM_FILE: "{{.G_SQLITE3_CHECKSUM_FILE}}" + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/sqlite3.md5" DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/sqlite3" sources: - "{{.G_DEP_DOWNLOAD_SCRIPT}}" @@ -361,7 +328,7 @@ tasks: - "{{.TASKFILE}}" generates: ["{{.CHECKSUM_FILE}}"] deps: - - ":init" + - "utils:init" - task: ":utils:checksum:validate" vars: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" @@ -382,7 +349,7 @@ tasks: utfcpp: internal: true vars: - CHECKSUM_FILE: "{{.G_UTFCPP_CHECKSUM_FILE}}" + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/utfcpp.md5" DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/utfcpp" sources: - "{{.G_DEP_DOWNLOAD_SCRIPT}}" @@ -391,7 +358,7 @@ tasks: - "{{.TASKFILE}}" generates: ["{{.CHECKSUM_FILE}}"] deps: - - ":init" + - "utils:init" - task: ":utils:checksum:validate" vars: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" @@ -412,7 +379,7 @@ tasks: yaml-cpp: internal: true vars: - CHECKSUM_FILE: "{{.G_YAML_CPP_CHECKSUM_FILE}}" + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/yaml-cpp.md5" DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/yaml-cpp" sources: - "{{.G_DEP_DOWNLOAD_SCRIPT}}" @@ -421,7 +388,7 @@ tasks: - "{{.TASKFILE}}" generates: ["{{.CHECKSUM_FILE}}"] deps: - - ":init" + - "utils:init" - task: ":utils:checksum:validate" vars: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" @@ -442,7 +409,7 @@ tasks: ystdlib-cpp: internal: true vars: - CHECKSUM_FILE: "{{.G_YSTDLIB_CPP_CHECKSUM_FILE}}" + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/ystdlib-cpp.md5" DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/ystdlib-cpp" sources: - "{{.G_DEP_DOWNLOAD_SCRIPT}}" @@ -451,7 +418,7 @@ tasks: - "{{.TASKFILE}}" generates: ["{{.CHECKSUM_FILE}}"] deps: - - ":init" + - "utils:init" - task: ":utils:checksum:validate" vars: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" @@ -476,7 +443,7 @@ tasks: requires: vars: ["DEST", "FLAGS", "SRC_NAME", "SRC_URL"] deps: - - ":init" + - "utils:init" cmds: - >- python3 "{{.G_DEP_DOWNLOAD_SCRIPT}}" diff --git a/taskfiles/deps/utils.yaml b/taskfiles/deps/utils.yaml new file mode 100644 index 0000000000..3b0ccad14e --- /dev/null +++ b/taskfiles/deps/utils.yaml @@ -0,0 +1,37 @@ +version: "3" + +includes: + yscope-dev-utils: "../../tools/yscope-dev-utils/exports/taskfiles/utils/utils.yaml" + +tasks: + # Cleans up the core checksum files any time the taskfiles change. This is to ensure that if any + # of core's dependencies are removed from the taskfiles, then the checksum files for the removed + # dependencies will also be removed. Since we can't easily remove just the checksum files for the + # removed dependencies, we remove all of them. + clean-old-core-checksum-files: + internal: true + run: "once" + sources: + - "{{.ROOT_DIR}}/Taskfile.yaml" + - "{{.ROOT_DIR}}/taskfiles/**/*.yaml" + - "{{.ROOT_DIR}}/tools/yscope-dev-utils/exports/taskfiles/**/*.yaml" + cmd: "rm -f '{{.G_DEPS_CORE_CHECKSUMS_DIR}}'/*" + + combine-core-checksum-files: + internal: true + cmds: + - "rm -f '{{.G_DEPS_CORE_CHECKSUM_FILE}}'" + - |- + for file in "{{.G_DEPS_CORE_CHECKSUMS_DIR}}"/*.md5; do + if [[ "$file" != "{{.G_DEPS_CORE_CHECKSUM_FILE}}" ]]; then + cat "$file" >> "{{.G_DEPS_CORE_CHECKSUM_FILE}}" + fi + done + + init: + internal: true + run: "once" + cmds: + - "mkdir -p '{{.G_DEPS_DIR}}'" + - "mkdir -p '{{.G_DEPS_CORE_DIR}}'" + - "mkdir -p '{{.G_DEPS_CORE_CHECKSUMS_DIR}}'" From 2ce6e214627112c67cbe3901a1bcf220d003a202 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Fri, 25 Apr 2025 21:42:45 -0400 Subject: [PATCH 04/35] build(deps): Migrate ANTLR installation from Python script to task. --- components/core/.gitignore | 1 - components/core/CMakeLists.txt | 17 ++++++ components/core/cmake/Modules/FindANTLR.cmake | 1 - taskfiles/deps/main.yaml | 56 +++++++++++-------- taskfiles/deps/utils.yaml | 1 + 5 files changed, 52 insertions(+), 24 deletions(-) diff --git a/components/core/.gitignore b/components/core/.gitignore index 18670ec68b..a47a8cbd76 100644 --- a/components/core/.gitignore +++ b/components/core/.gitignore @@ -1,3 +1,2 @@ build/** submodules/sqlite3/* -third-party/** diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index 7c926cec27..d3fc6cdfb1 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -96,6 +96,23 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") endif () endif () +if(PROJECT_IS_TOP_LEVEL) + # Include dependency settings if the project isn't being included as a subproject. + # NOTE: We mark the file optional because if the user happens to have the dependencies + # installed, this file isn't necessary. + include("${CMAKE_SOURCE_DIR}/../../build/deps/core/cmake-settings/all.cmake" + OPTIONAL + RESULT_VARIABLE CLP_DEPS_SETTINGS_FILE_PATH + ) + + if(NOT CLP_DEPS_SETTINGS_FILE_PATH STREQUAL "NOTFOUND") + # Set CMP0144 since our minimum required CMake version is less than 3.27. + if(POLICY "CMP0144") + cmake_policy(SET "CMP0144" "NEW") + endif() + endif() +endif() + # Find and setup ANTLR Library # We build and link to the static library find_package(ANTLR REQUIRED) diff --git a/components/core/cmake/Modules/FindANTLR.cmake b/components/core/cmake/Modules/FindANTLR.cmake index d191ba071c..6e2f96d2b5 100644 --- a/components/core/cmake/Modules/FindANTLR.cmake +++ b/components/core/cmake/Modules/FindANTLR.cmake @@ -10,7 +10,6 @@ endif () set(ANTLR4_TAG 4.13.1) add_definitions(-DANTLR4CPP_STATIC) -set(ANTLR_EXECUTABLE ${PROJECT_SOURCE_DIR}/third-party/antlr/antlr-${ANTLR4_TAG}-complete.jar) include(ExternalAntlr4Cpp) find_package(Java 11 REQUIRED COMPONENTS Runtime) diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index 1131548d1e..83f1a35501 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -14,6 +14,10 @@ vars: G_DEPS_CORE_CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/all.md5" G_DEPS_LOG_VIEWER_CHECKSUM_FILE: "{{.G_DEPS_DIR}}/log-viewer.md5" + # NOTE: These must be kept in-sync with their usage in components/core/CMakeLists.txt + G_DEPS_CORE_CMAKE_SETTINGS_DIR: "{{.G_DEPS_CORE_DIR}}/cmake-settings" + G_DEPS_CORE_CMAKE_SETTINGS_FILE: "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/all.cmake" + # Utility script path G_DEP_DOWNLOAD_SCRIPT: "{{.ROOT_DIR}}/tools/scripts/deps-download/download-dep.py" @@ -28,7 +32,12 @@ tasks: - "utils:clean-old-core-checksum-files" - "utils:init" cmds: - - task: "all-internal-deps" + - "rm -rf '{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}'" + - "mkdir -p '{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}'" + - task: "yscope-dev-utils:cmake:install-deps-and-generate-settings" + vars: + CMAKE_SETTINGS_DIR: "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}" + DEP_TASK: "all-internal-deps" - task: "utils:combine-core-checksum-files" log-viewer: @@ -61,7 +70,7 @@ tasks: run: "once" cmds: - task: "abseil-cpp" - - task: "antlr4" + - task: "antlr" - task: "Catch2" - task: "date" - task: "json" @@ -103,36 +112,39 @@ tasks: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" INCLUDE_PATTERNS: ["{{.DEST}}"] - antlr4: + antlr: internal: true vars: - CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/antlr4.md5" - DEST_DIR: "{{.G_CORE_COMPONENT_DIR}}/third-party/antlr" - DEST: "{{.DEST_DIR}}/antlr-4.13.1-complete.jar" - sources: - - "{{.G_DEP_DOWNLOAD_SCRIPT}}" - - "{{.G_UTILS_TASKFILE}}" - - "{{.ROOT_DIR}}/taskfile.yaml" - - "{{.TASKFILE}}" - generates: ["{{.CHECKSUM_FILE}}"] + DEP_NAME: "antlr" + + # Paths + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/{{.DEP_NAME}}.md5" + OUTPUT_FILE: "{{.G_DEPS_CORE_DIR}}/antlr-4.13.1-complete.jar" + run: "once" deps: - - "utils:init" - - task: ":utils:checksum:validate" + - task: "yscope-dev-utils:checksum:validate" vars: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST_DIR}}"] + INCLUDE_PATTERNS: + - "{{.OUTPUT_FILE}}" + - task: "utils:init" cmds: - - task: "download-dependency" + - task: "yscope-dev-utils:remote:curl" vars: - DEST: "{{.DEST}}" - FLAGS: "--no-submodule" - SRC_NAME: "antlr-4.13.1-complete.jar" - SRC_URL: "https://www.antlr.org/download/antlr-4.13.1-complete.jar" + FILE_SHA256: "bc13a9c57a8dd7d5196888211e5ede657cb64a3ce968608697e4f668251a8487" + OUTPUT_FILE: "{{.OUTPUT_FILE}}" + URL: "https://www.antlr.org/download/antlr-4.13.1-complete.jar" + - >- + echo "set( + ANTLR_EXECUTABLE \"{{.OUTPUT_FILE}}\" + )" > "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.DEP_NAME}}.cmake" + # This command must be last - - task: ":utils:checksum:compute" + - task: "yscope-dev-utils:checksum:compute" vars: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST_DIR}}"] + INCLUDE_PATTERNS: + - "{{.OUTPUT_FILE}}" Catch2: internal: true diff --git a/taskfiles/deps/utils.yaml b/taskfiles/deps/utils.yaml index 3b0ccad14e..8948e8447a 100644 --- a/taskfiles/deps/utils.yaml +++ b/taskfiles/deps/utils.yaml @@ -35,3 +35,4 @@ tasks: - "mkdir -p '{{.G_DEPS_DIR}}'" - "mkdir -p '{{.G_DEPS_CORE_DIR}}'" - "mkdir -p '{{.G_DEPS_CORE_CHECKSUMS_DIR}}'" + - "mkdir -p '{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}'" From 049e973bc586f2694b3a8b4dc266af18c92b92c0 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Fri, 25 Apr 2025 22:31:38 -0400 Subject: [PATCH 05/35] build(deps): Migrate outcome installation from submodule to task. --- .gitmodules | 3 -- components/core/CMakeLists.txt | 1 + components/core/src/clp/clg/CMakeLists.txt | 6 ++- components/core/src/clp/clo/CMakeLists.txt | 6 ++- components/core/src/clp/clp/CMakeLists.txt | 6 ++- .../core/src/clp/ffi/KeyValuePairLogEvent.cpp | 2 +- .../core/src/clp/ffi/KeyValuePairLogEvent.hpp | 2 +- .../src/clp/ffi/ir_stream/Deserializer.hpp | 2 +- .../core/src/clp/ffi/ir_stream/Serializer.cpp | 2 +- .../core/src/clp/ffi/ir_stream/Serializer.hpp | 2 +- .../ir_unit_deserialization_methods.cpp | 2 +- .../ir_unit_deserialization_methods.hpp | 2 +- .../core/src/clp/ffi/ir_stream/utils.hpp | 2 +- .../core/src/clp/ir/LogEventDeserializer.cpp | 2 +- .../core/src/clp/ir/LogEventDeserializer.hpp | 2 +- .../core/src/clp/regex_utils/CMakeLists.txt | 1 + .../regex_utils/regex_translation_utils.cpp | 2 +- .../regex_utils/regex_translation_utils.hpp | 2 +- components/core/src/clp_s/CMakeLists.txt | 6 ++- components/core/src/glt/glt/CMakeLists.txt | 6 ++- .../core/src/glt/ir/LogEventDeserializer.cpp | 2 +- .../core/src/glt/ir/LogEventDeserializer.hpp | 2 +- components/core/submodules/outcome | 1 - .../install-prebuilt-packages.sh | 2 + .../ubuntu-focal/install-prebuilt-packages.sh | 1 + .../ubuntu-jammy/install-prebuilt-packages.sh | 3 +- taskfiles/deps/main.yaml | 40 ++++++++----------- 27 files changed, 63 insertions(+), 47 deletions(-) delete mode 160000 components/core/submodules/outcome diff --git a/.gitmodules b/.gitmodules index 5584aa7bb0..bfa943848b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -23,9 +23,6 @@ [submodule "tools/yscope-dev-utils"] path = tools/yscope-dev-utils url = https://github.com/y-scope/yscope-dev-utils.git -[submodule "components/core/submodules/outcome"] - path = components/core/submodules/outcome - url = https://github.com/ned14/outcome.git [submodule "components/core/submodules/utfcpp"] path = components/core/submodules/utfcpp url = https://github.com/nemtrif/utfcpp.git diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index d3fc6cdfb1..b6df54f8ed 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -656,6 +656,7 @@ add_executable(unitTest ) target_include_directories(unitTest PRIVATE + ${CLP_OUTCOME_SOURCE_DIRECTORY} ${CMAKE_SOURCE_DIR}/submodules ) target_link_libraries(unitTest diff --git a/components/core/src/clp/clg/CMakeLists.txt b/components/core/src/clp/clg/CMakeLists.txt index 0ec86fc7ed..37d5daf00e 100644 --- a/components/core/src/clp/clg/CMakeLists.txt +++ b/components/core/src/clp/clg/CMakeLists.txt @@ -127,7 +127,11 @@ set( add_executable(clg ${CLG_SOURCES}) target_compile_features(clg PRIVATE cxx_std_20) -target_include_directories(clg PRIVATE "${PROJECT_SOURCE_DIR}/submodules") +target_include_directories(clg + PRIVATE + "${CLP_OUTCOME_SOURCE_DIRECTORY}" + "${PROJECT_SOURCE_DIR}/submodules" +) target_link_libraries(clg PRIVATE Boost::filesystem Boost::program_options diff --git a/components/core/src/clp/clo/CMakeLists.txt b/components/core/src/clp/clo/CMakeLists.txt index f0cc80037a..2575b9aa2c 100644 --- a/components/core/src/clp/clo/CMakeLists.txt +++ b/components/core/src/clp/clo/CMakeLists.txt @@ -155,7 +155,11 @@ set( add_executable(clo ${CLO_SOURCES} ${REDUCER_SOURCES}) target_compile_features(clo PRIVATE cxx_std_20) -target_include_directories(clo PRIVATE "${PROJECT_SOURCE_DIR}/submodules") +target_include_directories(clo + PRIVATE + "${CLP_OUTCOME_SOURCE_DIRECTORY}" + "${PROJECT_SOURCE_DIR}/submodules" +) target_link_libraries(clo PRIVATE Boost::filesystem Boost::program_options diff --git a/components/core/src/clp/clp/CMakeLists.txt b/components/core/src/clp/clp/CMakeLists.txt index c0ecaf4636..ebcf56a3ed 100644 --- a/components/core/src/clp/clp/CMakeLists.txt +++ b/components/core/src/clp/clp/CMakeLists.txt @@ -168,7 +168,11 @@ set( add_executable(clp ${CLP_SOURCES}) target_compile_features(clp PRIVATE cxx_std_20) -target_include_directories(clp PRIVATE "${PROJECT_SOURCE_DIR}/submodules") +target_include_directories(clp + PRIVATE + "${CLP_OUTCOME_SOURCE_DIRECTORY}" + "${PROJECT_SOURCE_DIR}/submodules" +) target_link_libraries(clp PRIVATE Boost::filesystem Boost::program_options diff --git a/components/core/src/clp/ffi/KeyValuePairLogEvent.cpp b/components/core/src/clp/ffi/KeyValuePairLogEvent.cpp index 3918c01843..0c9f8f601a 100644 --- a/components/core/src/clp/ffi/KeyValuePairLogEvent.cpp +++ b/components/core/src/clp/ffi/KeyValuePairLogEvent.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include "../ir/EncodedTextAst.hpp" #include "../time_types.hpp" diff --git a/components/core/src/clp/ffi/KeyValuePairLogEvent.hpp b/components/core/src/clp/ffi/KeyValuePairLogEvent.hpp index 02aa058432..0b50a0e4af 100644 --- a/components/core/src/clp/ffi/KeyValuePairLogEvent.hpp +++ b/components/core/src/clp/ffi/KeyValuePairLogEvent.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include "../time_types.hpp" #include "SchemaTree.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/Deserializer.hpp b/components/core/src/clp/ffi/ir_stream/Deserializer.hpp index 53e762fdc6..65c3fd6448 100644 --- a/components/core/src/clp/ffi/ir_stream/Deserializer.hpp +++ b/components/core/src/clp/ffi/ir_stream/Deserializer.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include "../../ReaderInterface.hpp" #include "../../time_types.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/Serializer.cpp b/components/core/src/clp/ffi/ir_stream/Serializer.cpp index 34ea032887..99042230b4 100644 --- a/components/core/src/clp/ffi/ir_stream/Serializer.cpp +++ b/components/core/src/clp/ffi/ir_stream/Serializer.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include "../../ir/types.hpp" #include "../../time_types.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/Serializer.hpp b/components/core/src/clp/ffi/ir_stream/Serializer.hpp index 3f4bc2f1b4..157d69d107 100644 --- a/components/core/src/clp/ffi/ir_stream/Serializer.hpp +++ b/components/core/src/clp/ffi/ir_stream/Serializer.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include "../../time_types.hpp" #include "../SchemaTree.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.cpp b/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.cpp index df8e3aaf22..edf76216b6 100644 --- a/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.cpp +++ b/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include "../../ErrorCode.hpp" #include "../../ir/EncodedTextAst.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.hpp b/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.hpp index 3857caf9b9..3e0b398fdd 100644 --- a/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.hpp +++ b/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.hpp @@ -6,7 +6,7 @@ #include #include -#include +#include #include "../../ReaderInterface.hpp" #include "../../time_types.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/utils.hpp b/components/core/src/clp/ffi/ir_stream/utils.hpp index fc66a59296..ae96450987 100644 --- a/components/core/src/clp/ffi/ir_stream/utils.hpp +++ b/components/core/src/clp/ffi/ir_stream/utils.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include "../../ErrorCode.hpp" #include "../../ir/types.hpp" diff --git a/components/core/src/clp/ir/LogEventDeserializer.cpp b/components/core/src/clp/ir/LogEventDeserializer.cpp index a2bfc87db4..fdbc30fa4f 100644 --- a/components/core/src/clp/ir/LogEventDeserializer.cpp +++ b/components/core/src/clp/ir/LogEventDeserializer.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include "../ffi/ir_stream/decoding_methods.hpp" diff --git a/components/core/src/clp/ir/LogEventDeserializer.hpp b/components/core/src/clp/ir/LogEventDeserializer.hpp index 6a6bc049a9..cc611fad2a 100644 --- a/components/core/src/clp/ir/LogEventDeserializer.hpp +++ b/components/core/src/clp/ir/LogEventDeserializer.hpp @@ -3,7 +3,7 @@ #include -#include +#include #include "../ReaderInterface.hpp" #include "../time_types.hpp" diff --git a/components/core/src/clp/regex_utils/CMakeLists.txt b/components/core/src/clp/regex_utils/CMakeLists.txt index 813ac938c2..d905822944 100644 --- a/components/core/src/clp/regex_utils/CMakeLists.txt +++ b/components/core/src/clp/regex_utils/CMakeLists.txt @@ -15,6 +15,7 @@ add_library(clp::regex_utils ALIAS regex_utils) target_include_directories(regex_utils PUBLIC ../ + "${CLP_OUTCOME_SOURCE_DIRECTORY}" "${PROJECT_SOURCE_DIR}/submodules" ) target_link_libraries(regex_utils diff --git a/components/core/src/clp/regex_utils/regex_translation_utils.cpp b/components/core/src/clp/regex_utils/regex_translation_utils.cpp index 51897b8d91..6c2389eff1 100644 --- a/components/core/src/clp/regex_utils/regex_translation_utils.cpp +++ b/components/core/src/clp/regex_utils/regex_translation_utils.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include "constants.hpp" diff --git a/components/core/src/clp/regex_utils/regex_translation_utils.hpp b/components/core/src/clp/regex_utils/regex_translation_utils.hpp index 9b3a8f921a..50c159175c 100644 --- a/components/core/src/clp/regex_utils/regex_translation_utils.hpp +++ b/components/core/src/clp/regex_utils/regex_translation_utils.hpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include "regex_utils/RegexToWildcardTranslatorConfig.hpp" diff --git a/components/core/src/clp_s/CMakeLists.txt b/components/core/src/clp_s/CMakeLists.txt index 171a681dcd..263851bac2 100644 --- a/components/core/src/clp_s/CMakeLists.txt +++ b/components/core/src/clp_s/CMakeLists.txt @@ -242,7 +242,11 @@ target_link_libraries( ystdlib::containers ZStd::ZStd ) -target_include_directories(clp-s PRIVATE "${PROJECT_SOURCE_DIR}/submodules") +target_include_directories(clp-s + PRIVATE + "${CLP_OUTCOME_SOURCE_DIRECTORY}" + "${PROJECT_SOURCE_DIR}/submodules" +) set_target_properties( clp-s PROPERTIES diff --git a/components/core/src/glt/glt/CMakeLists.txt b/components/core/src/glt/glt/CMakeLists.txt index 0c7a6af4a7..a2f189e8a6 100644 --- a/components/core/src/glt/glt/CMakeLists.txt +++ b/components/core/src/glt/glt/CMakeLists.txt @@ -174,7 +174,11 @@ set( add_executable(glt ${GLT_SOURCES}) target_compile_features(glt PRIVATE cxx_std_20) -target_include_directories(glt PRIVATE "${PROJECT_SOURCE_DIR}/submodules") +target_include_directories(glt + PRIVATE + "${CLP_OUTCOME_SOURCE_DIRECTORY}" + "${PROJECT_SOURCE_DIR}/submodules" +) target_link_libraries(glt PRIVATE Boost::filesystem Boost::iostreams Boost::program_options diff --git a/components/core/src/glt/ir/LogEventDeserializer.cpp b/components/core/src/glt/ir/LogEventDeserializer.cpp index fa387421a5..ed30ed6676 100644 --- a/components/core/src/glt/ir/LogEventDeserializer.cpp +++ b/components/core/src/glt/ir/LogEventDeserializer.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include "../ffi/ir_stream/decoding_methods.hpp" diff --git a/components/core/src/glt/ir/LogEventDeserializer.hpp b/components/core/src/glt/ir/LogEventDeserializer.hpp index 092b0f58b2..1359cc484d 100644 --- a/components/core/src/glt/ir/LogEventDeserializer.hpp +++ b/components/core/src/glt/ir/LogEventDeserializer.hpp @@ -3,7 +3,7 @@ #include -#include +#include #include "../ReaderInterface.hpp" #include "../TimestampPattern.hpp" diff --git a/components/core/submodules/outcome b/components/core/submodules/outcome deleted file mode 160000 index 571f9c930e..0000000000 --- a/components/core/submodules/outcome +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 571f9c930e672950e99d5d30f743603aaaf8014c diff --git a/components/core/tools/scripts/lib_install/centos-stream-9/install-prebuilt-packages.sh b/components/core/tools/scripts/lib_install/centos-stream-9/install-prebuilt-packages.sh index 572b3ebfc6..808823f936 100755 --- a/components/core/tools/scripts/lib_install/centos-stream-9/install-prebuilt-packages.sh +++ b/components/core/tools/scripts/lib_install/centos-stream-9/install-prebuilt-packages.sh @@ -20,4 +20,6 @@ dnf install -y \ mariadb-connector-c-devel \ openssl-devel \ python3-pip \ + unzip \ + xz \ xz-devel diff --git a/components/core/tools/scripts/lib_install/ubuntu-focal/install-prebuilt-packages.sh b/components/core/tools/scripts/lib_install/ubuntu-focal/install-prebuilt-packages.sh index 3ea3b3ed5f..c432ae618b 100755 --- a/components/core/tools/scripts/lib_install/ubuntu-focal/install-prebuilt-packages.sh +++ b/components/core/tools/scripts/lib_install/ubuntu-focal/install-prebuilt-packages.sh @@ -28,6 +28,7 @@ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ pkg-config \ python3 \ python3-pip \ + unzip \ zlib1g-dev # Add alternatives for cpp-10, gcc-10, and g++-10 diff --git a/components/core/tools/scripts/lib_install/ubuntu-jammy/install-prebuilt-packages.sh b/components/core/tools/scripts/lib_install/ubuntu-jammy/install-prebuilt-packages.sh index 402ee7e3a1..a0a8fdc94c 100755 --- a/components/core/tools/scripts/lib_install/ubuntu-jammy/install-prebuilt-packages.sh +++ b/components/core/tools/scripts/lib_install/ubuntu-jammy/install-prebuilt-packages.sh @@ -25,4 +25,5 @@ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ python3 \ python3-pip \ python3-venv \ - software-properties-common + software-properties-common \ + unzip diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index 83f1a35501..835c3e4646 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -269,32 +269,26 @@ tasks: outcome: internal: true vars: - CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/outcome.md5" - DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/outcome" - sources: - - "{{.G_DEP_DOWNLOAD_SCRIPT}}" - - "{{.G_UTILS_TASKFILE}}" - - "{{.ROOT_DIR}}/taskfile.yaml" - - "{{.TASKFILE}}" - generates: ["{{.CHECKSUM_FILE}}"] + LIB_NAME: "outcome" + OUTPUT_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-src" + run: "once" deps: - - "utils:init" - - task: ":utils:checksum:validate" - vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + - task: "utils:init" cmds: - - task: "download-dependency" - vars: - DEST: "{{.DEST}}" - FLAGS: "--extract" - SRC_NAME: "outcome-2.2.9" - SRC_URL: "https://github.com/ned14/outcome/archive/refs/tags/v2.2.9.zip" - # This command must be last - - task: ":utils:checksum:compute" + - task: "yscope-dev-utils:remote:download-and-extract-tar" vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/{{.LIB_NAME}}.md5" + FILE_SHA256: "9588c01465b287296ab647b2caf50d5137e3eeaf662e3105b858d5c5c7579428" + INCLUDE_PATTERNS: + - "outcome/single-header" + NUM_COMPONENTS_TO_STRIP: 2 + OUTPUT_DIR: "{{.OUTPUT_DIR}}" + URL: "https://github.com/ned14/outcome/releases/download/v2.2.9\ + /outcome-v2-all-sources-571f9c930e672950e99d5d30f743603aaaf8014c.tar.xz" + - >- + echo "set( + CLP_OUTCOME_SOURCE_DIRECTORY \"{{.OUTPUT_DIR}}\" + )" > "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" simdjson: internal: true From 72d097fb7fb4efe971aa16edf1301c1a5be5b5d8 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Fri, 25 Apr 2025 23:39:47 -0400 Subject: [PATCH 06/35] build(deps): Migrate sqlite3 installation from Python script to task. --- components/core/.gitignore | 1 - components/core/CMakeLists.txt | 7 ++-- components/core/src/clp/SQLiteDB.hpp | 3 +- .../core/src/clp/SQLitePreparedStatement.hpp | 2 +- components/core/src/clp/clg/CMakeLists.txt | 7 ++-- components/core/src/clp/clo/CMakeLists.txt | 7 ++-- components/core/src/clp/clp/CMakeLists.txt | 5 ++- components/core/src/glt/SQLiteDB.hpp | 3 +- .../core/src/glt/SQLitePreparedStatement.hpp | 2 +- components/core/src/glt/glt/CMakeLists.txt | 5 ++- taskfiles/deps/main.yaml | 42 +++++++------------ 11 files changed, 40 insertions(+), 44 deletions(-) diff --git a/components/core/.gitignore b/components/core/.gitignore index a47a8cbd76..f65519e3cc 100644 --- a/components/core/.gitignore +++ b/components/core/.gitignore @@ -1,2 +1 @@ build/** -submodules/sqlite3/* diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index b6df54f8ed..869a678ecd 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -389,6 +389,9 @@ set(SOURCE_FILES_reducer_unitTest ) set(SOURCE_FILES_unitTest + "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.c" + "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.h" + "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3ext.h" src/clp/aws/AwsAuthenticationSigner.cpp src/clp/aws/AwsAuthenticationSigner.hpp src/clp/aws/constants.hpp @@ -611,9 +614,6 @@ set(SOURCE_FILES_unitTest src/clp/version.hpp src/clp/WriterInterface.cpp src/clp/WriterInterface.hpp - submodules/sqlite3/sqlite3.c - submodules/sqlite3/sqlite3.h - submodules/sqlite3/sqlite3ext.h tests/LogSuppressor.hpp tests/TestOutputCleaner.hpp tests/test-BoundedReader.cpp @@ -657,6 +657,7 @@ add_executable(unitTest target_include_directories(unitTest PRIVATE ${CLP_OUTCOME_SOURCE_DIRECTORY} + ${CLP_SQLITE3_SOURCE_DIRECTORY} ${CMAKE_SOURCE_DIR}/submodules ) target_link_libraries(unitTest diff --git a/components/core/src/clp/SQLiteDB.hpp b/components/core/src/clp/SQLiteDB.hpp index 74c5ace17a..92c0b819e2 100644 --- a/components/core/src/clp/SQLiteDB.hpp +++ b/components/core/src/clp/SQLiteDB.hpp @@ -3,8 +3,9 @@ #include +#include + #include "ErrorCode.hpp" -#include "sqlite3/sqlite3.h" #include "SQLitePreparedStatement.hpp" #include "TraceableException.hpp" diff --git a/components/core/src/clp/SQLitePreparedStatement.hpp b/components/core/src/clp/SQLitePreparedStatement.hpp index 72f5921be6..f9cb5a5fa6 100644 --- a/components/core/src/clp/SQLitePreparedStatement.hpp +++ b/components/core/src/clp/SQLitePreparedStatement.hpp @@ -3,7 +3,7 @@ #include -#include +#include #include "ErrorCode.hpp" #include "TraceableException.hpp" diff --git a/components/core/src/clp/clg/CMakeLists.txt b/components/core/src/clp/clg/CMakeLists.txt index 37d5daf00e..b906c388fa 100644 --- a/components/core/src/clp/clg/CMakeLists.txt +++ b/components/core/src/clp/clg/CMakeLists.txt @@ -117,9 +117,9 @@ set( ../version.hpp ../WriterInterface.cpp ../WriterInterface.hpp - "${PROJECT_SOURCE_DIR}/submodules/sqlite3/sqlite3.c" - "${PROJECT_SOURCE_DIR}/submodules/sqlite3/sqlite3.h" - "${PROJECT_SOURCE_DIR}/submodules/sqlite3/sqlite3ext.h" + "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.c" + "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.h" + "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3ext.h" clg.cpp CommandLineArguments.cpp CommandLineArguments.hpp @@ -130,6 +130,7 @@ target_compile_features(clg PRIVATE cxx_std_20) target_include_directories(clg PRIVATE "${CLP_OUTCOME_SOURCE_DIRECTORY}" + "${CLP_SQLITE3_SOURCE_DIRECTORY}" "${PROJECT_SOURCE_DIR}/submodules" ) target_link_libraries(clg diff --git a/components/core/src/clp/clo/CMakeLists.txt b/components/core/src/clp/clo/CMakeLists.txt index 2575b9aa2c..e671a97cdc 100644 --- a/components/core/src/clp/clo/CMakeLists.txt +++ b/components/core/src/clp/clo/CMakeLists.txt @@ -119,9 +119,9 @@ set( ../version.hpp ../WriterInterface.cpp ../WriterInterface.hpp - "${PROJECT_SOURCE_DIR}/submodules/sqlite3/sqlite3.c" - "${PROJECT_SOURCE_DIR}/submodules/sqlite3/sqlite3.h" - "${PROJECT_SOURCE_DIR}/submodules/sqlite3/sqlite3ext.h" + "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.c" + "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.h" + "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3ext.h" clo.cpp CommandLineArguments.cpp CommandLineArguments.hpp @@ -158,6 +158,7 @@ target_compile_features(clo PRIVATE cxx_std_20) target_include_directories(clo PRIVATE "${CLP_OUTCOME_SOURCE_DIRECTORY}" + "${CLP_SQLITE3_SOURCE_DIRECTORY}" "${PROJECT_SOURCE_DIR}/submodules" ) target_link_libraries(clo diff --git a/components/core/src/clp/clp/CMakeLists.txt b/components/core/src/clp/clp/CMakeLists.txt index ebcf56a3ed..c22c1c6360 100644 --- a/components/core/src/clp/clp/CMakeLists.txt +++ b/components/core/src/clp/clp/CMakeLists.txt @@ -147,8 +147,8 @@ set( ../version.hpp ../WriterInterface.cpp ../WriterInterface.hpp - "${PROJECT_SOURCE_DIR}/submodules/sqlite3/sqlite3.c" - "${PROJECT_SOURCE_DIR}/submodules/sqlite3/sqlite3.h" + "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.c" + "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.h" clp.cpp CommandLineArguments.cpp CommandLineArguments.hpp @@ -171,6 +171,7 @@ target_compile_features(clp PRIVATE cxx_std_20) target_include_directories(clp PRIVATE "${CLP_OUTCOME_SOURCE_DIRECTORY}" + "${CLP_SQLITE3_SOURCE_DIRECTORY}" "${PROJECT_SOURCE_DIR}/submodules" ) target_link_libraries(clp diff --git a/components/core/src/glt/SQLiteDB.hpp b/components/core/src/glt/SQLiteDB.hpp index ea868d42b5..d4cb4442f3 100644 --- a/components/core/src/glt/SQLiteDB.hpp +++ b/components/core/src/glt/SQLiteDB.hpp @@ -3,8 +3,9 @@ #include +#include + #include "ErrorCode.hpp" -#include "sqlite3/sqlite3.h" #include "SQLitePreparedStatement.hpp" #include "TraceableException.hpp" diff --git a/components/core/src/glt/SQLitePreparedStatement.hpp b/components/core/src/glt/SQLitePreparedStatement.hpp index 8520ae37ba..6c752e4cc6 100644 --- a/components/core/src/glt/SQLitePreparedStatement.hpp +++ b/components/core/src/glt/SQLitePreparedStatement.hpp @@ -3,7 +3,7 @@ #include -#include +#include #include "ErrorCode.hpp" #include "TraceableException.hpp" diff --git a/components/core/src/glt/glt/CMakeLists.txt b/components/core/src/glt/glt/CMakeLists.txt index a2f189e8a6..bce1831bcb 100644 --- a/components/core/src/glt/glt/CMakeLists.txt +++ b/components/core/src/glt/glt/CMakeLists.txt @@ -151,8 +151,8 @@ set( ../version.hpp ../WriterInterface.cpp ../WriterInterface.hpp - "${PROJECT_SOURCE_DIR}/submodules/sqlite3/sqlite3.c" - "${PROJECT_SOURCE_DIR}/submodules/sqlite3/sqlite3.h" + "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.c" + "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.h" glt.cpp CommandLineArguments.cpp CommandLineArguments.hpp @@ -177,6 +177,7 @@ target_compile_features(glt PRIVATE cxx_std_20) target_include_directories(glt PRIVATE "${CLP_OUTCOME_SOURCE_DIRECTORY}" + "${CLP_SQLITE3_SOURCE_DIRECTORY}" "${PROJECT_SOURCE_DIR}/submodules" ) target_link_libraries(glt diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index 835c3e4646..8e8477028a 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -320,37 +320,27 @@ tasks: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" INCLUDE_PATTERNS: ["{{.DEST}}"] - # We don't use a git submodule for sqlite3 since that would require building the sqlite - # amalgamation sqlite3: internal: true vars: - CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/sqlite3.md5" - DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/sqlite3" - sources: - - "{{.G_DEP_DOWNLOAD_SCRIPT}}" - - "{{.G_UTILS_TASKFILE}}" - - "{{.ROOT_DIR}}/taskfile.yaml" - - "{{.TASKFILE}}" - generates: ["{{.CHECKSUM_FILE}}"] - deps: - - "utils:init" - - task: ":utils:checksum:validate" - vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + LIB_NAME: "sqlite3" + + # Paths + EXTRACTION_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-src" + ZIP_FILENAME_STEM: "sqlite-amalgamation-3360000" + SRC_DIR: "{{.EXTRACTION_DIR}}/{{.ZIP_FILENAME_STEM}}" + run: "once" cmds: - - task: "download-dependency" - vars: - DEST: "{{.DEST}}" - FLAGS: "--extract --no-submodule" - SRC_NAME: "sqlite-amalgamation-3360000" - SRC_URL: "https://www.sqlite.org/2021/sqlite-amalgamation-3360000.zip" - # This command must be last - - task: ":utils:checksum:compute" + - task: "yscope-dev-utils:remote:download-and-extract-zip" vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/{{.LIB_NAME}}.md5" + FILE_SHA256: "999826fe4c871f18919fdb8ed7ec9dd8217180854dd1fe21eea96aed36186729" + OUTPUT_DIR: "{{.EXTRACTION_DIR}}" + URL: "https://www.sqlite.org/2021/{{.ZIP_FILENAME_STEM}}.zip" + - >- + echo "set( + CLP_SQLITE3_SOURCE_DIRECTORY \"{{.SRC_DIR}}\" + )" > "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" utfcpp: internal: true From 44cd30f801a3c6bbf03718439f0d179c6bc462a0 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 06:58:38 -0400 Subject: [PATCH 07/35] build(deps): Migrate utfcpp installation from submodule to task. --- .gitmodules | 3 --- components/core/submodules/utfcpp | 1 - taskfiles/deps/main.yaml | 36 +++++++++++-------------------- 3 files changed, 12 insertions(+), 28 deletions(-) delete mode 160000 components/core/submodules/utfcpp diff --git a/.gitmodules b/.gitmodules index bfa943848b..2061a67a31 100644 --- a/.gitmodules +++ b/.gitmodules @@ -23,9 +23,6 @@ [submodule "tools/yscope-dev-utils"] path = tools/yscope-dev-utils url = https://github.com/y-scope/yscope-dev-utils.git -[submodule "components/core/submodules/utfcpp"] - path = components/core/submodules/utfcpp - url = https://github.com/nemtrif/utfcpp.git [submodule "components/core/submodules/ystdlib-cpp"] path = components/core/submodules/ystdlib-cpp url = https://github.com/y-scope/ystdlib-cpp.git diff --git a/components/core/submodules/utfcpp b/components/core/submodules/utfcpp deleted file mode 160000 index b26a5f718f..0000000000 --- a/components/core/submodules/utfcpp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b26a5f718f4f370af1852a0d5c6ae8fa031ba7d0 diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index 8e8477028a..b1f4d69c70 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -345,32 +345,20 @@ tasks: utfcpp: internal: true vars: - CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/utfcpp.md5" - DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/utfcpp" - sources: - - "{{.G_DEP_DOWNLOAD_SCRIPT}}" - - "{{.G_UTILS_TASKFILE}}" - - "{{.ROOT_DIR}}/taskfile.yaml" - - "{{.TASKFILE}}" - generates: ["{{.CHECKSUM_FILE}}"] - deps: - - "utils:init" - - task: ":utils:checksum:validate" - vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + LIB_NAME: "utfcpp" + UTFCPP_OUTPUT_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-src" + run: "once" cmds: - - task: "download-dependency" - vars: - DEST: "{{.DEST}}" - FLAGS: "--extract" - SRC_NAME: "utfcpp-4.0.6" - SRC_URL: "https://github.com/nemtrif/utfcpp/archive/refs/tags/v4.0.6.zip" - # This command must be last - - task: ":utils:checksum:compute" + - task: "yscope-dev-utils:remote:download-and-extract-tar" vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/{{.LIB_NAME}}.md5" + FILE_SHA256: "6920a6a5d6a04b9a89b2a89af7132f8acefd46e0c2a7b190350539e9213816c0" + OUTPUT_DIR: "{{.UTFCPP_OUTPUT_DIR}}" + URL: "https://github.com/nemtrif/utfcpp/archive/refs/tags/v4.0.6.tar.gz" + - >- + echo "set( + CLP_UTFCPP_SOURCE_DIRECTORY \"{{.UTFCPP_OUTPUT_DIR}}\" + )" > "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" yaml-cpp: internal: true From e36c5166358608d2b1c666481ea4236ce4dffca9 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 10:34:38 -0400 Subject: [PATCH 08/35] build(deps): Migrate absl installation from submodule to task; Rename abseil-cpp task to absl. --- .gitmodules | 3 -- components/core/CMakeLists.txt | 9 +++--- components/core/submodules/abseil-cpp | 1 - taskfiles/deps/main.yaml | 40 ++++++++------------------- taskfiles/deps/utils.yaml | 39 ++++++++++++++++++++++++++ 5 files changed, 56 insertions(+), 36 deletions(-) delete mode 160000 components/core/submodules/abseil-cpp diff --git a/.gitmodules b/.gitmodules index 2061a67a31..d73adbced5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -17,9 +17,6 @@ [submodule "components/core/submodules/simdjson"] path = components/core/submodules/simdjson url = https://github.com/simdjson/simdjson.git -[submodule "components/core/submodules/abseil-cpp"] - path = components/core/submodules/abseil-cpp - url = https://github.com/abseil/abseil-cpp.git [submodule "tools/yscope-dev-utils"] path = tools/yscope-dev-utils url = https://github.com/y-scope/yscope-dev-utils.git diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index 869a678ecd..1b89546507 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -113,6 +113,11 @@ if(PROJECT_IS_TOP_LEVEL) endif() endif() +find_package(absl REQUIRED) +if (absl_FOUND) + message(STATUS "Found absl ${absl_VERSION}") +endif() + # Find and setup ANTLR Library # We build and link to the static library find_package(ANTLR REQUIRED) @@ -229,10 +234,6 @@ else() message(FATAL_ERROR "Could not find msgpack-cxx") endif() -# Add abseil-cpp -set(ABSL_PROPAGATE_CXX_STD ON) -add_subdirectory(submodules/abseil-cpp EXCLUDE_FROM_ALL) - # Add simdjson add_subdirectory(submodules/simdjson EXCLUDE_FROM_ALL) diff --git a/components/core/submodules/abseil-cpp b/components/core/submodules/abseil-cpp deleted file mode 160000 index fb3621f4f8..0000000000 --- a/components/core/submodules/abseil-cpp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fb3621f4f897824c0dbe0615fa94543df6192f30 diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index b1f4d69c70..47e9849b16 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -69,7 +69,7 @@ tasks: internal: true run: "once" cmds: - - task: "abseil-cpp" + - task: "absl" - task: "antlr" - task: "Catch2" - task: "date" @@ -82,35 +82,19 @@ tasks: - task: "yaml-cpp" - task: "ystdlib-cpp" - abseil-cpp: + absl: internal: true - vars: - CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/abseil-cpp.md5" - DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/abseil-cpp" - sources: - - "{{.G_DEP_DOWNLOAD_SCRIPT}}" - - "{{.G_UTILS_TASKFILE}}" - - "{{.ROOT_DIR}}/taskfile.yaml" - - "{{.TASKFILE}}" - generates: ["{{.CHECKSUM_FILE}}"] - deps: - - "utils:init" - - task: ":utils:checksum:validate" - vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + run: "once" cmds: - - task: "download-dependency" - vars: - DEST: "{{.DEST}}" - FLAGS: "--extract" - SRC_NAME: "abseil-cpp-20230802.1" - SRC_URL: "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.1.zip" - # This command must be last - - task: ":utils:checksum:compute" - vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + - task: "utils:install-remote-cmake-lib" + vars: + CMAKE_GEN_ARGS: + - "-DCMAKE_BUILD_TYPE=Release" + - "-DCMAKE_CXX_STANDARD=20" + - "-DCMAKE_INSTALL_MESSAGE=LAZY" + LIB_NAME: "absl" + TARBALL_SHA256: "987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed" + TARBALL_URL: "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.1.tar.gz" antlr: internal: true diff --git a/taskfiles/deps/utils.yaml b/taskfiles/deps/utils.yaml index 8948e8447a..6815042ba0 100644 --- a/taskfiles/deps/utils.yaml +++ b/taskfiles/deps/utils.yaml @@ -36,3 +36,42 @@ tasks: - "mkdir -p '{{.G_DEPS_CORE_DIR}}'" - "mkdir -p '{{.G_DEPS_CORE_CHECKSUMS_DIR}}'" - "mkdir -p '{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}'" + + # Installs a CMake-based library from a remote tarball, generates a settings file for it, and + # computes a checksum for the installation directory. + # + # @param {string} LIB_NAME + # @param {string} TARBALL_SHA256 + # @param {string} TARBALL_URL + # @param {string[]} [CMAKE_GEN_ARGS] Any additional arguments to pass to the CMake generate + # command. + install-remote-cmake-lib: + internal: true + vars: + CMAKE_GEN_ARGS: + ref: "default (list) .CMAKE_GEN_ARGS" + INSTALL_PREFIX: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-install" + INSTALL_DIR_CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/{{.LIB_NAME}}.md5" + deps: + - task: "yscope-dev-utils:checksum:validate" + vars: + CHECKSUM_FILE: "{{.INSTALL_DIR_CHECKSUM_FILE}}" + INCLUDE_PATTERNS: + - "{{.INSTALL_PREFIX}}" + cmds: + - task: "yscope-dev-utils:cmake:install-remote-tar" + vars: + CMAKE_SETTINGS_DIR: "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}" + FILE_SHA256: "{{.TARBALL_SHA256}}" + GEN_ARGS: + ref: ".CMAKE_GEN_ARGS" + NAME: "{{.LIB_NAME}}" + URL: "{{.TARBALL_URL}}" + WORK_DIR: "{{.G_DEPS_CORE_DIR}}" + + # This command must be last + - task: "yscope-dev-utils:checksum:compute" + vars: + CHECKSUM_FILE: "{{.INSTALL_DIR_CHECKSUM_FILE}}" + INCLUDE_PATTERNS: + - "{{.INSTALL_PREFIX}}" From a44760aba696c29dfe73e3504133f7d19dcc39e3 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 11:44:06 -0400 Subject: [PATCH 09/35] build(deps): Migrate Catch2 installation from submodule to task; Rename Catch2 task to catch. --- .gitmodules | 3 -- components/core/CMakeLists.txt | 6 +++ components/core/submodules/Catch2 | 1 - components/core/tests/test-BoundedReader.cpp | 2 +- .../core/tests/test-BufferedFileReader.cpp | 2 +- .../tests/test-EncodedVariableInterpreter.cpp | 2 +- .../core/tests/test-FileDescriptorReader.cpp | 2 +- components/core/tests/test-Grep.cpp | 2 +- .../core/tests/test-MemoryMappedFile.cpp | 2 +- components/core/tests/test-NetworkReader.cpp | 2 +- .../core/tests/test-ParserWithUserSchema.cpp | 2 +- components/core/tests/test-SQLiteDB.cpp | 2 +- components/core/tests/test-Segment.cpp | 2 +- components/core/tests/test-Stopwatch.cpp | 2 +- .../core/tests/test-StreamingCompression.cpp | 2 +- .../core/tests/test-TimestampPattern.cpp | 2 +- components/core/tests/test-Utils.cpp | 2 +- .../core/tests/test-clp_s-end_to_end.cpp | 2 +- components/core/tests/test-clp_s-search.cpp | 2 +- .../core/tests/test-encoding_methods.cpp | 2 +- .../tests/test-ffi_IrUnitHandlerInterface.cpp | 2 +- .../tests/test-ffi_KeyValuePairLogEvent.cpp | 2 +- components/core/tests/test-ffi_SchemaTree.cpp | 2 +- components/core/tests/test-hash_utils.cpp | 2 +- .../core/tests/test-ir_encoding_methods.cpp | 2 +- components/core/tests/test-ir_parsing.cpp | 2 +- components/core/tests/test-ir_serializer.cpp | 2 +- components/core/tests/test-kql.cpp | 2 +- components/core/tests/test-main.cpp | 2 +- components/core/tests/test-math_utils.cpp | 2 +- components/core/tests/test-query_methods.cpp | 2 +- components/core/tests/test-regex_utils.cpp | 2 +- components/core/tests/test-sql.cpp | 2 +- components/core/tests/test-string_utils.cpp | 2 +- components/core/tests/test-utf8_utils.cpp | 2 +- taskfiles/deps/main.yaml | 38 ++++++------------- 36 files changed, 49 insertions(+), 63 deletions(-) delete mode 160000 components/core/submodules/Catch2 diff --git a/.gitmodules b/.gitmodules index d73adbced5..67f711632e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "components/core/submodules/Catch2"] - path = components/core/submodules/Catch2 - url = https://github.com/catchorg/Catch2.git [submodule "components/core/submodules/date"] path = components/core/submodules/date url = https://github.com/HowardHinnant/date.git diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index 1b89546507..73547d48e8 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -138,6 +138,11 @@ else() message(FATAL_ERROR "Could not find ${CLP_LIBS_STRING} libraries for Boost") endif() +find_package(Catch2 REQUIRED) +if (Catch2_FOUND) + message(STATUS "Found Catch2 ${Catch2_VERSION}") +endif() + # Find and setup fmt # NOTE: # - We only try to link to the static library @@ -665,6 +670,7 @@ target_link_libraries(unitTest PRIVATE absl::flat_hash_map Boost::filesystem Boost::iostreams Boost::program_options Boost::regex Boost::url + Catch2::Catch2 ${CURL_LIBRARIES} clp_s::search::ast clp_s::TimestampPattern diff --git a/components/core/submodules/Catch2 b/components/core/submodules/Catch2 deleted file mode 160000 index c4e3767e26..0000000000 --- a/components/core/submodules/Catch2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c4e3767e265808590986d5db6ca1b5532a7f3d13 diff --git a/components/core/tests/test-BoundedReader.cpp b/components/core/tests/test-BoundedReader.cpp index 9d1a9d2c0b..fae9980106 100644 --- a/components/core/tests/test-BoundedReader.cpp +++ b/components/core/tests/test-BoundedReader.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include "../src/clp/BoundedReader.hpp" #include "../src/clp/ErrorCode.hpp" diff --git a/components/core/tests/test-BufferedFileReader.cpp b/components/core/tests/test-BufferedFileReader.cpp index f182a777c8..5e960cb724 100644 --- a/components/core/tests/test-BufferedFileReader.cpp +++ b/components/core/tests/test-BufferedFileReader.cpp @@ -1,7 +1,7 @@ #include #include -#include +#include #include "../src/clp/BufferedFileReader.hpp" #include "../src/clp/FileReader.hpp" diff --git a/components/core/tests/test-EncodedVariableInterpreter.cpp b/components/core/tests/test-EncodedVariableInterpreter.cpp index 856b367851..4dcc6d399e 100644 --- a/components/core/tests/test-EncodedVariableInterpreter.cpp +++ b/components/core/tests/test-EncodedVariableInterpreter.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include "../src/clp/EncodedVariableInterpreter.hpp" #include "../src/clp/ir/types.hpp" diff --git a/components/core/tests/test-FileDescriptorReader.cpp b/components/core/tests/test-FileDescriptorReader.cpp index afc7a43565..b5cee12ed1 100644 --- a/components/core/tests/test-FileDescriptorReader.cpp +++ b/components/core/tests/test-FileDescriptorReader.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include "../src/clp/FileDescriptorReader.hpp" diff --git a/components/core/tests/test-Grep.cpp b/components/core/tests/test-Grep.cpp index 6d0603787f..f0bdb21dc3 100644 --- a/components/core/tests/test-Grep.cpp +++ b/components/core/tests/test-Grep.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include diff --git a/components/core/tests/test-MemoryMappedFile.cpp b/components/core/tests/test-MemoryMappedFile.cpp index 9cb855e0bd..9bd8fb6f31 100644 --- a/components/core/tests/test-MemoryMappedFile.cpp +++ b/components/core/tests/test-MemoryMappedFile.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include "../src/clp/FileReader.hpp" #include "../src/clp/ReaderInterface.hpp" diff --git a/components/core/tests/test-NetworkReader.cpp b/components/core/tests/test-NetworkReader.cpp index 0c729bf916..95b8e0951c 100644 --- a/components/core/tests/test-NetworkReader.cpp +++ b/components/core/tests/test-NetworkReader.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/components/core/tests/test-ParserWithUserSchema.cpp b/components/core/tests/test-ParserWithUserSchema.cpp index 3689c69e85..4216fd7702 100644 --- a/components/core/tests/test-ParserWithUserSchema.cpp +++ b/components/core/tests/test-ParserWithUserSchema.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include "../src/clp/clp/run.hpp" diff --git a/components/core/tests/test-SQLiteDB.cpp b/components/core/tests/test-SQLiteDB.cpp index d63098bad6..cf2b338ded 100644 --- a/components/core/tests/test-SQLiteDB.cpp +++ b/components/core/tests/test-SQLiteDB.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include diff --git a/components/core/tests/test-Segment.cpp b/components/core/tests/test-Segment.cpp index c10844a9e8..ffed996ade 100644 --- a/components/core/tests/test-Segment.cpp +++ b/components/core/tests/test-Segment.cpp @@ -1,7 +1,7 @@ #include #include -#include +#include #include "../src/clp/streaming_archive/reader/Segment.hpp" #include "../src/clp/streaming_archive/writer/Segment.hpp" diff --git a/components/core/tests/test-Stopwatch.cpp b/components/core/tests/test-Stopwatch.cpp index 5f7d6bd710..e5f6f5a0af 100644 --- a/components/core/tests/test-Stopwatch.cpp +++ b/components/core/tests/test-Stopwatch.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include "../src/clp/Stopwatch.hpp" diff --git a/components/core/tests/test-StreamingCompression.cpp b/components/core/tests/test-StreamingCompression.cpp index 9b7125f961..ee67b843cd 100644 --- a/components/core/tests/test-StreamingCompression.cpp +++ b/components/core/tests/test-StreamingCompression.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/components/core/tests/test-TimestampPattern.cpp b/components/core/tests/test-TimestampPattern.cpp index 0b9dc54cf4..85acfbe467 100644 --- a/components/core/tests/test-TimestampPattern.cpp +++ b/components/core/tests/test-TimestampPattern.cpp @@ -1,4 +1,4 @@ -#include +#include #include "../src/clp/TimestampPattern.hpp" diff --git a/components/core/tests/test-Utils.cpp b/components/core/tests/test-Utils.cpp index 21d070f926..ce64d6ca01 100644 --- a/components/core/tests/test-Utils.cpp +++ b/components/core/tests/test-Utils.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include "../src/clp/Utils.hpp" diff --git a/components/core/tests/test-clp_s-end_to_end.cpp b/components/core/tests/test-clp_s-end_to_end.cpp index b2f9b1b747..bd533159d2 100644 --- a/components/core/tests/test-clp_s-end_to_end.cpp +++ b/components/core/tests/test-clp_s-end_to_end.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include "../src/clp_s/InputConfig.hpp" diff --git a/components/core/tests/test-clp_s-search.cpp b/components/core/tests/test-clp_s-search.cpp index 0c6cc26dd2..0f6628344d 100644 --- a/components/core/tests/test-clp_s-search.cpp +++ b/components/core/tests/test-clp_s-search.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include diff --git a/components/core/tests/test-encoding_methods.cpp b/components/core/tests/test-encoding_methods.cpp index 9ff5f58f2f..444682fe3d 100644 --- a/components/core/tests/test-encoding_methods.cpp +++ b/components/core/tests/test-encoding_methods.cpp @@ -1,4 +1,4 @@ -#include +#include #include "../src/clp/ffi/encoding_methods.hpp" #include "../src/clp/ir/types.hpp" diff --git a/components/core/tests/test-ffi_IrUnitHandlerInterface.cpp b/components/core/tests/test-ffi_IrUnitHandlerInterface.cpp index 3b5763153a..01c750d8d4 100644 --- a/components/core/tests/test-ffi_IrUnitHandlerInterface.cpp +++ b/components/core/tests/test-ffi_IrUnitHandlerInterface.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include "../src/clp/ffi/ir_stream/decoding_methods.hpp" #include "../src/clp/ffi/ir_stream/IrUnitHandlerInterface.hpp" diff --git a/components/core/tests/test-ffi_KeyValuePairLogEvent.cpp b/components/core/tests/test-ffi_KeyValuePairLogEvent.cpp index 5c892e17ea..93a6b26c2e 100644 --- a/components/core/tests/test-ffi_KeyValuePairLogEvent.cpp +++ b/components/core/tests/test-ffi_KeyValuePairLogEvent.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include "../src/clp/ffi/encoding_methods.hpp" diff --git a/components/core/tests/test-ffi_SchemaTree.cpp b/components/core/tests/test-ffi_SchemaTree.cpp index 2808e03c04..4cf67e32a7 100644 --- a/components/core/tests/test-ffi_SchemaTree.cpp +++ b/components/core/tests/test-ffi_SchemaTree.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include "../src/clp/ffi/SchemaTree.hpp" diff --git a/components/core/tests/test-hash_utils.cpp b/components/core/tests/test-hash_utils.cpp index 9e5aacd479..279ad4dde3 100644 --- a/components/core/tests/test-hash_utils.cpp +++ b/components/core/tests/test-hash_utils.cpp @@ -1,7 +1,7 @@ #include #include -#include +#include #include "../src/clp/ErrorCode.hpp" #include "../src/clp/hash_utils.hpp" diff --git a/components/core/tests/test-ir_encoding_methods.cpp b/components/core/tests/test-ir_encoding_methods.cpp index c645b3a136..51f4381a61 100644 --- a/components/core/tests/test-ir_encoding_methods.cpp +++ b/components/core/tests/test-ir_encoding_methods.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include diff --git a/components/core/tests/test-ir_parsing.cpp b/components/core/tests/test-ir_parsing.cpp index 1289e7c90e..b0b153c4e8 100644 --- a/components/core/tests/test-ir_parsing.cpp +++ b/components/core/tests/test-ir_parsing.cpp @@ -1,4 +1,4 @@ -#include +#include #include "../src/clp/ir/parsing.hpp" #include "../src/clp/ir/types.hpp" diff --git a/components/core/tests/test-ir_serializer.cpp b/components/core/tests/test-ir_serializer.cpp index 488f91d365..77b55ed342 100644 --- a/components/core/tests/test-ir_serializer.cpp +++ b/components/core/tests/test-ir_serializer.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include "../src/clp/ffi/ir_stream/decoding_methods.hpp" #include "../src/clp/ir/constants.hpp" diff --git a/components/core/tests/test-kql.cpp b/components/core/tests/test-kql.cpp index 4d55bb556c..0f52b6b6bd 100644 --- a/components/core/tests/test-kql.cpp +++ b/components/core/tests/test-kql.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include diff --git a/components/core/tests/test-main.cpp b/components/core/tests/test-main.cpp index 9d9645b0cf..4ed06df1f7 100644 --- a/components/core/tests/test-main.cpp +++ b/components/core/tests/test-main.cpp @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include +#include diff --git a/components/core/tests/test-math_utils.cpp b/components/core/tests/test-math_utils.cpp index b8bf6d12da..370d31d592 100644 --- a/components/core/tests/test-math_utils.cpp +++ b/components/core/tests/test-math_utils.cpp @@ -1,4 +1,4 @@ -#include +#include #include "../src/clp/math_utils.hpp" diff --git a/components/core/tests/test-query_methods.cpp b/components/core/tests/test-query_methods.cpp index b9b54a35e0..fa2163adf8 100644 --- a/components/core/tests/test-query_methods.cpp +++ b/components/core/tests/test-query_methods.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include "../src/clp/ffi/encoding_methods.hpp" #include "../src/clp/ffi/search/ExactVariableToken.hpp" diff --git a/components/core/tests/test-regex_utils.cpp b/components/core/tests/test-regex_utils.cpp index 38d401b25d..acf05ba775 100644 --- a/components/core/tests/test-regex_utils.cpp +++ b/components/core/tests/test-regex_utils.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include #include diff --git a/components/core/tests/test-sql.cpp b/components/core/tests/test-sql.cpp index 90e58eeca0..b3459a0e07 100644 --- a/components/core/tests/test-sql.cpp +++ b/components/core/tests/test-sql.cpp @@ -1,7 +1,7 @@ #include #include -#include +#include #include "../src/clp_s/search/ast/EmptyExpr.hpp" #include "../src/clp_s/search/sql/sql.hpp" diff --git a/components/core/tests/test-string_utils.cpp b/components/core/tests/test-string_utils.cpp index e55278d351..e57c83053b 100644 --- a/components/core/tests/test-string_utils.cpp +++ b/components/core/tests/test-string_utils.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include using clp::string_utils::clean_up_wildcard_search_string; diff --git a/components/core/tests/test-utf8_utils.cpp b/components/core/tests/test-utf8_utils.cpp index 7b45630002..7730155498 100644 --- a/components/core/tests/test-utf8_utils.cpp +++ b/components/core/tests/test-utf8_utils.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include "../src/clp/ffi/utils.hpp" diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index 47e9849b16..69d8c64cf4 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -71,7 +71,7 @@ tasks: cmds: - task: "absl" - task: "antlr" - - task: "Catch2" + - task: "catch2" - task: "date" - task: "json" - task: "log-surgeon" @@ -130,35 +130,19 @@ tasks: INCLUDE_PATTERNS: - "{{.OUTPUT_FILE}}" - Catch2: + catch2: internal: true - vars: - CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/Catch2.md5" - DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/Catch2" - sources: - - "{{.G_DEP_DOWNLOAD_SCRIPT}}" - - "{{.G_UTILS_TASKFILE}}" - - "{{.ROOT_DIR}}/taskfile.yaml" - - "{{.TASKFILE}}" - generates: ["{{.CHECKSUM_FILE}}"] - deps: - - "utils:init" - - task: ":utils:checksum:validate" - vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + run: "once" cmds: - - task: "download-dependency" - vars: - DEST: "{{.DEST}}" - FLAGS: "--extract" - SRC_NAME: "Catch2-2.13.7" - SRC_URL: "https://github.com/catchorg/Catch2/archive/refs/tags/v2.13.7.zip" - # This command must be last - - task: ":utils:checksum:compute" + - task: "utils:install-remote-cmake-lib" vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + CMAKE_GEN_ARGS: + - "-DBUILD_TESTING=OFF" + - "-DCMAKE_BUILD_TYPE=Release" + - "-DCMAKE_INSTALL_MESSAGE=LAZY" + LIB_NAME: "Catch2" + TARBALL_SHA256: "3cdb4138a072e4c0290034fe22d9f0a80d3bcfb8d7a8a5c49ad75d3a5da24fae" + TARBALL_URL: "https://github.com/catchorg/Catch2/archive/refs/tags/v2.13.7.tar.gz" date: internal: true From d0e98b41bce7e99c7f6f24e484b79d348591fc94 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 13:07:07 -0400 Subject: [PATCH 10/35] build(deps): Migrate nlohmann_json installation from submodule to task; Rename json task to nlohmann_json. --- .gitmodules | 4 -- components/core/.clang-format | 6 +-- components/core/CMakeLists.txt | 6 +++ components/core/src/clp/clg/CMakeLists.txt | 1 + components/core/src/clp/clo/CMakeLists.txt | 1 + components/core/src/clp/clo/clo.cpp | 2 +- components/core/src/clp/clp/CMakeLists.txt | 1 + .../core/src/clp/ffi/KeyValuePairLogEvent.cpp | 3 +- .../core/src/clp/ffi/KeyValuePairLogEvent.hpp | 2 +- .../src/clp/ffi/ir_stream/Deserializer.hpp | 2 +- .../core/src/clp/ffi/ir_stream/Serializer.cpp | 2 +- .../core/src/clp/ffi/ir_stream/Serializer.hpp | 2 +- .../clp/ffi/ir_stream/encoding_methods.cpp | 2 +- .../core/src/clp/ffi/ir_stream/utils.cpp | 3 +- .../core/src/clp/ffi/ir_stream/utils.hpp | 2 +- .../core/src/clp/ir/LogEventDeserializer.cpp | 2 +- .../clp/streaming_archive/writer/Archive.cpp | 2 +- components/core/src/clp_s/ArchiveWriter.cpp | 2 +- components/core/src/clp_s/CMakeLists.txt | 1 + components/core/src/clp_s/JsonConstructor.cpp | 2 +- components/core/src/clp_s/clp-s.cpp | 2 +- .../glt/ffi/ir_stream/encoding_methods.cpp | 2 +- components/core/src/glt/glt/CMakeLists.txt | 1 + .../core/src/glt/ir/LogEventDeserializer.cpp | 2 +- .../glt/streaming_archive/writer/Archive.cpp | 2 +- components/core/src/reducer/CMakeLists.txt | 1 + .../src/reducer/DeserializedRecordGroup.cpp | 2 +- .../src/reducer/DeserializedRecordGroup.hpp | 2 +- .../src/reducer/JsonArrayRecordIterator.hpp | 2 +- components/core/src/reducer/JsonRecord.hpp | 2 +- components/core/src/reducer/ServerContext.cpp | 2 +- components/core/src/reducer/ServerContext.hpp | 2 +- .../core/src/reducer/reducer_server.cpp | 2 +- components/core/submodules/json | 1 - components/core/tests/test-NetworkReader.cpp | 2 +- components/core/tests/test-clp_s-search.cpp | 2 +- .../tests/test-ffi_KeyValuePairLogEvent.cpp | 3 +- .../core/tests/test-ir_encoding_methods.cpp | 2 +- components/core/tests/test-utf8_utils.cpp | 2 +- taskfiles/deps/main.yaml | 46 ++++++------------- 40 files changed, 62 insertions(+), 68 deletions(-) delete mode 160000 components/core/submodules/json diff --git a/.gitmodules b/.gitmodules index 67f711632e..b083ffc32b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,10 +1,6 @@ [submodule "components/core/submodules/date"] path = components/core/submodules/date url = https://github.com/HowardHinnant/date.git -[submodule "components/core/submodules/json"] - path = components/core/submodules/json - url = https://github.com/nlohmann/json.git - shallow = true [submodule "components/core/submodules/yaml-cpp"] path = components/core/submodules/yaml-cpp url = https://github.com/jbeder/yaml-cpp.git diff --git a/components/core/.clang-format b/components/core/.clang-format index bcd2660465..626220791f 100644 --- a/components/core/.clang-format +++ b/components/core/.clang-format @@ -4,9 +4,9 @@ IncludeCategories: # NOTE: A header is grouped by first matching regex # Library headers. Update when adding new libraries. # NOTE: clang-format retains leading white-space on a line in violation of the YAML spec. - - Regex: "<(absl|antlr4|archive|boost|bsoncxx|catch2|curl|date|fmt|json|log_surgeon|lzma|mongocxx\ -|msgpack|mysql|openssl|outcome|regex_utils|simdjson|spdlog|sqlite3|string_utils|yaml-cpp|ystdlib\ -|zstd)" + - Regex: "<(absl|antlr4|archive|boost|bsoncxx|catch2|curl|date|fmt|log_surgeon|lzma|mongocxx\ +|msgpack|mysql|nlohmann|openssl|outcome|regex_utils|simdjson|spdlog|sqlite3|string_utils|yaml-cpp\ +|ystdlib|zstd)" Priority: 3 # C system headers - Regex: "^<.+\\.h>" diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index 73547d48e8..9e2a996840 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -154,6 +154,11 @@ else() message(FATAL_ERROR "Could not find static libraries for fmt") endif() +find_package(nlohmann_json REQUIRED) +if(nlohmann_json_FOUND) + message(STATUS "Found nlohmann_json ${nlohmann_json_VERSION}") +endif() + # Find and setup spdlog if(CLP_USE_STATIC_LIBS) # NOTE: On some Linux distributions (e.g. Ubuntu), the spdlog package only contains a dynamic @@ -680,6 +685,7 @@ target_link_libraries(unitTest LibArchive::LibArchive MariaDBClient::MariaDBClient ${MONGOCXX_TARGET} + nlohmann_json::nlohmann_json simdjson spdlog::spdlog sql diff --git a/components/core/src/clp/clg/CMakeLists.txt b/components/core/src/clp/clg/CMakeLists.txt index b906c388fa..0df62b0009 100644 --- a/components/core/src/clp/clg/CMakeLists.txt +++ b/components/core/src/clp/clg/CMakeLists.txt @@ -139,6 +139,7 @@ target_link_libraries(clg fmt::fmt log_surgeon::log_surgeon MariaDBClient::MariaDBClient + nlohmann_json::nlohmann_json spdlog::spdlog ${sqlite_LIBRARY_DEPENDENCIES} ${STD_FS_LIBS} diff --git a/components/core/src/clp/clo/CMakeLists.txt b/components/core/src/clp/clo/CMakeLists.txt index e671a97cdc..55b43e8b61 100644 --- a/components/core/src/clp/clo/CMakeLists.txt +++ b/components/core/src/clp/clo/CMakeLists.txt @@ -168,6 +168,7 @@ target_link_libraries(clo log_surgeon::log_surgeon ${MONGOCXX_TARGET} msgpack-cxx + nlohmann_json::nlohmann_json spdlog::spdlog ${sqlite_LIBRARY_DEPENDENCIES} ${STD_FS_LIBS} diff --git a/components/core/src/clp/clo/clo.cpp b/components/core/src/clp/clo/clo.cpp index 3412e2d079..a675f9fe6a 100644 --- a/components/core/src/clp/clo/clo.cpp +++ b/components/core/src/clp/clo/clo.cpp @@ -3,8 +3,8 @@ #include #include -#include #include +#include #include #include "../../reducer/network_utils.hpp" diff --git a/components/core/src/clp/clp/CMakeLists.txt b/components/core/src/clp/clp/CMakeLists.txt index c22c1c6360..ea8256467a 100644 --- a/components/core/src/clp/clp/CMakeLists.txt +++ b/components/core/src/clp/clp/CMakeLists.txt @@ -183,6 +183,7 @@ target_link_libraries(clp ${sqlite_LIBRARY_DEPENDENCIES} LibArchive::LibArchive MariaDBClient::MariaDBClient + nlohmann_json::nlohmann_json ${STD_FS_LIBS} clp::string_utils yaml-cpp::yaml-cpp diff --git a/components/core/src/clp/ffi/KeyValuePairLogEvent.cpp b/components/core/src/clp/ffi/KeyValuePairLogEvent.cpp index 0c9f8f601a..14f8d1afd4 100644 --- a/components/core/src/clp/ffi/KeyValuePairLogEvent.cpp +++ b/components/core/src/clp/ffi/KeyValuePairLogEvent.cpp @@ -11,7 +11,8 @@ #include #include -#include +#include +#include #include #include "../ir/EncodedTextAst.hpp" diff --git a/components/core/src/clp/ffi/KeyValuePairLogEvent.hpp b/components/core/src/clp/ffi/KeyValuePairLogEvent.hpp index 0b50a0e4af..96e5f5a998 100644 --- a/components/core/src/clp/ffi/KeyValuePairLogEvent.hpp +++ b/components/core/src/clp/ffi/KeyValuePairLogEvent.hpp @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include "../time_types.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/Deserializer.hpp b/components/core/src/clp/ffi/ir_stream/Deserializer.hpp index 65c3fd6448..68566a7420 100644 --- a/components/core/src/clp/ffi/ir_stream/Deserializer.hpp +++ b/components/core/src/clp/ffi/ir_stream/Deserializer.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include "../../ReaderInterface.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/Serializer.cpp b/components/core/src/clp/ffi/ir_stream/Serializer.cpp index 99042230b4..88cfc4c9ad 100644 --- a/components/core/src/clp/ffi/ir_stream/Serializer.cpp +++ b/components/core/src/clp/ffi/ir_stream/Serializer.cpp @@ -11,8 +11,8 @@ #include #include -#include #include +#include #include #include "../../ir/types.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/Serializer.hpp b/components/core/src/clp/ffi/ir_stream/Serializer.hpp index 157d69d107..c6d3afe75b 100644 --- a/components/core/src/clp/ffi/ir_stream/Serializer.hpp +++ b/components/core/src/clp/ffi/ir_stream/Serializer.hpp @@ -7,8 +7,8 @@ #include #include -#include #include +#include #include #include "../../time_types.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/encoding_methods.cpp b/components/core/src/clp/ffi/ir_stream/encoding_methods.cpp index adec027079..dec8dca97f 100644 --- a/components/core/src/clp/ffi/ir_stream/encoding_methods.cpp +++ b/components/core/src/clp/ffi/ir_stream/encoding_methods.cpp @@ -1,6 +1,6 @@ #include "encoding_methods.hpp" -#include +#include #include "../../ir/parsing.hpp" #include "../../ir/types.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/utils.cpp b/components/core/src/clp/ffi/ir_stream/utils.cpp index 371d7cfba2..ab6040c2d0 100644 --- a/components/core/src/clp/ffi/ir_stream/utils.cpp +++ b/components/core/src/clp/ffi/ir_stream/utils.cpp @@ -5,7 +5,8 @@ #include #include -#include +#include +#include #include "../../type_utils.hpp" #include "decoding_methods.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/utils.hpp b/components/core/src/clp/ffi/ir_stream/utils.hpp index ae96450987..1613dc004f 100644 --- a/components/core/src/clp/ffi/ir_stream/utils.hpp +++ b/components/core/src/clp/ffi/ir_stream/utils.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include "../../ErrorCode.hpp" diff --git a/components/core/src/clp/ir/LogEventDeserializer.cpp b/components/core/src/clp/ir/LogEventDeserializer.cpp index fdbc30fa4f..21f300befb 100644 --- a/components/core/src/clp/ir/LogEventDeserializer.cpp +++ b/components/core/src/clp/ir/LogEventDeserializer.cpp @@ -2,7 +2,7 @@ #include -#include +#include #include #include diff --git a/components/core/src/clp/streaming_archive/writer/Archive.cpp b/components/core/src/clp/streaming_archive/writer/Archive.cpp index 688cf3c23e..a4d09601a1 100644 --- a/components/core/src/clp/streaming_archive/writer/Archive.cpp +++ b/components/core/src/clp/streaming_archive/writer/Archive.cpp @@ -10,9 +10,9 @@ #include #include #include -#include #include #include +#include #include "../../EncodedVariableInterpreter.hpp" #include "../../ir/types.hpp" diff --git a/components/core/src/clp_s/ArchiveWriter.cpp b/components/core/src/clp_s/ArchiveWriter.cpp index a05856da16..58c52d3381 100644 --- a/components/core/src/clp_s/ArchiveWriter.cpp +++ b/components/core/src/clp_s/ArchiveWriter.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include "../clp/streaming_archive/Constants.hpp" #include "archive_constants.hpp" diff --git a/components/core/src/clp_s/CMakeLists.txt b/components/core/src/clp_s/CMakeLists.txt index 263851bac2..dcaaa06a34 100644 --- a/components/core/src/clp_s/CMakeLists.txt +++ b/components/core/src/clp_s/CMakeLists.txt @@ -234,6 +234,7 @@ target_link_libraries( kql MariaDBClient::MariaDBClient ${MONGOCXX_TARGET} + nlohmann_json::nlohmann_json msgpack-cxx OpenSSL::Crypto simdjson diff --git a/components/core/src/clp_s/JsonConstructor.cpp b/components/core/src/clp_s/JsonConstructor.cpp index 515d974043..b4995f4cd4 100644 --- a/components/core/src/clp_s/JsonConstructor.cpp +++ b/components/core/src/clp_s/JsonConstructor.cpp @@ -5,11 +5,11 @@ #include #include -#include #include #include #include #include +#include #include "archive_constants.hpp" #include "ErrorCode.hpp" diff --git a/components/core/src/clp_s/clp-s.cpp b/components/core/src/clp_s/clp-s.cpp index 0069bdc057..b559e058e8 100644 --- a/components/core/src/clp_s/clp-s.cpp +++ b/components/core/src/clp_s/clp-s.cpp @@ -7,8 +7,8 @@ #include #include -#include #include +#include #include #include diff --git a/components/core/src/glt/ffi/ir_stream/encoding_methods.cpp b/components/core/src/glt/ffi/ir_stream/encoding_methods.cpp index f6f352a78c..dac27fa47d 100644 --- a/components/core/src/glt/ffi/ir_stream/encoding_methods.cpp +++ b/components/core/src/glt/ffi/ir_stream/encoding_methods.cpp @@ -1,6 +1,6 @@ #include "encoding_methods.hpp" -#include +#include #include "../../ir/parsing.hpp" #include "../../ir/types.hpp" diff --git a/components/core/src/glt/glt/CMakeLists.txt b/components/core/src/glt/glt/CMakeLists.txt index bce1831bcb..6a24ecf3b2 100644 --- a/components/core/src/glt/glt/CMakeLists.txt +++ b/components/core/src/glt/glt/CMakeLists.txt @@ -188,6 +188,7 @@ target_link_libraries(glt ${sqlite_LIBRARY_DEPENDENCIES} LibArchive::LibArchive MariaDBClient::MariaDBClient + nlohmann_json::nlohmann_json ${STD_FS_LIBS} clp::string_utils yaml-cpp::yaml-cpp diff --git a/components/core/src/glt/ir/LogEventDeserializer.cpp b/components/core/src/glt/ir/LogEventDeserializer.cpp index ed30ed6676..2d69cf76e7 100644 --- a/components/core/src/glt/ir/LogEventDeserializer.cpp +++ b/components/core/src/glt/ir/LogEventDeserializer.cpp @@ -2,7 +2,7 @@ #include -#include +#include #include #include diff --git a/components/core/src/glt/streaming_archive/writer/Archive.cpp b/components/core/src/glt/streaming_archive/writer/Archive.cpp index cbe7e2dbfe..dc99ec19e9 100644 --- a/components/core/src/glt/streaming_archive/writer/Archive.cpp +++ b/components/core/src/glt/streaming_archive/writer/Archive.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include "../../EncodedVariableInterpreter.hpp" #include "../../ir/types.hpp" diff --git a/components/core/src/reducer/CMakeLists.txt b/components/core/src/reducer/CMakeLists.txt index b0017a583f..0de758abf0 100644 --- a/components/core/src/reducer/CMakeLists.txt +++ b/components/core/src/reducer/CMakeLists.txt @@ -49,6 +49,7 @@ target_link_libraries(reducer-server fmt::fmt ${MONGOCXX_TARGET} msgpack-cxx + nlohmann_json::nlohmann_json spdlog::spdlog ) # Put the built executable at the root of the build directory diff --git a/components/core/src/reducer/DeserializedRecordGroup.cpp b/components/core/src/reducer/DeserializedRecordGroup.cpp index 9c78086b60..a7c5b8a8f6 100644 --- a/components/core/src/reducer/DeserializedRecordGroup.cpp +++ b/components/core/src/reducer/DeserializedRecordGroup.cpp @@ -2,7 +2,7 @@ #include -#include +#include namespace reducer { DeserializedRecordGroup::DeserializedRecordGroup(std::vector& serialized_data) diff --git a/components/core/src/reducer/DeserializedRecordGroup.hpp b/components/core/src/reducer/DeserializedRecordGroup.hpp index e016ddc386..146d4907a4 100644 --- a/components/core/src/reducer/DeserializedRecordGroup.hpp +++ b/components/core/src/reducer/DeserializedRecordGroup.hpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include "ConstRecordIterator.hpp" #include "JsonArrayRecordIterator.hpp" diff --git a/components/core/src/reducer/JsonArrayRecordIterator.hpp b/components/core/src/reducer/JsonArrayRecordIterator.hpp index ae46ca2c02..57f5e6d63d 100644 --- a/components/core/src/reducer/JsonArrayRecordIterator.hpp +++ b/components/core/src/reducer/JsonArrayRecordIterator.hpp @@ -1,7 +1,7 @@ #ifndef REDUCER_JSONARRAYRECORDITERATOR_HPP #define REDUCER_JSONARRAYRECORDITERATOR_HPP -#include +#include #include "ConstRecordIterator.hpp" #include "JsonRecord.hpp" diff --git a/components/core/src/reducer/JsonRecord.hpp b/components/core/src/reducer/JsonRecord.hpp index 4d8df393ae..a848cf293c 100644 --- a/components/core/src/reducer/JsonRecord.hpp +++ b/components/core/src/reducer/JsonRecord.hpp @@ -1,7 +1,7 @@ #ifndef REDUCER_JSONRECORD_HPP #define REDUCER_JSONRECORD_HPP -#include +#include #include "Record.hpp" diff --git a/components/core/src/reducer/ServerContext.cpp b/components/core/src/reducer/ServerContext.cpp index 75b667da43..773951b730 100644 --- a/components/core/src/reducer/ServerContext.cpp +++ b/components/core/src/reducer/ServerContext.cpp @@ -1,7 +1,6 @@ #include "ServerContext.hpp" #include -#include #include #include #include @@ -10,6 +9,7 @@ #include #include #include +#include #include "../clp/spdlog_with_specializations.hpp" #include "CommandLineArguments.hpp" diff --git a/components/core/src/reducer/ServerContext.hpp b/components/core/src/reducer/ServerContext.hpp index 02a0467d86..47433258b0 100644 --- a/components/core/src/reducer/ServerContext.hpp +++ b/components/core/src/reducer/ServerContext.hpp @@ -5,9 +5,9 @@ #include #include -#include #include #include +#include #include "../clp/TraceableException.hpp" #include "CommandLineArguments.hpp" diff --git a/components/core/src/reducer/reducer_server.cpp b/components/core/src/reducer/reducer_server.cpp index b5f36be778..37409f2c9a 100644 --- a/components/core/src/reducer/reducer_server.cpp +++ b/components/core/src/reducer/reducer_server.cpp @@ -4,9 +4,9 @@ #include #include -#include #include #include +#include #include #include "../clp/spdlog_with_specializations.hpp" diff --git a/components/core/submodules/json b/components/core/submodules/json deleted file mode 160000 index 9cca280a4d..0000000000 --- a/components/core/submodules/json +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03 diff --git a/components/core/tests/test-NetworkReader.cpp b/components/core/tests/test-NetworkReader.cpp index 95b8e0951c..76b5d05dee 100644 --- a/components/core/tests/test-NetworkReader.cpp +++ b/components/core/tests/test-NetworkReader.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include "../src/clp/CurlDownloadHandler.hpp" diff --git a/components/core/tests/test-clp_s-search.cpp b/components/core/tests/test-clp_s-search.cpp index 0f6628344d..57c0e573d6 100644 --- a/components/core/tests/test-clp_s-search.cpp +++ b/components/core/tests/test-clp_s-search.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include "../src/clp_s/ArchiveReader.hpp" #include "../src/clp_s/InputConfig.hpp" diff --git a/components/core/tests/test-ffi_KeyValuePairLogEvent.cpp b/components/core/tests/test-ffi_KeyValuePairLogEvent.cpp index 93a6b26c2e..6a2f07f111 100644 --- a/components/core/tests/test-ffi_KeyValuePairLogEvent.cpp +++ b/components/core/tests/test-ffi_KeyValuePairLogEvent.cpp @@ -11,7 +11,8 @@ #include #include -#include +#include +#include #include "../src/clp/ffi/encoding_methods.hpp" #include "../src/clp/ffi/KeyValuePairLogEvent.hpp" diff --git a/components/core/tests/test-ir_encoding_methods.cpp b/components/core/tests/test-ir_encoding_methods.cpp index 51f4381a61..7c4d0fa194 100644 --- a/components/core/tests/test-ir_encoding_methods.cpp +++ b/components/core/tests/test-ir_encoding_methods.cpp @@ -13,8 +13,8 @@ #include #include -#include #include +#include #include "../src/clp/BufferReader.hpp" #include "../src/clp/ErrorCode.hpp" diff --git a/components/core/tests/test-utf8_utils.cpp b/components/core/tests/test-utf8_utils.cpp index 7730155498..b8e0e201b1 100644 --- a/components/core/tests/test-utf8_utils.cpp +++ b/components/core/tests/test-utf8_utils.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include "../src/clp/ffi/utils.hpp" #include "../src/clp/utf8_utils.hpp" diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index 69d8c64cf4..e282dc5509 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -73,8 +73,8 @@ tasks: - task: "antlr" - task: "catch2" - task: "date" - - task: "json" - task: "log-surgeon" + - task: "nlohmann_json" - task: "outcome" - task: "simdjson" - task: "sqlite3" @@ -174,36 +174,6 @@ tasks: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" INCLUDE_PATTERNS: ["{{.DEST}}"] - json: - internal: true - vars: - CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/json.md5" - DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/json" - sources: - - "{{.G_DEP_DOWNLOAD_SCRIPT}}" - - "{{.G_UTILS_TASKFILE}}" - - "{{.ROOT_DIR}}/taskfile.yaml" - - "{{.TASKFILE}}" - generates: ["{{.CHECKSUM_FILE}}"] - deps: - - "utils:init" - - task: ":utils:checksum:validate" - vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] - cmds: - - task: "download-dependency" - vars: - DEST: "{{.DEST}}" - FLAGS: "--extract" - SRC_NAME: "json-3.11.3" - SRC_URL: "https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.zip" - # This command must be last - - task: ":utils:checksum:compute" - vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] - log-surgeon: internal: true vars: @@ -234,6 +204,20 @@ tasks: CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" INCLUDE_PATTERNS: ["{{.DEST}}"] + nlohmann_json: + internal: true + run: "once" + cmds: + - task: "utils:install-remote-cmake-lib" + vars: + CMAKE_GEN_ARGS: + - "-DCMAKE_BUILD_TYPE=Release" + - "-DCMAKE_INSTALL_MESSAGE=LAZY" + - "-DJSON_BuildTests=OFF" + LIB_NAME: "nlohmann_json" + TARBALL_SHA256: "d6c65aca6b1ed68e7a182f4757257b107ae403032760ed6ef121c9d55e81757d" + TARBALL_URL: "https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz" + outcome: internal: true vars: From 27c3af7f7c0fdac8a589d043266cc2bc23981277 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 13:12:16 -0400 Subject: [PATCH 11/35] build(deps): Migrate date installation from submodule to task. --- .gitmodules | 3 -- components/core/CMakeLists.txt | 6 ++++ components/core/src/clp/TimestampPattern.cpp | 2 +- components/core/src/clp/clg/CMakeLists.txt | 1 + components/core/src/clp/clo/CMakeLists.txt | 1 + components/core/src/clp/clp/CMakeLists.txt | 1 + .../make_dictionaries_readable/CMakeLists.txt | 1 - components/core/src/clp_s/CMakeLists.txt | 2 +- .../core/src/clp_s/TimestampPattern.cpp | 2 +- .../core/src/clp_s/indexer/CMakeLists.txt | 1 + components/core/src/glt/TimestampPattern.cpp | 2 +- components/core/src/glt/glt/CMakeLists.txt | 1 + components/core/submodules/date | 1 - taskfiles/deps/main.yaml | 33 +++++-------------- 14 files changed, 23 insertions(+), 34 deletions(-) delete mode 160000 components/core/submodules/date diff --git a/.gitmodules b/.gitmodules index b083ffc32b..2e9c4e8dd6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "components/core/submodules/date"] - path = components/core/submodules/date - url = https://github.com/HowardHinnant/date.git [submodule "components/core/submodules/yaml-cpp"] path = components/core/submodules/yaml-cpp url = https://github.com/jbeder/yaml-cpp.git diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index 9e2a996840..1435017b30 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -143,6 +143,11 @@ if (Catch2_FOUND) message(STATUS "Found Catch2 ${Catch2_VERSION}") endif() +find_package(date REQUIRED) +if (date_FOUND) + message(STATUS "Found date ${date_VERSION}") +endif() + # Find and setup fmt # NOTE: # - We only try to link to the static library @@ -679,6 +684,7 @@ target_link_libraries(unitTest ${CURL_LIBRARIES} clp_s::search::ast clp_s::TimestampPattern + date::date fmt::fmt kql log_surgeon::log_surgeon diff --git a/components/core/src/clp/TimestampPattern.cpp b/components/core/src/clp/TimestampPattern.cpp index c7a8bf78fb..566aa8c92a 100644 --- a/components/core/src/clp/TimestampPattern.cpp +++ b/components/core/src/clp/TimestampPattern.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include "spdlog_with_specializations.hpp" diff --git a/components/core/src/clp/clg/CMakeLists.txt b/components/core/src/clp/clg/CMakeLists.txt index 0df62b0009..5f7d1ba910 100644 --- a/components/core/src/clp/clg/CMakeLists.txt +++ b/components/core/src/clp/clg/CMakeLists.txt @@ -136,6 +136,7 @@ target_include_directories(clg target_link_libraries(clg PRIVATE Boost::filesystem Boost::program_options + date::date fmt::fmt log_surgeon::log_surgeon MariaDBClient::MariaDBClient diff --git a/components/core/src/clp/clo/CMakeLists.txt b/components/core/src/clp/clo/CMakeLists.txt index 55b43e8b61..e96a175e4a 100644 --- a/components/core/src/clp/clo/CMakeLists.txt +++ b/components/core/src/clp/clo/CMakeLists.txt @@ -164,6 +164,7 @@ target_include_directories(clo target_link_libraries(clo PRIVATE Boost::filesystem Boost::program_options + date::date fmt::fmt log_surgeon::log_surgeon ${MONGOCXX_TARGET} diff --git a/components/core/src/clp/clp/CMakeLists.txt b/components/core/src/clp/clp/CMakeLists.txt index ea8256467a..177c85ce12 100644 --- a/components/core/src/clp/clp/CMakeLists.txt +++ b/components/core/src/clp/clp/CMakeLists.txt @@ -177,6 +177,7 @@ target_include_directories(clp target_link_libraries(clp PRIVATE Boost::filesystem Boost::program_options + date::date fmt::fmt log_surgeon::log_surgeon spdlog::spdlog diff --git a/components/core/src/clp/make_dictionaries_readable/CMakeLists.txt b/components/core/src/clp/make_dictionaries_readable/CMakeLists.txt index 8834aad2b6..30c053e39b 100644 --- a/components/core/src/clp/make_dictionaries_readable/CMakeLists.txt +++ b/components/core/src/clp/make_dictionaries_readable/CMakeLists.txt @@ -34,7 +34,6 @@ set( ../VariableDictionaryReader.hpp ../WriterInterface.cpp ../WriterInterface.hpp - "${PROJECT_SOURCE_DIR}/submodules/date/include/date/date.h" CommandLineArguments.cpp CommandLineArguments.hpp make-dictionaries-readable.cpp diff --git a/components/core/src/clp_s/CMakeLists.txt b/components/core/src/clp_s/CMakeLists.txt index dcaaa06a34..734c8b081f 100644 --- a/components/core/src/clp_s/CMakeLists.txt +++ b/components/core/src/clp_s/CMakeLists.txt @@ -73,7 +73,6 @@ set( set( CLP_S_SOURCES - "${PROJECT_SOURCE_DIR}/submodules/date/include/date/date.h" archive_constants.hpp ArchiveReader.cpp ArchiveReader.hpp @@ -211,6 +210,7 @@ target_link_libraries( clp_s_TimestampPattern PRIVATE clp::string_utils + date::date ) add_executable( diff --git a/components/core/src/clp_s/TimestampPattern.cpp b/components/core/src/clp_s/TimestampPattern.cpp index 25131db7e4..f5500e3aad 100644 --- a/components/core/src/clp_s/TimestampPattern.cpp +++ b/components/core/src/clp_s/TimestampPattern.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/components/core/src/clp_s/indexer/CMakeLists.txt b/components/core/src/clp_s/indexer/CMakeLists.txt index 0dcc134ff0..80dc53b461 100644 --- a/components/core/src/clp_s/indexer/CMakeLists.txt +++ b/components/core/src/clp_s/indexer/CMakeLists.txt @@ -89,6 +89,7 @@ target_link_libraries(indexer Boost::iostreams Boost::program_options Boost::url ${CURL_LIBRARIES} clp::string_utils + date::date MariaDBClient::MariaDBClient OpenSSL::Crypto simdjson diff --git a/components/core/src/glt/TimestampPattern.cpp b/components/core/src/glt/TimestampPattern.cpp index d725906e39..7f42d93e4f 100644 --- a/components/core/src/glt/TimestampPattern.cpp +++ b/components/core/src/glt/TimestampPattern.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include "spdlog_with_specializations.hpp" diff --git a/components/core/src/glt/glt/CMakeLists.txt b/components/core/src/glt/glt/CMakeLists.txt index 6a24ecf3b2..e236351f94 100644 --- a/components/core/src/glt/glt/CMakeLists.txt +++ b/components/core/src/glt/glt/CMakeLists.txt @@ -183,6 +183,7 @@ target_include_directories(glt target_link_libraries(glt PRIVATE Boost::filesystem Boost::iostreams Boost::program_options + date::date fmt::fmt spdlog::spdlog ${sqlite_LIBRARY_DEPENDENCIES} diff --git a/components/core/submodules/date b/components/core/submodules/date deleted file mode 160000 index 6e921e1b1d..0000000000 --- a/components/core/submodules/date +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6e921e1b1d21e84a5c82416ba7ecd98e33a436d0 diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index e282dc5509..25bf078ef0 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -146,33 +146,16 @@ tasks: date: internal: true - vars: - CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/date.md5" - DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/date" - sources: - - "{{.G_DEP_DOWNLOAD_SCRIPT}}" - - "{{.G_UTILS_TASKFILE}}" - - "{{.ROOT_DIR}}/taskfile.yaml" - - "{{.TASKFILE}}" - generates: ["{{.CHECKSUM_FILE}}"] - deps: - - "utils:init" - - task: ":utils:checksum:validate" - vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + run: "once" cmds: - - task: "download-dependency" - vars: - DEST: "{{.DEST}}" - FLAGS: "--extract" - SRC_NAME: "date-3.0.1" - SRC_URL: "https://github.com/HowardHinnant/date/archive/refs/tags/v3.0.1.zip" - # This command must be last - - task: ":utils:checksum:compute" + - task: "utils:install-remote-cmake-lib" vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + CMAKE_GEN_ARGS: + - "-DCMAKE_BUILD_TYPE=Release" + - "-DCMAKE_INSTALL_MESSAGE=LAZY" + LIB_NAME: "date" + TARBALL_SHA256: "7a390f200f0ccd207e8cff6757e04817c1a0aec3e327b006b7eb451c57ee3538" + TARBALL_URL: "https://github.com/HowardHinnant/date/archive/refs/tags/v3.0.1.tar.gz" log-surgeon: internal: true From 8bd6419b1c9c27061f8cdf6055ba5a68347260f8 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 13:15:58 -0400 Subject: [PATCH 12/35] build(deps): Migrate simdjson installation from submodule to task. --- .gitmodules | 3 -- components/core/CMakeLists.txt | 10 +++--- components/core/src/clp_s/CMakeLists.txt | 2 +- .../core/src/clp_s/indexer/CMakeLists.txt | 2 +- .../core/src/clp_s/search/ast/CMakeLists.txt | 2 +- components/core/submodules/simdjson | 1 - taskfiles/deps/main.yaml | 33 +++++-------------- 7 files changed, 17 insertions(+), 36 deletions(-) delete mode 160000 components/core/submodules/simdjson diff --git a/.gitmodules b/.gitmodules index 2e9c4e8dd6..450f4ac3cb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,9 +4,6 @@ [submodule "components/core/submodules/log-surgeon"] path = components/core/submodules/log-surgeon url = https://github.com/y-scope/log-surgeon.git -[submodule "components/core/submodules/simdjson"] - path = components/core/submodules/simdjson - url = https://github.com/simdjson/simdjson.git [submodule "tools/yscope-dev-utils"] path = tools/yscope-dev-utils url = https://github.com/y-scope/yscope-dev-utils.git diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index 1435017b30..6bb0d958cd 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -164,6 +164,11 @@ if(nlohmann_json_FOUND) message(STATUS "Found nlohmann_json ${nlohmann_json_VERSION}") endif() +find_package(simdjson REQUIRED) +if(simdjson_FOUND) + message(STATUS "Found simdjson ${simdjson_VERSION}") +endif() + # Find and setup spdlog if(CLP_USE_STATIC_LIBS) # NOTE: On some Linux distributions (e.g. Ubuntu), the spdlog package only contains a dynamic @@ -249,9 +254,6 @@ else() message(FATAL_ERROR "Could not find msgpack-cxx") endif() -# Add simdjson -add_subdirectory(submodules/simdjson EXCLUDE_FROM_ALL) - find_package(Threads REQUIRED) # Add yaml-cpp @@ -692,7 +694,7 @@ target_link_libraries(unitTest MariaDBClient::MariaDBClient ${MONGOCXX_TARGET} nlohmann_json::nlohmann_json - simdjson + simdjson::simdjson spdlog::spdlog sql OpenSSL::Crypto diff --git a/components/core/src/clp_s/CMakeLists.txt b/components/core/src/clp_s/CMakeLists.txt index 734c8b081f..b442002080 100644 --- a/components/core/src/clp_s/CMakeLists.txt +++ b/components/core/src/clp_s/CMakeLists.txt @@ -237,7 +237,7 @@ target_link_libraries( nlohmann_json::nlohmann_json msgpack-cxx OpenSSL::Crypto - simdjson + simdjson::simdjson spdlog::spdlog yaml-cpp::yaml-cpp ystdlib::containers diff --git a/components/core/src/clp_s/indexer/CMakeLists.txt b/components/core/src/clp_s/indexer/CMakeLists.txt index 80dc53b461..a3ffb082da 100644 --- a/components/core/src/clp_s/indexer/CMakeLists.txt +++ b/components/core/src/clp_s/indexer/CMakeLists.txt @@ -92,7 +92,7 @@ target_link_libraries(indexer date::date MariaDBClient::MariaDBClient OpenSSL::Crypto - simdjson + simdjson::simdjson spdlog::spdlog yaml-cpp::yaml-cpp ystdlib::containers diff --git a/components/core/src/clp_s/search/ast/CMakeLists.txt b/components/core/src/clp_s/search/ast/CMakeLists.txt index 17cda32a44..7194d8b1f2 100644 --- a/components/core/src/clp_s/search/ast/CMakeLists.txt +++ b/components/core/src/clp_s/search/ast/CMakeLists.txt @@ -62,5 +62,5 @@ target_link_libraries( PUBLIC clp_s::TimestampPattern PRIVATE - simdjson + simdjson::simdjson ) diff --git a/components/core/submodules/simdjson b/components/core/submodules/simdjson deleted file mode 160000 index 6060be2fdf..0000000000 --- a/components/core/submodules/simdjson +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6060be2fdf62edf4a8f51a8b0883d57d09397b30 diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index 25bf078ef0..99ea20cf8a 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -227,33 +227,16 @@ tasks: simdjson: internal: true - vars: - CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/simdjson.md5" - DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/simdjson" - sources: - - "{{.G_DEP_DOWNLOAD_SCRIPT}}" - - "{{.G_UTILS_TASKFILE}}" - - "{{.ROOT_DIR}}/taskfile.yaml" - - "{{.TASKFILE}}" - generates: ["{{.CHECKSUM_FILE}}"] - deps: - - "utils:init" - - task: ":utils:checksum:validate" - vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + run: "once" cmds: - - task: "download-dependency" - vars: - DEST: "{{.DEST}}" - FLAGS: "--extract" - SRC_NAME: "simdjson-3.6.3" - SRC_URL: "https://github.com/simdjson/simdjson/archive/refs/tags/v3.6.3.zip" - # This command must be last - - task: ":utils:checksum:compute" + - task: "utils:install-remote-cmake-lib" vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + CMAKE_GEN_ARGS: + - "-DCMAKE_BUILD_TYPE=Release" + - "-DCMAKE_INSTALL_MESSAGE=LAZY" + LIB_NAME: "simdjson" + TARBALL_SHA256: "afd8201cfb1abe927737d876441bb1f21730a9ee6078a1b8c6174e6463981fa3" + TARBALL_URL: "https://github.com/simdjson/simdjson/archive/refs/tags/v3.6.3.tar.gz" sqlite3: internal: true From 9aae9e1b88308d28e103a12ba6a63b9278d6eadf Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 13:24:40 -0400 Subject: [PATCH 13/35] build(deps): Migrate yaml-cpp installation from submodule to task. --- .gitmodules | 3 -- components/core/CMakeLists.txt | 8 +++-- .../core/src/clp/GlobalMetadataDBConfig.cpp | 2 +- components/core/src/clp/clg/CMakeLists.txt | 2 +- components/core/src/clp/clp/CMakeLists.txt | 2 +- components/core/src/clp_s/CMakeLists.txt | 2 +- .../core/src/clp_s/indexer/CMakeLists.txt | 2 +- .../core/src/glt/GlobalMetadataDBConfig.cpp | 2 +- components/core/src/glt/glt/CMakeLists.txt | 2 +- components/core/submodules/yaml-cpp | 1 - taskfiles/deps/main.yaml | 34 +++++-------------- 11 files changed, 21 insertions(+), 39 deletions(-) delete mode 160000 components/core/submodules/yaml-cpp diff --git a/.gitmodules b/.gitmodules index 450f4ac3cb..a101887c76 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "components/core/submodules/yaml-cpp"] - path = components/core/submodules/yaml-cpp - url = https://github.com/jbeder/yaml-cpp.git [submodule "components/core/submodules/log-surgeon"] path = components/core/submodules/log-surgeon url = https://github.com/y-scope/log-surgeon.git diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index 6bb0d958cd..13f6c7d5a7 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -256,8 +256,10 @@ endif() find_package(Threads REQUIRED) -# Add yaml-cpp -add_subdirectory(submodules/yaml-cpp EXCLUDE_FROM_ALL) +find_package(yaml-cpp REQUIRED) +if(yaml-cpp_FOUND) + message(STATUS "Found yaml-cpp ${yaml-cpp_VERSION}") +endif() # Add ystdlib-cpp set(YSTDLIB_CPP_BUILD_TESTING OFF) @@ -702,7 +704,7 @@ target_link_libraries(unitTest ${STD_FS_LIBS} clp::regex_utils clp::string_utils - yaml-cpp::yaml-cpp + yaml-cpp ystdlib::containers ystdlib::error_handling ${LIBLZMA_LIBRARIES} diff --git a/components/core/src/clp/GlobalMetadataDBConfig.cpp b/components/core/src/clp/GlobalMetadataDBConfig.cpp index dcebece9ca..833c72d6df 100644 --- a/components/core/src/clp/GlobalMetadataDBConfig.cpp +++ b/components/core/src/clp/GlobalMetadataDBConfig.cpp @@ -1,7 +1,7 @@ #include "GlobalMetadataDBConfig.hpp" #include -#include +#include using std::exception; using std::invalid_argument; diff --git a/components/core/src/clp/clg/CMakeLists.txt b/components/core/src/clp/clg/CMakeLists.txt index 5f7d1ba910..caf48b6f77 100644 --- a/components/core/src/clp/clg/CMakeLists.txt +++ b/components/core/src/clp/clg/CMakeLists.txt @@ -145,7 +145,7 @@ target_link_libraries(clg ${sqlite_LIBRARY_DEPENDENCIES} ${STD_FS_LIBS} clp::string_utils - yaml-cpp::yaml-cpp + yaml-cpp ystdlib::containers ZStd::ZStd ) diff --git a/components/core/src/clp/clp/CMakeLists.txt b/components/core/src/clp/clp/CMakeLists.txt index 177c85ce12..38c36057b3 100644 --- a/components/core/src/clp/clp/CMakeLists.txt +++ b/components/core/src/clp/clp/CMakeLists.txt @@ -187,7 +187,7 @@ target_link_libraries(clp nlohmann_json::nlohmann_json ${STD_FS_LIBS} clp::string_utils - yaml-cpp::yaml-cpp + yaml-cpp ystdlib::containers ZStd::ZStd ) diff --git a/components/core/src/clp_s/CMakeLists.txt b/components/core/src/clp_s/CMakeLists.txt index b442002080..240e53b91a 100644 --- a/components/core/src/clp_s/CMakeLists.txt +++ b/components/core/src/clp_s/CMakeLists.txt @@ -239,7 +239,7 @@ target_link_libraries( OpenSSL::Crypto simdjson::simdjson spdlog::spdlog - yaml-cpp::yaml-cpp + yaml-cpp ystdlib::containers ZStd::ZStd ) diff --git a/components/core/src/clp_s/indexer/CMakeLists.txt b/components/core/src/clp_s/indexer/CMakeLists.txt index a3ffb082da..555a54a16d 100644 --- a/components/core/src/clp_s/indexer/CMakeLists.txt +++ b/components/core/src/clp_s/indexer/CMakeLists.txt @@ -94,7 +94,7 @@ target_link_libraries(indexer OpenSSL::Crypto simdjson::simdjson spdlog::spdlog - yaml-cpp::yaml-cpp + yaml-cpp ystdlib::containers ZStd::ZStd ) diff --git a/components/core/src/glt/GlobalMetadataDBConfig.cpp b/components/core/src/glt/GlobalMetadataDBConfig.cpp index d8de7c25df..460b36b239 100644 --- a/components/core/src/glt/GlobalMetadataDBConfig.cpp +++ b/components/core/src/glt/GlobalMetadataDBConfig.cpp @@ -1,7 +1,7 @@ #include "GlobalMetadataDBConfig.hpp" #include -#include +#include using std::exception; using std::invalid_argument; diff --git a/components/core/src/glt/glt/CMakeLists.txt b/components/core/src/glt/glt/CMakeLists.txt index e236351f94..28408d8903 100644 --- a/components/core/src/glt/glt/CMakeLists.txt +++ b/components/core/src/glt/glt/CMakeLists.txt @@ -192,7 +192,7 @@ target_link_libraries(glt nlohmann_json::nlohmann_json ${STD_FS_LIBS} clp::string_utils - yaml-cpp::yaml-cpp + yaml-cpp ZStd::ZStd ) # Put the built executable at the root of the build directory diff --git a/components/core/submodules/yaml-cpp b/components/core/submodules/yaml-cpp deleted file mode 160000 index 0579ae3d97..0000000000 --- a/components/core/submodules/yaml-cpp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0579ae3d976091d7d664aa9d2527e0d0cff25763 diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index 99ea20cf8a..00efc544e0 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -280,33 +280,17 @@ tasks: yaml-cpp: internal: true - vars: - CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/yaml-cpp.md5" - DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/yaml-cpp" - sources: - - "{{.G_DEP_DOWNLOAD_SCRIPT}}" - - "{{.G_UTILS_TASKFILE}}" - - "{{.ROOT_DIR}}/taskfile.yaml" - - "{{.TASKFILE}}" - generates: ["{{.CHECKSUM_FILE}}"] - deps: - - "utils:init" - - task: ":utils:checksum:validate" - vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + run: "once" cmds: - - task: "download-dependency" - vars: - DEST: "{{.DEST}}" - FLAGS: "--extract" - SRC_NAME: "yaml-cpp-yaml-cpp-0.7.0" - SRC_URL: "https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.7.0.zip" - # This command must be last - - task: ":utils:checksum:compute" + - task: "utils:install-remote-cmake-lib" vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + CMAKE_GEN_ARGS: + - "-DBUILD_TESTING=OFF" + - "-DCMAKE_BUILD_TYPE=Release" + - "-DCMAKE_INSTALL_MESSAGE=LAZY" + LIB_NAME: "yaml-cpp" + TARBALL_SHA256: "43e6a9fcb146ad871515f0d0873947e5d497a1c9c60c58cb102a97b47208b7c3" + TARBALL_URL: "https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.7.0.tar.gz" ystdlib-cpp: internal: true From 689033881ce4b6947bea1f109e2c2ffc8095924f Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 13:28:10 -0400 Subject: [PATCH 14/35] build(deps): Migrate log-surgeon installation from submodule to task. --- .gitmodules | 3 --- components/core/CMakeLists.txt | 8 ++++--- components/core/submodules/log-surgeon | 1 - taskfiles/deps/main.yaml | 33 +++++++------------------- 4 files changed, 13 insertions(+), 32 deletions(-) delete mode 160000 components/core/submodules/log-surgeon diff --git a/.gitmodules b/.gitmodules index a101887c76..14a1e3d13e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "components/core/submodules/log-surgeon"] - path = components/core/submodules/log-surgeon - url = https://github.com/y-scope/log-surgeon.git [submodule "tools/yscope-dev-utils"] path = tools/yscope-dev-utils url = https://github.com/y-scope/yscope-dev-utils.git diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index 13f6c7d5a7..f632c3d0c1 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -159,6 +159,11 @@ else() message(FATAL_ERROR "Could not find static libraries for fmt") endif() +find_package(log_surgeon REQUIRED) +if(log_surgeon_FOUND) + message(STATUS "Found log_surgeon ${log_surgeon_VERSION}") +endif() + find_package(nlohmann_json REQUIRED) if(nlohmann_json_FOUND) message(STATUS "Found nlohmann_json ${nlohmann_json_VERSION}") @@ -217,9 +222,6 @@ else () message(FATAL_ERROR "OpenSSL not found") endif () -# Add log surgeon -add_subdirectory(submodules/log-surgeon EXCLUDE_FROM_ALL) - # Find and setup MariaDBClient library if(CLP_USE_STATIC_LIBS) # NOTE: We can't statically link to MariaDBClient since it's GPL diff --git a/components/core/submodules/log-surgeon b/components/core/submodules/log-surgeon deleted file mode 160000 index f801a3f369..0000000000 --- a/components/core/submodules/log-surgeon +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f801a3f369bb14919d82a928d9a3812006245aa0 diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index 00efc544e0..650ce65f09 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -159,33 +159,16 @@ tasks: log-surgeon: internal: true - vars: - CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/log-surgeon.md5" - DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/log-surgeon" - sources: - - "{{.G_DEP_DOWNLOAD_SCRIPT}}" - - "{{.G_UTILS_TASKFILE}}" - - "{{.ROOT_DIR}}/taskfile.yaml" - - "{{.TASKFILE}}" - generates: ["{{.CHECKSUM_FILE}}"] - deps: - - "utils:init" - - task: ":utils:checksum:validate" - vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + run: "once" cmds: - - task: "download-dependency" - vars: - DEST: "{{.DEST}}" - FLAGS: "--extract" - SRC_NAME: "log-surgeon-f801a3f369bb14919d82a928d9a3812006245aa0" - SRC_URL: "https://github.com/y-scope/log-surgeon/archive/f801a3f.zip" - # This command must be last - - task: ":utils:checksum:compute" + - task: "utils:install-remote-cmake-lib" vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + CMAKE_GEN_ARGS: + - "-DCMAKE_BUILD_TYPE=Release" + - "-DCMAKE_INSTALL_MESSAGE=LAZY" + LIB_NAME: "log_surgeon" + TARBALL_SHA256: "169b56714b620c3f8f07bf7975aba8573b9bd25e423e5c4f0cc9b52450a2403d" + TARBALL_URL: "https://github.com/y-scope/log-surgeon/archive/f801a3f.tar.gz" nlohmann_json: internal: true From 483565a7aa120e4d0cf68d7bf7a99ecfc96f87e3 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 13:35:37 -0400 Subject: [PATCH 15/35] build(deps): Migrate ystdlib-cpp installation from submodule to task; Rename ystdlib-cpp task to ystdlib. --- .gitmodules | 3 -- components/core/CMakeLists.txt | 4 +-- components/core/submodules/ystdlib-cpp | 1 - taskfiles/deps/main.yaml | 40 ++++++++++---------------- 4 files changed, 17 insertions(+), 31 deletions(-) delete mode 160000 components/core/submodules/ystdlib-cpp diff --git a/.gitmodules b/.gitmodules index 14a1e3d13e..2d96d0d8ed 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ [submodule "tools/yscope-dev-utils"] path = tools/yscope-dev-utils url = https://github.com/y-scope/yscope-dev-utils.git -[submodule "components/core/submodules/ystdlib-cpp"] - path = components/core/submodules/ystdlib-cpp - url = https://github.com/y-scope/ystdlib-cpp.git diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index f632c3d0c1..490b71a3fb 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -263,9 +263,9 @@ if(yaml-cpp_FOUND) message(STATUS "Found yaml-cpp ${yaml-cpp_VERSION}") endif() -# Add ystdlib-cpp +# Add ystdlib set(YSTDLIB_CPP_BUILD_TESTING OFF) -add_subdirectory(submodules/ystdlib-cpp EXCLUDE_FROM_ALL) +add_subdirectory("${CLP_YSTDLIB_SOURCE_DIRECTORY}" "${CMAKE_BINARY_DIR}/ystdlib" EXCLUDE_FROM_ALL) # Find and setup ZStd Library if(CLP_USE_STATIC_LIBS) diff --git a/components/core/submodules/ystdlib-cpp b/components/core/submodules/ystdlib-cpp deleted file mode 160000 index 2ac17579d1..0000000000 --- a/components/core/submodules/ystdlib-cpp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2ac17579d12c48e2f45d4688a10bcabb5becb466 diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index 650ce65f09..a526a31917 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -80,7 +80,7 @@ tasks: - task: "sqlite3" - task: "utfcpp" - task: "yaml-cpp" - - task: "ystdlib-cpp" + - task: "ystdlib" absl: internal: true @@ -275,35 +275,25 @@ tasks: TARBALL_SHA256: "43e6a9fcb146ad871515f0d0873947e5d497a1c9c60c58cb102a97b47208b7c3" TARBALL_URL: "https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.7.0.tar.gz" - ystdlib-cpp: + ystdlib: internal: true vars: - CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/ystdlib-cpp.md5" - DEST: "{{.G_CORE_COMPONENT_SUBMODULES_DIR}}/ystdlib-cpp" - sources: - - "{{.G_DEP_DOWNLOAD_SCRIPT}}" - - "{{.G_UTILS_TASKFILE}}" - - "{{.ROOT_DIR}}/taskfile.yaml" - - "{{.TASKFILE}}" - generates: ["{{.CHECKSUM_FILE}}"] + LIB_NAME: "ystdlib" + YSTDLIB_OUTPUT_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-src" + run: "once" deps: - - "utils:init" - - task: ":utils:checksum:validate" - vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + - task: "utils:init" cmds: - - task: "download-dependency" - vars: - DEST: "{{.DEST}}" - FLAGS: "--extract" - SRC_NAME: "ystdlib-cpp-2ac17579d12c48e2f45d4688a10bcabb5becb466" - SRC_URL: "https://github.com/y-scope/ystdlib-cpp/archive/2ac1757.zip" - # This command must be last - - task: ":utils:checksum:compute" + - task: "yscope-dev-utils:remote:download-and-extract-tar" vars: - CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" - INCLUDE_PATTERNS: ["{{.DEST}}"] + CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/{{.LIB_NAME}}.md5" + FILE_SHA256: "d47c703c0d1c5e755c1bfb984b68c85967683a09dadbe23772d9eb69f822d040" + OUTPUT_DIR: "{{.YSTDLIB_OUTPUT_DIR}}" + URL: "https://github.com/y-scope/ystdlib-cpp/archive/2ac1757.tar.gz" + - >- + echo "set( + CLP_YSTDLIB_SOURCE_DIRECTORY \"{{.YSTDLIB_OUTPUT_DIR}}\" + )" > "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" download-dependency: From 8b1acc4a6050cb759d6c2ff8bb697fa772e7b37d Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 13:36:54 -0400 Subject: [PATCH 16/35] Remove obsolete download-dependency task. --- taskfiles/deps/main.yaml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index a526a31917..e758a8b446 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -18,9 +18,6 @@ vars: G_DEPS_CORE_CMAKE_SETTINGS_DIR: "{{.G_DEPS_CORE_DIR}}/cmake-settings" G_DEPS_CORE_CMAKE_SETTINGS_FILE: "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/all.cmake" - # Utility script path - G_DEP_DOWNLOAD_SCRIPT: "{{.ROOT_DIR}}/tools/scripts/deps-download/download-dep.py" - tasks: default: deps: @@ -294,19 +291,3 @@ tasks: echo "set( CLP_YSTDLIB_SOURCE_DIRECTORY \"{{.YSTDLIB_OUTPUT_DIR}}\" )" > "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" - - - download-dependency: - internal: true - label: "{{.TASK}}-{{.SRC_NAME}}" - requires: - vars: ["DEST", "FLAGS", "SRC_NAME", "SRC_URL"] - deps: - - "utils:init" - cmds: - - >- - python3 "{{.G_DEP_DOWNLOAD_SCRIPT}}" - "{{.SRC_URL}}" - {{.SRC_NAME}} - "{{.DEST}}" - {{.FLAGS}} From 598a8c240fbb528184507b91eda9f51b9fdda3cf Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 13:40:52 -0400 Subject: [PATCH 17/35] Parallelize task-based core dependencies installation; Rename all-internal-deps task to core-all-parallel; Remove obsolete comment about submodule download parallelization. --- taskfiles/deps/main.yaml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index e758a8b446..e905d50980 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -34,7 +34,7 @@ tasks: - task: "yscope-dev-utils:cmake:install-deps-and-generate-settings" vars: CMAKE_SETTINGS_DIR: "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}" - DEP_TASK: "all-internal-deps" + DEP_TASK: "core-all-parallel" - task: "utils:combine-core-checksum-files" log-viewer: @@ -49,23 +49,10 @@ tasks: TAR_FILE: "{{.G_BUILD_DIR}}/yscope-log-viewer.tar.gz" URL: "https://github.com/y-scope/yscope-log-viewer/archive/969ff35.tar.gz" - # NOTE: `git submodule update` doesn't support parallel invocations, so we can't use it to - # download submodules in parallel. This means: - # 1. the submodule tasks cannot be specified as a list of `deps`, because `task` always runs - # `deps` tasks in parallel. - # 2. we need to force higher level tasks, like `core` and `log-viewer`, to run their submodule - # download tasks serially. - # - # As a solution, the `all-internal-deps` task below: - # 1. uses `cmds` to sequentially download `ALL` submodules required by the clp-package. - # 2. uses `run: once`, so it executes once even if multiple higher level targets depend on it. - # - # All higher level tasks must depend on this task instead of depending on the individual - # submodule tasks in this file. - all-internal-deps: + core-all-parallel: internal: true run: "once" - cmds: + deps: - task: "absl" - task: "antlr" - task: "catch2" From 1ee03604771eb69d50418d9550db18f80cf88532 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 13:41:54 -0400 Subject: [PATCH 18/35] Make install-remote-cmake-lib task depend on init so directories are created before checksums. --- taskfiles/deps/utils.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/taskfiles/deps/utils.yaml b/taskfiles/deps/utils.yaml index 6815042ba0..98af099c15 100644 --- a/taskfiles/deps/utils.yaml +++ b/taskfiles/deps/utils.yaml @@ -53,6 +53,7 @@ tasks: INSTALL_PREFIX: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-install" INSTALL_DIR_CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/{{.LIB_NAME}}.md5" deps: + - task: "init" - task: "yscope-dev-utils:checksum:validate" vars: CHECKSUM_FILE: "{{.INSTALL_DIR_CHECKSUM_FILE}}" From bd2e81f0eacb022d8f77b6e590e9b809d5fdd8ce Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 13:46:40 -0400 Subject: [PATCH 19/35] Add new taskfile to GH workflow deps and YAML linting. --- .github/workflows/clp-core-build-macos.yaml | 4 ++-- .github/workflows/clp-core-build.yaml | 6 +++--- taskfiles/lint.yaml | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/clp-core-build-macos.yaml b/.github/workflows/clp-core-build-macos.yaml index 48139d5f5c..5d42a0f51b 100644 --- a/.github/workflows/clp-core-build-macos.yaml +++ b/.github/workflows/clp-core-build-macos.yaml @@ -13,7 +13,7 @@ on: - "components/core/tools/scripts/deps-download/**" - "components/core/tools/scripts/utils/build-and-run-unit-tests.py" - "taskfile.yaml" - - "taskfiles/deps/main.yaml" + - "taskfiles/**" - "tools/scripts/deps-download/**" push: paths: @@ -27,7 +27,7 @@ on: - "components/core/tools/scripts/deps-download/**" - "components/core/tools/scripts/utils/build-and-run-unit-tests.py" - "taskfile.yaml" - - "taskfiles/deps/main.yaml" + - "taskfiles/**" - "tools/scripts/deps-download/**" schedule: # Run daily at 00:15 UTC (the 15 is to avoid periods of high load) diff --git a/.github/workflows/clp-core-build.yaml b/.github/workflows/clp-core-build.yaml index 6147b96c93..71c371156b 100644 --- a/.github/workflows/clp-core-build.yaml +++ b/.github/workflows/clp-core-build.yaml @@ -9,7 +9,7 @@ on: - ".gitmodules" - "components/core/**" - "taskfile.yaml" - - "taskfiles/deps/main.yaml" + - "taskfiles/**" - "tools/scripts/deps-download/**" - "!components/core/tools/scripts/lib_install/macos/**" push: @@ -20,7 +20,7 @@ on: - ".gitmodules" - "components/core/**" - "taskfile.yaml" - - "taskfiles/deps/main.yaml" + - "taskfiles/**" - "tools/scripts/deps-download/**" - "!components/core/tools/scripts/lib_install/macos/**" schedule: @@ -88,7 +88,7 @@ jobs: - "components/core/tests/**" - "components/core/tools/scripts/utils/build-and-run-unit-tests.py" - "taskfile.yaml" - - "taskfiles/deps/main.yaml" + - "taskfiles/**" - "tools/scripts/deps-download/**" centos-stream-9-deps-image: diff --git a/taskfiles/lint.yaml b/taskfiles/lint.yaml index fe1955fc21..bc5c7fe636 100644 --- a/taskfiles/lint.yaml +++ b/taskfiles/lint.yaml @@ -118,8 +118,7 @@ tasks: components/package-template/src/etc \ docs \ taskfile.yaml \ - taskfiles/deps/main.yaml \ - taskfiles/lint.yaml + taskfiles check-cpp-format: sources: &cpp_source_files From 3662dffe1145c0c51d06349623d11e4ce7d8a1a9 Mon Sep 17 00:00:00 2001 From: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 20:31:09 -0400 Subject: [PATCH 20/35] Apply suggestions from code review Co-authored-by: Lin Zhihao <59785146+LinZhihao-723@users.noreply.github.com> --- components/core/CMakeLists.txt | 4 ++-- components/core/src/clp_s/CMakeLists.txt | 2 +- taskfiles/deps/utils.yaml | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index 490b71a3fb..2935176155 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -98,8 +98,8 @@ endif () if(PROJECT_IS_TOP_LEVEL) # Include dependency settings if the project isn't being included as a subproject. - # NOTE: We mark the file optional because if the user happens to have the dependencies - # installed, this file isn't necessary. + # NOTE: We mark the file optional because this file is not required if the user happens to have + # the dependencies installed already. include("${CMAKE_SOURCE_DIR}/../../build/deps/core/cmake-settings/all.cmake" OPTIONAL RESULT_VARIABLE CLP_DEPS_SETTINGS_FILE_PATH diff --git a/components/core/src/clp_s/CMakeLists.txt b/components/core/src/clp_s/CMakeLists.txt index 240e53b91a..17c0f81adb 100644 --- a/components/core/src/clp_s/CMakeLists.txt +++ b/components/core/src/clp_s/CMakeLists.txt @@ -234,8 +234,8 @@ target_link_libraries( kql MariaDBClient::MariaDBClient ${MONGOCXX_TARGET} - nlohmann_json::nlohmann_json msgpack-cxx + nlohmann_json::nlohmann_json OpenSSL::Crypto simdjson::simdjson spdlog::spdlog diff --git a/taskfiles/deps/utils.yaml b/taskfiles/deps/utils.yaml index 98af099c15..cd990a0f9f 100644 --- a/taskfiles/deps/utils.yaml +++ b/taskfiles/deps/utils.yaml @@ -17,6 +17,8 @@ tasks: - "{{.ROOT_DIR}}/tools/yscope-dev-utils/exports/taskfiles/**/*.yaml" cmd: "rm -f '{{.G_DEPS_CORE_CHECKSUMS_DIR}}'/*" + # Generates the combined checksum file `G_DEPS_CORE_CHECKSUM_FILE` by concatenating all the core + # checksum files. combine-core-checksum-files: internal: true cmds: @@ -37,8 +39,8 @@ tasks: - "mkdir -p '{{.G_DEPS_CORE_CHECKSUMS_DIR}}'" - "mkdir -p '{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}'" - # Installs a CMake-based library from a remote tarball, generates a settings file for it, and - # computes a checksum for the installation directory. + # Installs a CMake-based library from a remote tarball, generates a corresponding settings file, + # and computes a checksum for the installation directory. # # @param {string} LIB_NAME # @param {string} TARBALL_SHA256 From a1eff8acf55d670ea3177c536dae82d4b9a515cb Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 20:37:45 -0400 Subject: [PATCH 21/35] taskfiles/deps/utils.yaml: Fix lint violation. --- taskfiles/deps/utils.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskfiles/deps/utils.yaml b/taskfiles/deps/utils.yaml index cd990a0f9f..cf7c4e977a 100644 --- a/taskfiles/deps/utils.yaml +++ b/taskfiles/deps/utils.yaml @@ -39,7 +39,7 @@ tasks: - "mkdir -p '{{.G_DEPS_CORE_CHECKSUMS_DIR}}'" - "mkdir -p '{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}'" - # Installs a CMake-based library from a remote tarball, generates a corresponding settings file, + # Installs a CMake-based library from a remote tarball, generates a corresponding settings file, # and computes a checksum for the installation directory. # # @param {string} LIB_NAME From 5d24ee5e1851ce539a463451c9748e15e5334897 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 20:38:34 -0400 Subject: [PATCH 22/35] Rename clean-old-core-checksum-files to clean-outdated-core-checksum-files. --- taskfiles/deps/main.yaml | 2 +- taskfiles/deps/utils.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index e905d50980..2ae77f56ea 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -26,7 +26,7 @@ tasks: core: deps: - - "utils:clean-old-core-checksum-files" + - "utils:clean-outdated-core-checksum-files" - "utils:init" cmds: - "rm -rf '{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}'" diff --git a/taskfiles/deps/utils.yaml b/taskfiles/deps/utils.yaml index cf7c4e977a..154ae5faba 100644 --- a/taskfiles/deps/utils.yaml +++ b/taskfiles/deps/utils.yaml @@ -8,7 +8,7 @@ tasks: # of core's dependencies are removed from the taskfiles, then the checksum files for the removed # dependencies will also be removed. Since we can't easily remove just the checksum files for the # removed dependencies, we remove all of them. - clean-old-core-checksum-files: + clean-outdated-core-checksum-files: internal: true run: "once" sources: From 152fb8a694a11a1cf71894fae0f46de874ddcc52 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 20:40:37 -0400 Subject: [PATCH 23/35] Edit code review suggestions. --- components/core/CMakeLists.txt | 4 ++-- taskfiles/deps/utils.yaml | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index 2935176155..2172226c3d 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -98,8 +98,8 @@ endif () if(PROJECT_IS_TOP_LEVEL) # Include dependency settings if the project isn't being included as a subproject. - # NOTE: We mark the file optional because this file is not required if the user happens to have - # the dependencies installed already. + # NOTE: We mark the file optional since it's not required if the user happens to have the + # dependencies installed already. include("${CMAKE_SOURCE_DIR}/../../build/deps/core/cmake-settings/all.cmake" OPTIONAL RESULT_VARIABLE CLP_DEPS_SETTINGS_FILE_PATH diff --git a/taskfiles/deps/utils.yaml b/taskfiles/deps/utils.yaml index 154ae5faba..89287acbba 100644 --- a/taskfiles/deps/utils.yaml +++ b/taskfiles/deps/utils.yaml @@ -17,8 +17,7 @@ tasks: - "{{.ROOT_DIR}}/tools/yscope-dev-utils/exports/taskfiles/**/*.yaml" cmd: "rm -f '{{.G_DEPS_CORE_CHECKSUMS_DIR}}'/*" - # Generates the combined checksum file `G_DEPS_CORE_CHECKSUM_FILE` by concatenating all the core - # checksum files. + # Combines all of core's checksum files into `G_DEPS_CORE_CHECKSUM_FILE`. combine-core-checksum-files: internal: true cmds: From c955274457f3c209f4d4d48e291c179355c55586 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 21:00:32 -0400 Subject: [PATCH 24/35] Remove unused G_DEPS_CORE_CMAKE_SETTINGS_FILE. --- taskfiles/deps/main.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index 2ae77f56ea..ad63b2fc16 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -14,9 +14,8 @@ vars: G_DEPS_CORE_CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/all.md5" G_DEPS_LOG_VIEWER_CHECKSUM_FILE: "{{.G_DEPS_DIR}}/log-viewer.md5" - # NOTE: These must be kept in-sync with their usage in components/core/CMakeLists.txt + # NOTE: This must be kept in-sync with its usage in components/core/CMakeLists.txt G_DEPS_CORE_CMAKE_SETTINGS_DIR: "{{.G_DEPS_CORE_DIR}}/cmake-settings" - G_DEPS_CORE_CMAKE_SETTINGS_FILE: "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/all.cmake" tasks: default: From 59b7a8e14677abcbcdc9f97e6507fd34b806a0d5 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sat, 26 Apr 2025 21:15:25 -0400 Subject: [PATCH 25/35] Remove obsolete CMake include references to submodules directory. --- components/core/CMakeLists.txt | 1 - components/core/src/clp/clg/CMakeLists.txt | 1 - components/core/src/clp/clo/CMakeLists.txt | 1 - components/core/src/clp/clp/CMakeLists.txt | 1 - .../core/src/clp/make_dictionaries_readable/CMakeLists.txt | 1 - components/core/src/clp/regex_utils/CMakeLists.txt | 1 - components/core/src/clp_s/CMakeLists.txt | 2 -- components/core/src/clp_s/indexer/CMakeLists.txt | 1 - components/core/src/clp_s/search/ast/CMakeLists.txt | 1 - components/core/src/glt/glt/CMakeLists.txt | 1 - components/core/src/reducer/CMakeLists.txt | 1 - 11 files changed, 12 deletions(-) diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index 2172226c3d..81ce0d4de3 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -680,7 +680,6 @@ target_include_directories(unitTest PRIVATE ${CLP_OUTCOME_SOURCE_DIRECTORY} ${CLP_SQLITE3_SOURCE_DIRECTORY} - ${CMAKE_SOURCE_DIR}/submodules ) target_link_libraries(unitTest PRIVATE diff --git a/components/core/src/clp/clg/CMakeLists.txt b/components/core/src/clp/clg/CMakeLists.txt index caf48b6f77..3838d955de 100644 --- a/components/core/src/clp/clg/CMakeLists.txt +++ b/components/core/src/clp/clg/CMakeLists.txt @@ -131,7 +131,6 @@ target_include_directories(clg PRIVATE "${CLP_OUTCOME_SOURCE_DIRECTORY}" "${CLP_SQLITE3_SOURCE_DIRECTORY}" - "${PROJECT_SOURCE_DIR}/submodules" ) target_link_libraries(clg PRIVATE diff --git a/components/core/src/clp/clo/CMakeLists.txt b/components/core/src/clp/clo/CMakeLists.txt index e96a175e4a..c0be6eecaf 100644 --- a/components/core/src/clp/clo/CMakeLists.txt +++ b/components/core/src/clp/clo/CMakeLists.txt @@ -159,7 +159,6 @@ target_include_directories(clo PRIVATE "${CLP_OUTCOME_SOURCE_DIRECTORY}" "${CLP_SQLITE3_SOURCE_DIRECTORY}" - "${PROJECT_SOURCE_DIR}/submodules" ) target_link_libraries(clo PRIVATE diff --git a/components/core/src/clp/clp/CMakeLists.txt b/components/core/src/clp/clp/CMakeLists.txt index 38c36057b3..6584395e0a 100644 --- a/components/core/src/clp/clp/CMakeLists.txt +++ b/components/core/src/clp/clp/CMakeLists.txt @@ -172,7 +172,6 @@ target_include_directories(clp PRIVATE "${CLP_OUTCOME_SOURCE_DIRECTORY}" "${CLP_SQLITE3_SOURCE_DIRECTORY}" - "${PROJECT_SOURCE_DIR}/submodules" ) target_link_libraries(clp PRIVATE diff --git a/components/core/src/clp/make_dictionaries_readable/CMakeLists.txt b/components/core/src/clp/make_dictionaries_readable/CMakeLists.txt index 30c053e39b..01154bba7d 100644 --- a/components/core/src/clp/make_dictionaries_readable/CMakeLists.txt +++ b/components/core/src/clp/make_dictionaries_readable/CMakeLists.txt @@ -41,7 +41,6 @@ set( add_executable(make-dictionaries-readable ${MAKE_DICTIONARIES_READABLE_SOURCES}) target_compile_features(make-dictionaries-readable PRIVATE cxx_std_20) -target_include_directories(make-dictionaries-readable PRIVATE "${PROJECT_SOURCE_DIR}/submodules") target_link_libraries(make-dictionaries-readable PRIVATE Boost::filesystem Boost::program_options diff --git a/components/core/src/clp/regex_utils/CMakeLists.txt b/components/core/src/clp/regex_utils/CMakeLists.txt index d905822944..610ea450df 100644 --- a/components/core/src/clp/regex_utils/CMakeLists.txt +++ b/components/core/src/clp/regex_utils/CMakeLists.txt @@ -16,7 +16,6 @@ target_include_directories(regex_utils PUBLIC ../ "${CLP_OUTCOME_SOURCE_DIRECTORY}" - "${PROJECT_SOURCE_DIR}/submodules" ) target_link_libraries(regex_utils PUBLIC diff --git a/components/core/src/clp_s/CMakeLists.txt b/components/core/src/clp_s/CMakeLists.txt index 17c0f81adb..e2222a53c0 100644 --- a/components/core/src/clp_s/CMakeLists.txt +++ b/components/core/src/clp_s/CMakeLists.txt @@ -204,7 +204,6 @@ add_library( ${CLP_S_TIMESTAMP_PATTERN_SOURCES} ) add_library(clp_s::TimestampPattern ALIAS clp_s_TimestampPattern) -target_include_directories(clp_s_TimestampPattern PRIVATE "${PROJECT_SOURCE_DIR}/submodules") target_compile_features(clp_s_TimestampPattern PRIVATE cxx_std_20) target_link_libraries( clp_s_TimestampPattern @@ -246,7 +245,6 @@ target_link_libraries( target_include_directories(clp-s PRIVATE "${CLP_OUTCOME_SOURCE_DIRECTORY}" - "${PROJECT_SOURCE_DIR}/submodules" ) set_target_properties( clp-s diff --git a/components/core/src/clp_s/indexer/CMakeLists.txt b/components/core/src/clp_s/indexer/CMakeLists.txt index 555a54a16d..98fefeaff7 100644 --- a/components/core/src/clp_s/indexer/CMakeLists.txt +++ b/components/core/src/clp_s/indexer/CMakeLists.txt @@ -82,7 +82,6 @@ set( add_executable(indexer ${INDEXER_SOURCES}) target_compile_features(indexer PRIVATE cxx_std_20) -target_include_directories(indexer PRIVATE "${PROJECT_SOURCE_DIR}/submodules") target_link_libraries(indexer PRIVATE absl::flat_hash_map diff --git a/components/core/src/clp_s/search/ast/CMakeLists.txt b/components/core/src/clp_s/search/ast/CMakeLists.txt index 7194d8b1f2..e46455f998 100644 --- a/components/core/src/clp_s/search/ast/CMakeLists.txt +++ b/components/core/src/clp_s/search/ast/CMakeLists.txt @@ -55,7 +55,6 @@ add_library( ${CLP_S_CORE_SOURCES} ) add_library(clp_s::search::ast ALIAS clp_s_search_ast) -target_include_directories(clp_s_search_ast PRIVATE "${PROJECT_SOURCE_DIR}/submodules") target_compile_features(clp_s_search_ast PRIVATE cxx_std_20) target_link_libraries( clp_s_search_ast diff --git a/components/core/src/glt/glt/CMakeLists.txt b/components/core/src/glt/glt/CMakeLists.txt index 28408d8903..8f95710415 100644 --- a/components/core/src/glt/glt/CMakeLists.txt +++ b/components/core/src/glt/glt/CMakeLists.txt @@ -178,7 +178,6 @@ target_include_directories(glt PRIVATE "${CLP_OUTCOME_SOURCE_DIRECTORY}" "${CLP_SQLITE3_SOURCE_DIRECTORY}" - "${PROJECT_SOURCE_DIR}/submodules" ) target_link_libraries(glt PRIVATE diff --git a/components/core/src/reducer/CMakeLists.txt b/components/core/src/reducer/CMakeLists.txt index 0de758abf0..72b4cf1a24 100644 --- a/components/core/src/reducer/CMakeLists.txt +++ b/components/core/src/reducer/CMakeLists.txt @@ -40,7 +40,6 @@ set( add_executable(reducer-server ${REDUCER_SOURCES}) target_compile_features(reducer-server PRIVATE cxx_std_20) -target_include_directories(reducer-server PRIVATE "${PROJECT_SOURCE_DIR}/submodules") target_link_libraries(reducer-server PRIVATE Boost::program_options From 3c87cba6602615f0c5c27ce15e55dd5d2d724328 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sun, 27 Apr 2025 06:01:22 -0400 Subject: [PATCH 26/35] Remove sqlite3ext.h. --- components/core/CMakeLists.txt | 1 - components/core/src/clp/clg/CMakeLists.txt | 1 - components/core/src/clp/clo/CMakeLists.txt | 1 - 3 files changed, 3 deletions(-) diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index 81ce0d4de3..0219b99028 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -413,7 +413,6 @@ set(SOURCE_FILES_reducer_unitTest set(SOURCE_FILES_unitTest "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.c" "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.h" - "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3ext.h" src/clp/aws/AwsAuthenticationSigner.cpp src/clp/aws/AwsAuthenticationSigner.hpp src/clp/aws/constants.hpp diff --git a/components/core/src/clp/clg/CMakeLists.txt b/components/core/src/clp/clg/CMakeLists.txt index 3838d955de..1ea8257fe0 100644 --- a/components/core/src/clp/clg/CMakeLists.txt +++ b/components/core/src/clp/clg/CMakeLists.txt @@ -119,7 +119,6 @@ set( ../WriterInterface.hpp "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.c" "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.h" - "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3ext.h" clg.cpp CommandLineArguments.cpp CommandLineArguments.hpp diff --git a/components/core/src/clp/clo/CMakeLists.txt b/components/core/src/clp/clo/CMakeLists.txt index c0be6eecaf..253f9837ba 100644 --- a/components/core/src/clp/clo/CMakeLists.txt +++ b/components/core/src/clp/clo/CMakeLists.txt @@ -121,7 +121,6 @@ set( ../WriterInterface.hpp "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.c" "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.h" - "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3ext.h" clo.cpp CommandLineArguments.cpp CommandLineArguments.hpp From f2790eb2ed23766e027ab766ad74ffeaf7d9c894 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sun, 27 Apr 2025 06:05:18 -0400 Subject: [PATCH 27/35] Rename CLP_XXX_SOURCE_DIRECTORY to CLP_XXX_INCLUDES_DIRECTORY for header-only libraries. --- components/core/CMakeLists.txt | 2 +- components/core/src/clp/clg/CMakeLists.txt | 2 +- components/core/src/clp/clo/CMakeLists.txt | 2 +- components/core/src/clp/clp/CMakeLists.txt | 2 +- components/core/src/clp/regex_utils/CMakeLists.txt | 2 +- components/core/src/clp_s/CMakeLists.txt | 2 +- components/core/src/glt/glt/CMakeLists.txt | 2 +- taskfiles/deps/main.yaml | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index 0219b99028..6ff251c372 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -677,7 +677,7 @@ add_executable(unitTest ) target_include_directories(unitTest PRIVATE - ${CLP_OUTCOME_SOURCE_DIRECTORY} + ${CLP_OUTCOME_INCLUDES_DIRECTORY} ${CLP_SQLITE3_SOURCE_DIRECTORY} ) target_link_libraries(unitTest diff --git a/components/core/src/clp/clg/CMakeLists.txt b/components/core/src/clp/clg/CMakeLists.txt index 1ea8257fe0..ef547144d1 100644 --- a/components/core/src/clp/clg/CMakeLists.txt +++ b/components/core/src/clp/clg/CMakeLists.txt @@ -128,7 +128,7 @@ add_executable(clg ${CLG_SOURCES}) target_compile_features(clg PRIVATE cxx_std_20) target_include_directories(clg PRIVATE - "${CLP_OUTCOME_SOURCE_DIRECTORY}" + "${CLP_OUTCOME_INCLUDES_DIRECTORY}" "${CLP_SQLITE3_SOURCE_DIRECTORY}" ) target_link_libraries(clg diff --git a/components/core/src/clp/clo/CMakeLists.txt b/components/core/src/clp/clo/CMakeLists.txt index 253f9837ba..f49ecbce9b 100644 --- a/components/core/src/clp/clo/CMakeLists.txt +++ b/components/core/src/clp/clo/CMakeLists.txt @@ -156,7 +156,7 @@ add_executable(clo ${CLO_SOURCES} ${REDUCER_SOURCES}) target_compile_features(clo PRIVATE cxx_std_20) target_include_directories(clo PRIVATE - "${CLP_OUTCOME_SOURCE_DIRECTORY}" + "${CLP_OUTCOME_INCLUDES_DIRECTORY}" "${CLP_SQLITE3_SOURCE_DIRECTORY}" ) target_link_libraries(clo diff --git a/components/core/src/clp/clp/CMakeLists.txt b/components/core/src/clp/clp/CMakeLists.txt index 6584395e0a..789a21dda8 100644 --- a/components/core/src/clp/clp/CMakeLists.txt +++ b/components/core/src/clp/clp/CMakeLists.txt @@ -170,7 +170,7 @@ add_executable(clp ${CLP_SOURCES}) target_compile_features(clp PRIVATE cxx_std_20) target_include_directories(clp PRIVATE - "${CLP_OUTCOME_SOURCE_DIRECTORY}" + "${CLP_OUTCOME_INCLUDES_DIRECTORY}" "${CLP_SQLITE3_SOURCE_DIRECTORY}" ) target_link_libraries(clp diff --git a/components/core/src/clp/regex_utils/CMakeLists.txt b/components/core/src/clp/regex_utils/CMakeLists.txt index 610ea450df..611d2376d6 100644 --- a/components/core/src/clp/regex_utils/CMakeLists.txt +++ b/components/core/src/clp/regex_utils/CMakeLists.txt @@ -15,7 +15,7 @@ add_library(clp::regex_utils ALIAS regex_utils) target_include_directories(regex_utils PUBLIC ../ - "${CLP_OUTCOME_SOURCE_DIRECTORY}" + "${CLP_OUTCOME_INCLUDES_DIRECTORY}" ) target_link_libraries(regex_utils PUBLIC diff --git a/components/core/src/clp_s/CMakeLists.txt b/components/core/src/clp_s/CMakeLists.txt index e2222a53c0..cd14510f3f 100644 --- a/components/core/src/clp_s/CMakeLists.txt +++ b/components/core/src/clp_s/CMakeLists.txt @@ -244,7 +244,7 @@ target_link_libraries( ) target_include_directories(clp-s PRIVATE - "${CLP_OUTCOME_SOURCE_DIRECTORY}" + "${CLP_OUTCOME_INCLUDES_DIRECTORY}" ) set_target_properties( clp-s diff --git a/components/core/src/glt/glt/CMakeLists.txt b/components/core/src/glt/glt/CMakeLists.txt index 8f95710415..afc04f32c5 100644 --- a/components/core/src/glt/glt/CMakeLists.txt +++ b/components/core/src/glt/glt/CMakeLists.txt @@ -176,7 +176,7 @@ add_executable(glt ${GLT_SOURCES}) target_compile_features(glt PRIVATE cxx_std_20) target_include_directories(glt PRIVATE - "${CLP_OUTCOME_SOURCE_DIRECTORY}" + "${CLP_OUTCOME_INCLUDES_DIRECTORY}" "${CLP_SQLITE3_SOURCE_DIRECTORY}" ) target_link_libraries(glt diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index ad63b2fc16..8701ee9ca7 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -188,7 +188,7 @@ tasks: /outcome-v2-all-sources-571f9c930e672950e99d5d30f743603aaaf8014c.tar.xz" - >- echo "set( - CLP_OUTCOME_SOURCE_DIRECTORY \"{{.OUTPUT_DIR}}\" + CLP_OUTCOME_INCLUDES_DIRECTORY \"{{.OUTPUT_DIR}}\" )" > "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" simdjson: @@ -241,7 +241,7 @@ tasks: URL: "https://github.com/nemtrif/utfcpp/archive/refs/tags/v4.0.6.tar.gz" - >- echo "set( - CLP_UTFCPP_SOURCE_DIRECTORY \"{{.UTFCPP_OUTPUT_DIR}}\" + CLP_UTFCPP_INCLUDES_DIRECTORY \"{{.UTFCPP_OUTPUT_DIR}}\" )" > "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" yaml-cpp: From 1ee6482016462fbb2aa2848fbad87afbf6645683 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sun, 27 Apr 2025 06:29:53 -0400 Subject: [PATCH 28/35] Nest outcome header under outcome directory that's a symlink of the downloaded includes directory. --- .../core/src/clp/ffi/KeyValuePairLogEvent.cpp | 2 +- .../core/src/clp/ffi/KeyValuePairLogEvent.hpp | 2 +- .../core/src/clp/ffi/ir_stream/Deserializer.hpp | 2 +- .../core/src/clp/ffi/ir_stream/Serializer.cpp | 2 +- .../core/src/clp/ffi/ir_stream/Serializer.hpp | 2 +- .../ir_stream/ir_unit_deserialization_methods.cpp | 2 +- .../ir_stream/ir_unit_deserialization_methods.hpp | 2 +- components/core/src/clp/ffi/ir_stream/utils.hpp | 2 +- .../core/src/clp/ir/LogEventDeserializer.cpp | 2 +- .../core/src/clp/ir/LogEventDeserializer.hpp | 2 +- .../clp/regex_utils/regex_translation_utils.cpp | 2 +- .../clp/regex_utils/regex_translation_utils.hpp | 2 +- .../core/src/glt/ir/LogEventDeserializer.cpp | 2 +- .../core/src/glt/ir/LogEventDeserializer.hpp | 2 +- taskfiles/deps/main.yaml | 14 ++++++++++---- 15 files changed, 24 insertions(+), 18 deletions(-) diff --git a/components/core/src/clp/ffi/KeyValuePairLogEvent.cpp b/components/core/src/clp/ffi/KeyValuePairLogEvent.cpp index 14f8d1afd4..c65f2984c9 100644 --- a/components/core/src/clp/ffi/KeyValuePairLogEvent.cpp +++ b/components/core/src/clp/ffi/KeyValuePairLogEvent.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include "../ir/EncodedTextAst.hpp" #include "../time_types.hpp" diff --git a/components/core/src/clp/ffi/KeyValuePairLogEvent.hpp b/components/core/src/clp/ffi/KeyValuePairLogEvent.hpp index 96e5f5a998..de5b6b71f1 100644 --- a/components/core/src/clp/ffi/KeyValuePairLogEvent.hpp +++ b/components/core/src/clp/ffi/KeyValuePairLogEvent.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include "../time_types.hpp" #include "SchemaTree.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/Deserializer.hpp b/components/core/src/clp/ffi/ir_stream/Deserializer.hpp index 68566a7420..5aecee39c8 100644 --- a/components/core/src/clp/ffi/ir_stream/Deserializer.hpp +++ b/components/core/src/clp/ffi/ir_stream/Deserializer.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include "../../ReaderInterface.hpp" #include "../../time_types.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/Serializer.cpp b/components/core/src/clp/ffi/ir_stream/Serializer.cpp index 88cfc4c9ad..0928b7485f 100644 --- a/components/core/src/clp/ffi/ir_stream/Serializer.cpp +++ b/components/core/src/clp/ffi/ir_stream/Serializer.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include "../../ir/types.hpp" #include "../../time_types.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/Serializer.hpp b/components/core/src/clp/ffi/ir_stream/Serializer.hpp index c6d3afe75b..6ee93280e5 100644 --- a/components/core/src/clp/ffi/ir_stream/Serializer.hpp +++ b/components/core/src/clp/ffi/ir_stream/Serializer.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include "../../time_types.hpp" #include "../SchemaTree.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.cpp b/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.cpp index edf76216b6..6fc6a4e54d 100644 --- a/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.cpp +++ b/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include "../../ErrorCode.hpp" #include "../../ir/EncodedTextAst.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.hpp b/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.hpp index 3e0b398fdd..cbd1563a78 100644 --- a/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.hpp +++ b/components/core/src/clp/ffi/ir_stream/ir_unit_deserialization_methods.hpp @@ -6,7 +6,7 @@ #include #include -#include +#include #include "../../ReaderInterface.hpp" #include "../../time_types.hpp" diff --git a/components/core/src/clp/ffi/ir_stream/utils.hpp b/components/core/src/clp/ffi/ir_stream/utils.hpp index 1613dc004f..654416a0f7 100644 --- a/components/core/src/clp/ffi/ir_stream/utils.hpp +++ b/components/core/src/clp/ffi/ir_stream/utils.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include "../../ErrorCode.hpp" #include "../../ir/types.hpp" diff --git a/components/core/src/clp/ir/LogEventDeserializer.cpp b/components/core/src/clp/ir/LogEventDeserializer.cpp index 21f300befb..09622dcb8f 100644 --- a/components/core/src/clp/ir/LogEventDeserializer.cpp +++ b/components/core/src/clp/ir/LogEventDeserializer.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include "../ffi/ir_stream/decoding_methods.hpp" diff --git a/components/core/src/clp/ir/LogEventDeserializer.hpp b/components/core/src/clp/ir/LogEventDeserializer.hpp index cc611fad2a..8c8052b807 100644 --- a/components/core/src/clp/ir/LogEventDeserializer.hpp +++ b/components/core/src/clp/ir/LogEventDeserializer.hpp @@ -3,7 +3,7 @@ #include -#include +#include #include "../ReaderInterface.hpp" #include "../time_types.hpp" diff --git a/components/core/src/clp/regex_utils/regex_translation_utils.cpp b/components/core/src/clp/regex_utils/regex_translation_utils.cpp index 6c2389eff1..d3f2882313 100644 --- a/components/core/src/clp/regex_utils/regex_translation_utils.cpp +++ b/components/core/src/clp/regex_utils/regex_translation_utils.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include "constants.hpp" diff --git a/components/core/src/clp/regex_utils/regex_translation_utils.hpp b/components/core/src/clp/regex_utils/regex_translation_utils.hpp index 50c159175c..0489c68e49 100644 --- a/components/core/src/clp/regex_utils/regex_translation_utils.hpp +++ b/components/core/src/clp/regex_utils/regex_translation_utils.hpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include "regex_utils/RegexToWildcardTranslatorConfig.hpp" diff --git a/components/core/src/glt/ir/LogEventDeserializer.cpp b/components/core/src/glt/ir/LogEventDeserializer.cpp index 2d69cf76e7..9b972c46a6 100644 --- a/components/core/src/glt/ir/LogEventDeserializer.cpp +++ b/components/core/src/glt/ir/LogEventDeserializer.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include "../ffi/ir_stream/decoding_methods.hpp" diff --git a/components/core/src/glt/ir/LogEventDeserializer.hpp b/components/core/src/glt/ir/LogEventDeserializer.hpp index 1359cc484d..e9d32e4083 100644 --- a/components/core/src/glt/ir/LogEventDeserializer.hpp +++ b/components/core/src/glt/ir/LogEventDeserializer.hpp @@ -3,7 +3,7 @@ #include -#include +#include #include "../ReaderInterface.hpp" #include "../TimestampPattern.hpp" diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index 8701ee9ca7..ee496a5c7a 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -171,7 +171,11 @@ tasks: internal: true vars: LIB_NAME: "outcome" - OUTPUT_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-src" + + # Paths + INSTALL_INCLUDES_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-install/includes" + INSTALL_SYMLINK: "{{.INSTALL_INCLUDES_DIR}}/{{.LIB_NAME}}" + SRC_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-src" run: "once" deps: - task: "utils:init" @@ -182,13 +186,15 @@ tasks: FILE_SHA256: "9588c01465b287296ab647b2caf50d5137e3eeaf662e3105b858d5c5c7579428" INCLUDE_PATTERNS: - "outcome/single-header" - NUM_COMPONENTS_TO_STRIP: 2 - OUTPUT_DIR: "{{.OUTPUT_DIR}}" + OUTPUT_DIR: "{{.SRC_DIR}}" URL: "https://github.com/ned14/outcome/releases/download/v2.2.9\ /outcome-v2-all-sources-571f9c930e672950e99d5d30f743603aaaf8014c.tar.xz" + - "mkdir -p '{{.INSTALL_INCLUDES_DIR}}'" + - "rm -f '{{.INSTALL_SYMLINK}}'" + - "ln -s '{{.SRC_DIR}}/single-header' '{{.INSTALL_SYMLINK}}'" - >- echo "set( - CLP_OUTCOME_INCLUDES_DIRECTORY \"{{.OUTPUT_DIR}}\" + CLP_OUTCOME_INCLUDES_DIRECTORY \"{{.INSTALL_INCLUDES_DIR}}\" )" > "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" simdjson: From b1ae815fb356786be621ec53fa6f17107b020fec Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sun, 27 Apr 2025 07:30:45 -0400 Subject: [PATCH 29/35] Nest sqlite3 headers under sqlite3 directory that's a symlink of the downloaded source directory. --- components/core/CMakeLists.txt | 3 +-- components/core/src/clp/SQLiteDB.hpp | 2 +- .../core/src/clp/SQLitePreparedStatement.hpp | 2 +- components/core/src/clp/clg/CMakeLists.txt | 3 +-- components/core/src/clp/clo/CMakeLists.txt | 3 +-- components/core/src/clp/clp/CMakeLists.txt | 3 +-- components/core/src/glt/SQLiteDB.hpp | 2 +- .../core/src/glt/SQLitePreparedStatement.hpp | 2 +- components/core/src/glt/glt/CMakeLists.txt | 3 +-- taskfiles/deps/main.yaml | 14 ++++++++++---- 10 files changed, 19 insertions(+), 18 deletions(-) diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index 6ff251c372..e96a016063 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -412,7 +412,6 @@ set(SOURCE_FILES_reducer_unitTest set(SOURCE_FILES_unitTest "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.c" - "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.h" src/clp/aws/AwsAuthenticationSigner.cpp src/clp/aws/AwsAuthenticationSigner.hpp src/clp/aws/constants.hpp @@ -678,7 +677,7 @@ add_executable(unitTest target_include_directories(unitTest PRIVATE ${CLP_OUTCOME_INCLUDES_DIRECTORY} - ${CLP_SQLITE3_SOURCE_DIRECTORY} + ${CLP_SQLITE3_INCLUDES_DIRECTORY} ) target_link_libraries(unitTest PRIVATE diff --git a/components/core/src/clp/SQLiteDB.hpp b/components/core/src/clp/SQLiteDB.hpp index 92c0b819e2..01b993dd7e 100644 --- a/components/core/src/clp/SQLiteDB.hpp +++ b/components/core/src/clp/SQLiteDB.hpp @@ -3,7 +3,7 @@ #include -#include +#include #include "ErrorCode.hpp" #include "SQLitePreparedStatement.hpp" diff --git a/components/core/src/clp/SQLitePreparedStatement.hpp b/components/core/src/clp/SQLitePreparedStatement.hpp index f9cb5a5fa6..72f5921be6 100644 --- a/components/core/src/clp/SQLitePreparedStatement.hpp +++ b/components/core/src/clp/SQLitePreparedStatement.hpp @@ -3,7 +3,7 @@ #include -#include +#include #include "ErrorCode.hpp" #include "TraceableException.hpp" diff --git a/components/core/src/clp/clg/CMakeLists.txt b/components/core/src/clp/clg/CMakeLists.txt index ef547144d1..ece3375b30 100644 --- a/components/core/src/clp/clg/CMakeLists.txt +++ b/components/core/src/clp/clg/CMakeLists.txt @@ -118,7 +118,6 @@ set( ../WriterInterface.cpp ../WriterInterface.hpp "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.c" - "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.h" clg.cpp CommandLineArguments.cpp CommandLineArguments.hpp @@ -129,7 +128,7 @@ target_compile_features(clg PRIVATE cxx_std_20) target_include_directories(clg PRIVATE "${CLP_OUTCOME_INCLUDES_DIRECTORY}" - "${CLP_SQLITE3_SOURCE_DIRECTORY}" + "${CLP_SQLITE3_INCLUDES_DIRECTORY}" ) target_link_libraries(clg PRIVATE diff --git a/components/core/src/clp/clo/CMakeLists.txt b/components/core/src/clp/clo/CMakeLists.txt index f49ecbce9b..62cab9fe3b 100644 --- a/components/core/src/clp/clo/CMakeLists.txt +++ b/components/core/src/clp/clo/CMakeLists.txt @@ -120,7 +120,6 @@ set( ../WriterInterface.cpp ../WriterInterface.hpp "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.c" - "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.h" clo.cpp CommandLineArguments.cpp CommandLineArguments.hpp @@ -157,7 +156,7 @@ target_compile_features(clo PRIVATE cxx_std_20) target_include_directories(clo PRIVATE "${CLP_OUTCOME_INCLUDES_DIRECTORY}" - "${CLP_SQLITE3_SOURCE_DIRECTORY}" + "${CLP_SQLITE3_INCLUDES_DIRECTORY}" ) target_link_libraries(clo PRIVATE diff --git a/components/core/src/clp/clp/CMakeLists.txt b/components/core/src/clp/clp/CMakeLists.txt index 789a21dda8..6a2d3f15b1 100644 --- a/components/core/src/clp/clp/CMakeLists.txt +++ b/components/core/src/clp/clp/CMakeLists.txt @@ -148,7 +148,6 @@ set( ../WriterInterface.cpp ../WriterInterface.hpp "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.c" - "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.h" clp.cpp CommandLineArguments.cpp CommandLineArguments.hpp @@ -171,7 +170,7 @@ target_compile_features(clp PRIVATE cxx_std_20) target_include_directories(clp PRIVATE "${CLP_OUTCOME_INCLUDES_DIRECTORY}" - "${CLP_SQLITE3_SOURCE_DIRECTORY}" + "${CLP_SQLITE3_INCLUDES_DIRECTORY}" ) target_link_libraries(clp PRIVATE diff --git a/components/core/src/glt/SQLiteDB.hpp b/components/core/src/glt/SQLiteDB.hpp index d4cb4442f3..668bc5b486 100644 --- a/components/core/src/glt/SQLiteDB.hpp +++ b/components/core/src/glt/SQLiteDB.hpp @@ -3,7 +3,7 @@ #include -#include +#include #include "ErrorCode.hpp" #include "SQLitePreparedStatement.hpp" diff --git a/components/core/src/glt/SQLitePreparedStatement.hpp b/components/core/src/glt/SQLitePreparedStatement.hpp index 6c752e4cc6..8520ae37ba 100644 --- a/components/core/src/glt/SQLitePreparedStatement.hpp +++ b/components/core/src/glt/SQLitePreparedStatement.hpp @@ -3,7 +3,7 @@ #include -#include +#include #include "ErrorCode.hpp" #include "TraceableException.hpp" diff --git a/components/core/src/glt/glt/CMakeLists.txt b/components/core/src/glt/glt/CMakeLists.txt index afc04f32c5..c3255ed585 100644 --- a/components/core/src/glt/glt/CMakeLists.txt +++ b/components/core/src/glt/glt/CMakeLists.txt @@ -152,7 +152,6 @@ set( ../WriterInterface.cpp ../WriterInterface.hpp "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.c" - "${CLP_SQLITE3_SOURCE_DIRECTORY}/sqlite3.h" glt.cpp CommandLineArguments.cpp CommandLineArguments.hpp @@ -177,7 +176,7 @@ target_compile_features(glt PRIVATE cxx_std_20) target_include_directories(glt PRIVATE "${CLP_OUTCOME_INCLUDES_DIRECTORY}" - "${CLP_SQLITE3_SOURCE_DIRECTORY}" + "${CLP_SQLITE3_INCLUDES_DIRECTORY}" ) target_link_libraries(glt PRIVATE diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index ee496a5c7a..b0ba149a4f 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -217,6 +217,8 @@ tasks: # Paths EXTRACTION_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-src" + INSTALL_INCLUDES_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-install/includes" + INSTALL_SYMLINK: "{{.INSTALL_INCLUDES_DIR}}/{{.LIB_NAME}}" ZIP_FILENAME_STEM: "sqlite-amalgamation-3360000" SRC_DIR: "{{.EXTRACTION_DIR}}/{{.ZIP_FILENAME_STEM}}" run: "once" @@ -227,10 +229,14 @@ tasks: FILE_SHA256: "999826fe4c871f18919fdb8ed7ec9dd8217180854dd1fe21eea96aed36186729" OUTPUT_DIR: "{{.EXTRACTION_DIR}}" URL: "https://www.sqlite.org/2021/{{.ZIP_FILENAME_STEM}}.zip" - - >- - echo "set( - CLP_SQLITE3_SOURCE_DIRECTORY \"{{.SRC_DIR}}\" - )" > "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" + - "mkdir -p '{{.INSTALL_INCLUDES_DIR}}'" + - "rm -f '{{.INSTALL_SYMLINK}}'" + - "ln -s '{{.SRC_DIR}}' '{{.INSTALL_SYMLINK}}'" + - |- + echo "set(CLP_SQLITE3_SOURCE_DIRECTORY \"{{.SRC_DIR}}\")" \ + > "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" + echo "set(CLP_SQLITE3_INCLUDES_DIRECTORY \"{{.INSTALL_INCLUDES_DIR}}\")" \ + >> "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" utfcpp: internal: true From 84125e759730786302fa54b8047ddd0bd01063d3 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sun, 27 Apr 2025 07:33:55 -0400 Subject: [PATCH 30/35] Add missing init step for sqlite3 and utfcpp dependencies. --- taskfiles/deps/main.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index b0ba149a4f..b987830449 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -222,6 +222,8 @@ tasks: ZIP_FILENAME_STEM: "sqlite-amalgamation-3360000" SRC_DIR: "{{.EXTRACTION_DIR}}/{{.ZIP_FILENAME_STEM}}" run: "once" + deps: + - task: "utils:init" cmds: - task: "yscope-dev-utils:remote:download-and-extract-zip" vars: @@ -244,6 +246,8 @@ tasks: LIB_NAME: "utfcpp" UTFCPP_OUTPUT_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-src" run: "once" + deps: + - task: "utils:init" cmds: - task: "yscope-dev-utils:remote:download-and-extract-tar" vars: From 2266e4a76c1596909d97778666381a06f5f330db Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sun, 27 Apr 2025 08:32:43 -0400 Subject: [PATCH 31/35] Switch to outcome release tar that's not from githubusercontent.com. --- taskfiles/deps/main.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index b987830449..c77e11c2c3 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -183,12 +183,11 @@ tasks: - task: "yscope-dev-utils:remote:download-and-extract-tar" vars: CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/{{.LIB_NAME}}.md5" - FILE_SHA256: "9588c01465b287296ab647b2caf50d5137e3eeaf662e3105b858d5c5c7579428" + FILE_SHA256: "2840e403b1d7a0d3a75ecc4df574ab0674284bb21d76ac5f817695f2b56905f2" INCLUDE_PATTERNS: - - "outcome/single-header" + - "*/single-header" OUTPUT_DIR: "{{.SRC_DIR}}" - URL: "https://github.com/ned14/outcome/releases/download/v2.2.9\ - /outcome-v2-all-sources-571f9c930e672950e99d5d30f743603aaaf8014c.tar.xz" + URL: "https://github.com/ned14/outcome/archive/refs/tags/v2.2.9.tar.gz" - "mkdir -p '{{.INSTALL_INCLUDES_DIR}}'" - "rm -f '{{.INSTALL_SYMLINK}}'" - "ln -s '{{.SRC_DIR}}/single-header' '{{.INSTALL_SYMLINK}}'" From 23ac5bb376866d34e0ca486aafc7e8415f0f203a Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sun, 27 Apr 2025 08:37:43 -0400 Subject: [PATCH 32/35] Rename includes to include to match Unix's naming-convention. --- components/core/CMakeLists.txt | 4 ++-- components/core/src/clp/clg/CMakeLists.txt | 4 ++-- components/core/src/clp/clo/CMakeLists.txt | 4 ++-- components/core/src/clp/clp/CMakeLists.txt | 4 ++-- .../core/src/clp/regex_utils/CMakeLists.txt | 2 +- components/core/src/clp_s/CMakeLists.txt | 2 +- components/core/src/glt/glt/CMakeLists.txt | 4 ++-- taskfiles/deps/main.yaml | 18 +++++++++--------- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index e96a016063..2e75d9bab1 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -676,8 +676,8 @@ add_executable(unitTest ) target_include_directories(unitTest PRIVATE - ${CLP_OUTCOME_INCLUDES_DIRECTORY} - ${CLP_SQLITE3_INCLUDES_DIRECTORY} + ${CLP_OUTCOME_INCLUDE_DIRECTORY} + ${CLP_SQLITE3_INCLUDE_DIRECTORY} ) target_link_libraries(unitTest PRIVATE diff --git a/components/core/src/clp/clg/CMakeLists.txt b/components/core/src/clp/clg/CMakeLists.txt index ece3375b30..c8a06ec94d 100644 --- a/components/core/src/clp/clg/CMakeLists.txt +++ b/components/core/src/clp/clg/CMakeLists.txt @@ -127,8 +127,8 @@ add_executable(clg ${CLG_SOURCES}) target_compile_features(clg PRIVATE cxx_std_20) target_include_directories(clg PRIVATE - "${CLP_OUTCOME_INCLUDES_DIRECTORY}" - "${CLP_SQLITE3_INCLUDES_DIRECTORY}" + "${CLP_OUTCOME_INCLUDE_DIRECTORY}" + "${CLP_SQLITE3_INCLUDE_DIRECTORY}" ) target_link_libraries(clg PRIVATE diff --git a/components/core/src/clp/clo/CMakeLists.txt b/components/core/src/clp/clo/CMakeLists.txt index 62cab9fe3b..a122b7ea01 100644 --- a/components/core/src/clp/clo/CMakeLists.txt +++ b/components/core/src/clp/clo/CMakeLists.txt @@ -155,8 +155,8 @@ add_executable(clo ${CLO_SOURCES} ${REDUCER_SOURCES}) target_compile_features(clo PRIVATE cxx_std_20) target_include_directories(clo PRIVATE - "${CLP_OUTCOME_INCLUDES_DIRECTORY}" - "${CLP_SQLITE3_INCLUDES_DIRECTORY}" + "${CLP_OUTCOME_INCLUDE_DIRECTORY}" + "${CLP_SQLITE3_INCLUDE_DIRECTORY}" ) target_link_libraries(clo PRIVATE diff --git a/components/core/src/clp/clp/CMakeLists.txt b/components/core/src/clp/clp/CMakeLists.txt index 6a2d3f15b1..d990ea1a74 100644 --- a/components/core/src/clp/clp/CMakeLists.txt +++ b/components/core/src/clp/clp/CMakeLists.txt @@ -169,8 +169,8 @@ add_executable(clp ${CLP_SOURCES}) target_compile_features(clp PRIVATE cxx_std_20) target_include_directories(clp PRIVATE - "${CLP_OUTCOME_INCLUDES_DIRECTORY}" - "${CLP_SQLITE3_INCLUDES_DIRECTORY}" + "${CLP_OUTCOME_INCLUDE_DIRECTORY}" + "${CLP_SQLITE3_INCLUDE_DIRECTORY}" ) target_link_libraries(clp PRIVATE diff --git a/components/core/src/clp/regex_utils/CMakeLists.txt b/components/core/src/clp/regex_utils/CMakeLists.txt index 611d2376d6..a359702833 100644 --- a/components/core/src/clp/regex_utils/CMakeLists.txt +++ b/components/core/src/clp/regex_utils/CMakeLists.txt @@ -15,7 +15,7 @@ add_library(clp::regex_utils ALIAS regex_utils) target_include_directories(regex_utils PUBLIC ../ - "${CLP_OUTCOME_INCLUDES_DIRECTORY}" + "${CLP_OUTCOME_INCLUDE_DIRECTORY}" ) target_link_libraries(regex_utils PUBLIC diff --git a/components/core/src/clp_s/CMakeLists.txt b/components/core/src/clp_s/CMakeLists.txt index cd14510f3f..de5273106d 100644 --- a/components/core/src/clp_s/CMakeLists.txt +++ b/components/core/src/clp_s/CMakeLists.txt @@ -244,7 +244,7 @@ target_link_libraries( ) target_include_directories(clp-s PRIVATE - "${CLP_OUTCOME_INCLUDES_DIRECTORY}" + "${CLP_OUTCOME_INCLUDE_DIRECTORY}" ) set_target_properties( clp-s diff --git a/components/core/src/glt/glt/CMakeLists.txt b/components/core/src/glt/glt/CMakeLists.txt index c3255ed585..15062e6676 100644 --- a/components/core/src/glt/glt/CMakeLists.txt +++ b/components/core/src/glt/glt/CMakeLists.txt @@ -175,8 +175,8 @@ add_executable(glt ${GLT_SOURCES}) target_compile_features(glt PRIVATE cxx_std_20) target_include_directories(glt PRIVATE - "${CLP_OUTCOME_INCLUDES_DIRECTORY}" - "${CLP_SQLITE3_INCLUDES_DIRECTORY}" + "${CLP_OUTCOME_INCLUDE_DIRECTORY}" + "${CLP_SQLITE3_INCLUDE_DIRECTORY}" ) target_link_libraries(glt PRIVATE diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index c77e11c2c3..d1774a793a 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -173,8 +173,8 @@ tasks: LIB_NAME: "outcome" # Paths - INSTALL_INCLUDES_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-install/includes" - INSTALL_SYMLINK: "{{.INSTALL_INCLUDES_DIR}}/{{.LIB_NAME}}" + INSTALL_INCLUDE_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-install/include" + INSTALL_SYMLINK: "{{.INSTALL_INCLUDE_DIR}}/{{.LIB_NAME}}" SRC_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-src" run: "once" deps: @@ -188,12 +188,12 @@ tasks: - "*/single-header" OUTPUT_DIR: "{{.SRC_DIR}}" URL: "https://github.com/ned14/outcome/archive/refs/tags/v2.2.9.tar.gz" - - "mkdir -p '{{.INSTALL_INCLUDES_DIR}}'" + - "mkdir -p '{{.INSTALL_INCLUDE_DIR}}'" - "rm -f '{{.INSTALL_SYMLINK}}'" - "ln -s '{{.SRC_DIR}}/single-header' '{{.INSTALL_SYMLINK}}'" - >- echo "set( - CLP_OUTCOME_INCLUDES_DIRECTORY \"{{.INSTALL_INCLUDES_DIR}}\" + CLP_OUTCOME_INCLUDE_DIRECTORY \"{{.INSTALL_INCLUDE_DIR}}\" )" > "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" simdjson: @@ -216,8 +216,8 @@ tasks: # Paths EXTRACTION_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-src" - INSTALL_INCLUDES_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-install/includes" - INSTALL_SYMLINK: "{{.INSTALL_INCLUDES_DIR}}/{{.LIB_NAME}}" + INSTALL_INCLUDE_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-install/include" + INSTALL_SYMLINK: "{{.INSTALL_INCLUDE_DIR}}/{{.LIB_NAME}}" ZIP_FILENAME_STEM: "sqlite-amalgamation-3360000" SRC_DIR: "{{.EXTRACTION_DIR}}/{{.ZIP_FILENAME_STEM}}" run: "once" @@ -230,13 +230,13 @@ tasks: FILE_SHA256: "999826fe4c871f18919fdb8ed7ec9dd8217180854dd1fe21eea96aed36186729" OUTPUT_DIR: "{{.EXTRACTION_DIR}}" URL: "https://www.sqlite.org/2021/{{.ZIP_FILENAME_STEM}}.zip" - - "mkdir -p '{{.INSTALL_INCLUDES_DIR}}'" + - "mkdir -p '{{.INSTALL_INCLUDE_DIR}}'" - "rm -f '{{.INSTALL_SYMLINK}}'" - "ln -s '{{.SRC_DIR}}' '{{.INSTALL_SYMLINK}}'" - |- echo "set(CLP_SQLITE3_SOURCE_DIRECTORY \"{{.SRC_DIR}}\")" \ > "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" - echo "set(CLP_SQLITE3_INCLUDES_DIRECTORY \"{{.INSTALL_INCLUDES_DIR}}\")" \ + echo "set(CLP_SQLITE3_INCLUDE_DIRECTORY \"{{.INSTALL_INCLUDE_DIR}}\")" \ >> "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" utfcpp: @@ -256,7 +256,7 @@ tasks: URL: "https://github.com/nemtrif/utfcpp/archive/refs/tags/v4.0.6.tar.gz" - >- echo "set( - CLP_UTFCPP_INCLUDES_DIRECTORY \"{{.UTFCPP_OUTPUT_DIR}}\" + CLP_UTFCPP_INCLUDE_DIRECTORY \"{{.UTFCPP_OUTPUT_DIR}}\" )" > "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" yaml-cpp: From 6c4469ba4d0b87be7bca1ee2a9cfbbbcb9ba33a8 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sun, 27 Apr 2025 08:53:29 -0400 Subject: [PATCH 33/35] Switch to nlohmann_json release tar that's not from githubusercontent.com; Add comments to document choice of GH-generated source tarball. --- taskfiles/deps/main.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index d1774a793a..3ea7880065 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -164,8 +164,12 @@ tasks: - "-DCMAKE_INSTALL_MESSAGE=LAZY" - "-DJSON_BuildTests=OFF" LIB_NAME: "nlohmann_json" - TARBALL_SHA256: "d6c65aca6b1ed68e7a182f4757257b107ae403032760ed6ef121c9d55e81757d" - TARBALL_URL: "https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz" + TARBALL_SHA256: "0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406" + + # NOTE: We use the GitHub-generated source tarball for this version rather than the + # release tarball, since the latter is served from githubusercontent.com which is blocked + # by some developer's firewalls. The contents of the former are a superset of the latter. + TARBALL_URL: "https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.tar.gz" outcome: internal: true @@ -187,6 +191,11 @@ tasks: INCLUDE_PATTERNS: - "*/single-header" OUTPUT_DIR: "{{.SRC_DIR}}" + + # NOTE: We use the GitHub-generated source tarball for this version rather than the + # release tarball, since the latter is served from githubusercontent.com which is blocked + # by some developer's firewalls. The source files we use are identical between the two + # tarballs. URL: "https://github.com/ned14/outcome/archive/refs/tags/v2.2.9.tar.gz" - "mkdir -p '{{.INSTALL_INCLUDE_DIR}}'" - "rm -f '{{.INSTALL_SYMLINK}}'" From 85ba10a4421d39223e3700cfa9da5662283893a1 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sun, 27 Apr 2025 12:11:21 -0400 Subject: [PATCH 34/35] Grammar fix. --- taskfiles/deps/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index 3ea7880065..75c4f92b21 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -168,7 +168,7 @@ tasks: # NOTE: We use the GitHub-generated source tarball for this version rather than the # release tarball, since the latter is served from githubusercontent.com which is blocked - # by some developer's firewalls. The contents of the former are a superset of the latter. + # by some developers' firewalls. The contents of the former are a superset of the latter. TARBALL_URL: "https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.tar.gz" outcome: @@ -194,7 +194,7 @@ tasks: # NOTE: We use the GitHub-generated source tarball for this version rather than the # release tarball, since the latter is served from githubusercontent.com which is blocked - # by some developer's firewalls. The source files we use are identical between the two + # by some developers' firewalls. The source files we use are identical between the two # tarballs. URL: "https://github.com/ned14/outcome/archive/refs/tags/v2.2.9.tar.gz" - "mkdir -p '{{.INSTALL_INCLUDE_DIR}}'" From b3b4ff59f2359ed8edc0990b28d4be7b1ed74e90 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Sun, 27 Apr 2025 21:49:43 -0400 Subject: [PATCH 35/35] Fix build error. --- .../ir_stream/search/NewProjectedSchemaTreeNodeCallbackReq.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/core/src/clp/ffi/ir_stream/search/NewProjectedSchemaTreeNodeCallbackReq.hpp b/components/core/src/clp/ffi/ir_stream/search/NewProjectedSchemaTreeNodeCallbackReq.hpp index 1bebcd30d6..4c114def3a 100644 --- a/components/core/src/clp/ffi/ir_stream/search/NewProjectedSchemaTreeNodeCallbackReq.hpp +++ b/components/core/src/clp/ffi/ir_stream/search/NewProjectedSchemaTreeNodeCallbackReq.hpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include "../../SchemaTree.hpp"