From feebc67baac0e8140b8b5f9c4c9cdd9a24f13846 Mon Sep 17 00:00:00 2001 From: Ezekiel Warren Date: Sun, 24 Mar 2024 00:15:07 -0700 Subject: [PATCH] feat: build receipe can now fetch sources --- MODULE.bazel | 2 + MODULE.bazel.lock | 296 ++++++++++++------- ecsact/cli/commands/build/build_recipe.cc | 16 +- ecsact/cli/commands/build/recipe/BUILD.bazel | 3 + ecsact/cli/commands/build/recipe/cook.cc | 52 +++- test/MODULE.bazel.lock | 33 ++- test/build_recipe/BUILD.bazel | 2 +- test/build_recipe/example-recipe.yml | 2 + 8 files changed, 283 insertions(+), 123 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index dcf0d34..47ff831 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -15,9 +15,11 @@ bazel_dep(name = "ecsact_interpret", version = "0.5.3") bazel_dep(name = "ecsact_codegen", version = "0.1.2") bazel_dep(name = "boost.dll", version = "1.83.0.bzl.2") bazel_dep(name = "magic_enum", version = "0.9.3") +bazel_dep(name = "curl", version = "8.4.0") bazel_dep(name = "docopt.cpp", version = "0.6.2") bazel_dep(name = "boost.process", version = "1.83.0.bzl.2") bazel_dep(name = "boost.algorithm", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.url", version = "1.83.0.bzl.2") bazel_dep(name = "toolchains_llvm", version = "1.0.0", dev_dependency = True) bazel_dep(name = "hedron_compile_commands", dev_dependency = True) bazel_dep(name = "yaml-cpp") diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index cd51a38..f29b200 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -1,6 +1,6 @@ { "lockFileVersion": 6, - "moduleFileHash": "42797216c3dadfc1a86db03ce7ad2a5baee317f7c3e7e0757014ad40bbdf3f39", + "moduleFileHash": "f8854018b2de24ca8b0e7f97314ff9f9d8a815af18110eedbb519664808ceb22", "flags": { "cmdRegistries": [ "https://raw.githubusercontent.com/ecsact-dev/bazel_registry/main", @@ -34,7 +34,7 @@ "usingModule": "", "location": { "file": "@@//:MODULE.bazel", - "line": 37, + "line": 39, "column": 21 }, "imports": { @@ -52,7 +52,7 @@ "devDependency": true, "location": { "file": "@@//:MODULE.bazel", - "line": 38, + "line": 40, "column": 15 } } @@ -67,15 +67,17 @@ "platforms": "platforms@0.0.8", "rules_pkg": "rules_pkg@0.9.1", "bazel_skylib": "bazel_skylib@1.5.0", - "ecsact_parse": "ecsact_parse@0.3.0", - "ecsact_runtime": "ecsact_runtime@0.5.1", - "ecsact_interpret": "ecsact_interpret@0.5.0", + "ecsact_parse": "ecsact_parse@0.3.3", + "ecsact_runtime": "ecsact_runtime@0.5.4", + "ecsact_interpret": "ecsact_interpret@0.5.3", "ecsact_codegen": "ecsact_codegen@0.1.2", "boost.dll": "boost.dll@1.83.0.bzl.2", "magic_enum": "magic_enum@0.9.3", + "curl": "curl@8.4.0", "docopt.cpp": "docopt.cpp@0.6.2", "boost.process": "boost.process@1.83.0.bzl.2", "boost.algorithm": "boost.algorithm@1.83.0.bzl.1", + "boost.url": "boost.url@1.83.0.bzl.2", "toolchains_llvm": "toolchains_llvm@1.0.0", "hedron_compile_commands": "hedron_compile_commands@_", "yaml-cpp": "yaml-cpp@_", @@ -247,10 +249,10 @@ } } }, - "ecsact_parse@0.3.0": { + "ecsact_parse@0.3.3": { "name": "ecsact_parse", - "version": "0.3.0", - "key": "ecsact_parse@0.3.0", + "version": "0.3.3", + "key": "ecsact_parse@0.3.3", "repoName": "ecsact_parse", "executionPlatformsToRegister": [], "toolchainsToRegister": [], @@ -258,7 +260,7 @@ "deps": { "rules_cc": "rules_cc@0.0.9", "bazel_skylib": "bazel_skylib@1.5.0", - "ecsact_runtime": "ecsact_runtime@0.5.1", + "ecsact_runtime": "ecsact_runtime@0.5.4", "lexy": "lexy@2022.05.1", "magic_enum": "magic_enum@0.9.3", "bazel_tools": "bazel_tools@_", @@ -269,19 +271,19 @@ "ruleClassName": "http_archive", "attributes": { "urls": [ - "https://github.com/ecsact-dev/ecsact_parse/releases/download/0.3.0/ecsact_parse-0.3.0.tar.gz" + "https://github.com/ecsact-dev/ecsact_parse/releases/download/0.3.3/ecsact_parse-0.3.3.tar.gz" ], - "integrity": "sha256-pJ5Bus4vLHLECZTcmMChMnrbqFrHtv5mcylc3nvkaWs=", + "integrity": "sha256-bdwpSsqxxD9qsH9+q+tKOAVYNZvpI+MgJFkNJIBpHHk=", "strip_prefix": "", "remote_patches": {}, "remote_patch_strip": 0 } } }, - "ecsact_runtime@0.5.1": { + "ecsact_runtime@0.5.4": { "name": "ecsact_runtime", - "version": "0.5.1", - "key": "ecsact_runtime@0.5.1", + "version": "0.5.4", + "key": "ecsact_runtime@0.5.4", "repoName": "ecsact_runtime", "executionPlatformsToRegister": [], "toolchainsToRegister": [], @@ -302,19 +304,19 @@ "ruleClassName": "http_archive", "attributes": { "urls": [ - "https://github.com/ecsact-dev/ecsact_runtime/releases/download/0.5.1/ecsact_runtime-0.5.1.tar.gz" + "https://github.com/ecsact-dev/ecsact_runtime/releases/download/0.5.4/ecsact_runtime-0.5.4.tar.gz" ], - "integrity": "sha256-xhzsYKsl/+9IOyQ51nXT7IZCvWCLeoRtakQp5Msjll8=", + "integrity": "sha256-EaWwFxIIoI10+H8WDe7XwJ3M29jaxDwqLN9HK+hccys=", "strip_prefix": "", "remote_patches": {}, "remote_patch_strip": 0 } } }, - "ecsact_interpret@0.5.0": { + "ecsact_interpret@0.5.3": { "name": "ecsact_interpret", - "version": "0.5.0", - "key": "ecsact_interpret@0.5.0", + "version": "0.5.3", + "key": "ecsact_interpret@0.5.3", "repoName": "ecsact_interpret", "executionPlatformsToRegister": [], "toolchainsToRegister": [], @@ -323,8 +325,8 @@ "rules_cc": "rules_cc@0.0.9", "bazel_skylib": "bazel_skylib@1.5.0", "magic_enum": "magic_enum@0.9.3", - "ecsact_runtime": "ecsact_runtime@0.5.1", - "ecsact_parse": "ecsact_parse@0.3.0", + "ecsact_runtime": "ecsact_runtime@0.5.4", + "ecsact_parse": "ecsact_parse@0.3.3", "bazel_tools": "bazel_tools@_", "local_config_platform": "local_config_platform@_" }, @@ -333,9 +335,9 @@ "ruleClassName": "http_archive", "attributes": { "urls": [ - "https://github.com/ecsact-dev/ecsact_interpret/releases/download/0.5.0/ecsact_interpret-0.5.0.tar.gz" + "https://github.com/ecsact-dev/ecsact_interpret/releases/download/0.5.3/ecsact_interpret-0.5.3.tar.gz" ], - "integrity": "sha256-EWeVy16rNkSbHThZIGe5PP3kwRFOlgnDLDL2gW+NKLQ=", + "integrity": "sha256-A7VwvcO+ggYGfjU6DR1Kq9aHMdCJIsPEbxA/rew4c1M=", "strip_prefix": "", "remote_patches": {}, "remote_patch_strip": 0 @@ -354,7 +356,7 @@ "rules_cc": "rules_cc@0.0.9", "bazel_skylib": "bazel_skylib@1.5.0", "boost.dll": "boost.dll@1.83.0.bzl.2", - "ecsact_runtime": "ecsact_runtime@0.5.1", + "ecsact_runtime": "ecsact_runtime@0.5.4", "bazel_tools": "bazel_tools@_", "local_config_platform": "local_config_platform@_" }, @@ -443,6 +445,36 @@ } } }, + "curl@8.4.0": { + "name": "curl", + "version": "8.4.0", + "key": "curl@8.4.0", + "repoName": "curl", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "platforms": "platforms@0.0.8", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "urls": [ + "https://github.com/curl/curl/releases/download/curl-8_4_0/curl-8.4.0.tar.gz" + ], + "integrity": "sha256-gW5BgJwEP/KF6MDwanWh+iUCEbv7LcCgN+7vOfGp5Cc=", + "strip_prefix": "curl-8.4.0", + "remote_patches": { + "https://bcr.bazel.build/modules/curl/8.4.0/patches/add_build_file.patch": "sha256-Vcb973u9Diuzp+nG0XzkID+LvaTdbJ6M6tZxH1Vtyo0=", + "https://bcr.bazel.build/modules/curl/8.4.0/patches/module_dot_bazel.patch": "sha256-EEYIkUUDdDiyntAtQHOhsgwqJgs/EvZP6pjuxPUeWIo=" + }, + "remote_patch_strip": 0 + } + } + }, "docopt.cpp@0.6.2": { "name": "docopt.cpp", "version": "0.6.2", @@ -562,6 +594,44 @@ } } }, + "boost.url@1.83.0.bzl.2": { + "name": "boost.url", + "version": "1.83.0.bzl.2", + "key": "boost.url@1.83.0.bzl.2", + "repoName": "boost.url", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "rules_cc": "rules_cc@0.0.9", + "boost.align": "boost.align@1.83.0.bzl.1", + "boost.assert": "boost.assert@1.83.0.bzl.1", + "boost.config": "boost.config@1.83.0.bzl.6", + "boost.core": "boost.core@1.83.0.bzl.1", + "boost.mp11": "boost.mp11@1.83.0.bzl.1", + "boost.optional": "boost.optional@1.83.0.bzl.1", + "boost.static_assert": "boost.static_assert@1.83.0.bzl.1", + "boost.system": "boost.system@1.83.0.bzl.1", + "boost.throw_exception": "boost.throw_exception@1.83.0.bzl.1", + "boost.type_traits": "boost.type_traits@1.83.0.bzl.1", + "boost.variant2": "boost.variant2@1.83.0.bzl.1", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "urls": [ + "https://github.com/bazelboost/url/releases/download/bazelboost-1.83.0.bzl.2/url-bazelboost-1.83.0.bzl.2.tar.gz" + ], + "integrity": "sha256-9tPmgTwtAGdpExT7pozxkmanaBVv55s104dTGQ6/l3w=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, "toolchains_llvm@1.0.0": { "name": "toolchains_llvm", "version": "1.0.0", @@ -2131,6 +2201,94 @@ } } }, + "boost.align@1.83.0.bzl.1": { + "name": "boost.align", + "version": "1.83.0.bzl.1", + "key": "boost.align@1.83.0.bzl.1", + "repoName": "boost.align", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "rules_cc": "rules_cc@0.0.9", + "boost.assert": "boost.assert@1.83.0.bzl.1", + "boost.config": "boost.config@1.83.0.bzl.6", + "boost.core": "boost.core@1.83.0.bzl.1", + "boost.static_assert": "boost.static_assert@1.83.0.bzl.1", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "urls": [ + "https://github.com/bazelboost/align/releases/download/bazelboost-1.83.0.bzl.1/align-bazelboost-1.83.0.bzl.1.tar.gz" + ], + "integrity": "sha256-KbxE4hJ8buR5rPFeDqyu/oo/DsudF9GpxX0wOkdP2Wg=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, + "boost.mp11@1.83.0.bzl.1": { + "name": "boost.mp11", + "version": "1.83.0.bzl.1", + "key": "boost.mp11@1.83.0.bzl.1", + "repoName": "boost.mp11", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "rules_cc": "rules_cc@0.0.9", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "urls": [ + "https://github.com/bazelboost/mp11/releases/download/bazelboost-1.83.0.bzl.1/mp11-bazelboost-1.83.0.bzl.1.tar.gz" + ], + "integrity": "sha256-3i9cAvhEmsBFAM2cTQPi2btGvg6bSLaXzq7KImGLG0g=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, + "boost.variant2@1.83.0.bzl.1": { + "name": "boost.variant2", + "version": "1.83.0.bzl.1", + "key": "boost.variant2@1.83.0.bzl.1", + "repoName": "boost.variant2", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "rules_cc": "rules_cc@0.0.9", + "boost.assert": "boost.assert@1.83.0.bzl.1", + "boost.config": "boost.config@1.83.0.bzl.6", + "boost.mp11": "boost.mp11@1.83.0.bzl.1", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "urls": [ + "https://github.com/bazelboost/variant2/releases/download/bazelboost-1.83.0.bzl.1/variant2-bazelboost-1.83.0.bzl.1.tar.gz" + ], + "integrity": "sha256-+hj7v9IXiXdntpCwQgeQKZPQNlGd0SVZVwerS1IJXE0=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, "rules_java@7.4.0": { "name": "rules_java", "version": "7.4.0", @@ -2984,36 +3142,6 @@ } } }, - "boost.variant2@1.83.0.bzl.1": { - "name": "boost.variant2", - "version": "1.83.0.bzl.1", - "key": "boost.variant2@1.83.0.bzl.1", - "repoName": "boost.variant2", - "executionPlatformsToRegister": [], - "toolchainsToRegister": [], - "extensionUsages": [], - "deps": { - "rules_cc": "rules_cc@0.0.9", - "boost.assert": "boost.assert@1.83.0.bzl.1", - "boost.config": "boost.config@1.83.0.bzl.6", - "boost.mp11": "boost.mp11@1.83.0.bzl.1", - "bazel_tools": "bazel_tools@_", - "local_config_platform": "local_config_platform@_" - }, - "repoSpec": { - "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", - "ruleClassName": "http_archive", - "attributes": { - "urls": [ - "https://github.com/bazelboost/variant2/releases/download/bazelboost-1.83.0.bzl.1/variant2-bazelboost-1.83.0.bzl.1.tar.gz" - ], - "integrity": "sha256-+hj7v9IXiXdntpCwQgeQKZPQNlGd0SVZVwerS1IJXE0=", - "strip_prefix": "", - "remote_patches": {}, - "remote_patch_strip": 0 - } - } - }, "boringssl@0.0.0-20230215-5c22014": { "name": "boringssl", "version": "0.0.0-20230215-5c22014", @@ -3044,37 +3172,6 @@ } } }, - "boost.align@1.83.0.bzl.1": { - "name": "boost.align", - "version": "1.83.0.bzl.1", - "key": "boost.align@1.83.0.bzl.1", - "repoName": "boost.align", - "executionPlatformsToRegister": [], - "toolchainsToRegister": [], - "extensionUsages": [], - "deps": { - "rules_cc": "rules_cc@0.0.9", - "boost.assert": "boost.assert@1.83.0.bzl.1", - "boost.config": "boost.config@1.83.0.bzl.6", - "boost.core": "boost.core@1.83.0.bzl.1", - "boost.static_assert": "boost.static_assert@1.83.0.bzl.1", - "bazel_tools": "bazel_tools@_", - "local_config_platform": "local_config_platform@_" - }, - "repoSpec": { - "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", - "ruleClassName": "http_archive", - "attributes": { - "urls": [ - "https://github.com/bazelboost/align/releases/download/bazelboost-1.83.0.bzl.1/align-bazelboost-1.83.0.bzl.1.tar.gz" - ], - "integrity": "sha256-KbxE4hJ8buR5rPFeDqyu/oo/DsudF9GpxX0wOkdP2Wg=", - "strip_prefix": "", - "remote_patches": {}, - "remote_patch_strip": 0 - } - } - }, "boost.chrono@1.83.0.bzl.1": { "name": "boost.chrono", "version": "1.83.0.bzl.1", @@ -3300,33 +3397,6 @@ } } }, - "boost.mp11@1.83.0.bzl.1": { - "name": "boost.mp11", - "version": "1.83.0.bzl.1", - "key": "boost.mp11@1.83.0.bzl.1", - "repoName": "boost.mp11", - "executionPlatformsToRegister": [], - "toolchainsToRegister": [], - "extensionUsages": [], - "deps": { - "rules_cc": "rules_cc@0.0.9", - "bazel_tools": "bazel_tools@_", - "local_config_platform": "local_config_platform@_" - }, - "repoSpec": { - "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", - "ruleClassName": "http_archive", - "attributes": { - "urls": [ - "https://github.com/bazelboost/mp11/releases/download/bazelboost-1.83.0.bzl.1/mp11-bazelboost-1.83.0.bzl.1.tar.gz" - ], - "integrity": "sha256-3i9cAvhEmsBFAM2cTQPi2btGvg6bSLaXzq7KImGLG0g=", - "strip_prefix": "", - "remote_patches": {}, - "remote_patch_strip": 0 - } - } - }, "upb@0.0.0-20220923-a547704": { "name": "upb", "version": "0.0.0-20220923-a547704", diff --git a/ecsact/cli/commands/build/build_recipe.cc b/ecsact/cli/commands/build/build_recipe.cc index 9278f72..c6f04f6 100644 --- a/ecsact/cli/commands/build/build_recipe.cc +++ b/ecsact/cli/commands/build/build_recipe.cc @@ -97,14 +97,22 @@ static auto parse_sources( // auto fetch = src["fetch"]; auto path = src["path"]; - if((codegen && fetch) || (codegen && path) || (fetch && path) || (!codegen && !fetch && !path)) { + if((codegen && fetch) || (codegen && path) || (fetch && path) || + (!codegen && !fetch && !path)) { return ecsact::build_recipe_parse_error::invalid_source; } if(codegen) { - result.emplace_back(source_codegen{ - .plugins = codegen.as>(), - }); + auto entry = source_codegen{}; + if(src["outdir"]) { + entry.outdir = src["outdir"].as(); + } + if(codegen.IsSequence()) { + entry.plugins = codegen.as>(); + } else { + entry.plugins.push_back(codegen.as()); + } + result.emplace_back(entry); } else if(fetch) { result.emplace_back(source_fetch{ .url = fetch.as(), diff --git a/ecsact/cli/commands/build/recipe/BUILD.bazel b/ecsact/cli/commands/build/recipe/BUILD.bazel index 452d63c..308bffa 100644 --- a/ecsact/cli/commands/build/recipe/BUILD.bazel +++ b/ecsact/cli/commands/build/recipe/BUILD.bazel @@ -25,6 +25,7 @@ cc_library( "//:use_sdk_version_enabled": ["ECSACT_CLI_USE_SDK_VERSION"], "//:use_sdk_version_disabled": [], }), + linkopts = ["/DEFAULTLIB:Wldap32.lib"], deps = [ "//ecsact/cli:report", "//ecsact/cli/detail:argv0", @@ -34,6 +35,8 @@ cc_library( "//ecsact/cli/commands/build:get_modules", "//ecsact/cli/commands/codegen:codegen", "//ecsact/cli/detail:proc_exec", + "@curl", + "@boost.url", ] + select({ "//:use_sdk_version_enabled": [], "//:use_sdk_version_disabled": [ diff --git a/ecsact/cli/commands/build/recipe/cook.cc b/ecsact/cli/commands/build/recipe/cook.cc index 0fb029e..8cbaeac 100644 --- a/ecsact/cli/commands/build/recipe/cook.cc +++ b/ecsact/cli/commands/build/recipe/cook.cc @@ -4,6 +4,10 @@ #include #include #include +#include +#include +#undef fopen +#include #include "ecsact/cli/detail/proc_exec.hh" #include "ecsact/cli/commands/build/cc_compiler_config.hh" #include "ecsact/cli/commands/build/cc_defines_gen.hh" @@ -30,11 +34,51 @@ static auto as_vec(auto range) { } static auto handle_source( // - ecsact::build_recipe::source_fetch, - fs::path work_dir + ecsact::build_recipe::source_fetch src, + fs::path work_dir ) -> int { - ecsact::cli::report_error("Fetching source not yet supported\n"); - return 1; + auto outdir = fs::path{src.outdir.value_or(work_dir.string())}; + auto url = boost::url{src.url}; + + curl_global_init(CURL_GLOBAL_ALL); + auto curl = curl_easy_init(); + + curl_easy_setopt(curl, CURLOPT_URL, src.url.c_str()); + + auto out_file_path = outdir / fs::path{url.path().c_str()}.filename(); + auto out_file = fopen(out_file_path.filename().string().c_str(), "wb"); + + if(!out_file) { + ecsact::cli::report_error("failed to open {}", out_file_path.string()); + return 1; + } + + curl_easy_setopt(curl, CURLOPT_WRITEDATA, out_file); + curl_easy_setopt( + curl, + CURLOPT_WRITEFUNCTION, + [](void* data, size_t size, size_t nmemb, void* out_file) -> size_t { + return ::fwrite(data, size, nmemb, static_cast(out_file)); + } + ); + + ecsact::cli::report_info("downloading {} ...", std::string{url.c_str()}); + auto res = curl_easy_perform(curl); + + fclose(out_file); + + curl_easy_cleanup(curl); + curl_global_cleanup(); + + if(res != CURLE_OK) { + ecsact::cli::report_error( + "failed to download {}", + std::string{url.c_str()} + ); + return 1; + } + + return 0; } static auto handle_source( // diff --git a/test/MODULE.bazel.lock b/test/MODULE.bazel.lock index 2908f2d..54aaee9 100644 --- a/test/MODULE.bazel.lock +++ b/test/MODULE.bazel.lock @@ -16,7 +16,7 @@ }, "localOverrideHashes": { "bazel_tools": "1ae69322ac3823527337acf02016e8ee95813d8d356f47060255b8956fa642f0", - "ecsact_cli": "b8e1fdfbcd80e68428ae3954fb79ab9d1676f68f0a1d5fb63c67b1775fbc0636" + "ecsact_cli": "04f4087a530e0e700c3b263d9467e591f42228e245d206170ca7ab98e947ced3" }, "moduleDepGraph": { "": { @@ -494,6 +494,7 @@ "ecsact_codegen": "ecsact_codegen@0.1.3", "boost.dll": "boost.dll@1.83.0.bzl.2", "magic_enum": "magic_enum@0.9.3", + "curl": "curl@8.4.0", "docopt.cpp": "docopt.cpp@0.6.2", "boost.process": "boost.process@1.83.0.bzl.2", "boost.algorithm": "boost.algorithm@1.83.0.bzl.1", @@ -1680,6 +1681,36 @@ } } }, + "curl@8.4.0": { + "name": "curl", + "version": "8.4.0", + "key": "curl@8.4.0", + "repoName": "curl", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "platforms": "platforms@0.0.8", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "urls": [ + "https://github.com/curl/curl/releases/download/curl-8_4_0/curl-8.4.0.tar.gz" + ], + "integrity": "sha256-gW5BgJwEP/KF6MDwanWh+iUCEbv7LcCgN+7vOfGp5Cc=", + "strip_prefix": "curl-8.4.0", + "remote_patches": { + "https://bcr.bazel.build/modules/curl/8.4.0/patches/add_build_file.patch": "sha256-Vcb973u9Diuzp+nG0XzkID+LvaTdbJ6M6tZxH1Vtyo0=", + "https://bcr.bazel.build/modules/curl/8.4.0/patches/module_dot_bazel.patch": "sha256-EEYIkUUDdDiyntAtQHOhsgwqJgs/EvZP6pjuxPUeWIo=" + }, + "remote_patch_strip": 0 + } + } + }, "docopt.cpp@0.6.2": { "name": "docopt.cpp", "version": "0.6.2", diff --git a/test/build_recipe/BUILD.bazel b/test/build_recipe/BUILD.bazel index efa01cf..1f37ef3 100644 --- a/test/build_recipe/BUILD.bazel +++ b/test/build_recipe/BUILD.bazel @@ -1,5 +1,5 @@ load("@bazel_skylib//rules:native_binary.bzl", "native_test") -load("@rules_cc//cc:defs.bzl", "cc_library") +load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test") load("@rules_ecsact//ecsact:defs.bzl", "ecsact_binary", "ecsact_build_recipe") cc_library( diff --git a/test/build_recipe/example-recipe.yml b/test/build_recipe/example-recipe.yml index 05a7138..5a5121b 100644 --- a/test/build_recipe/example-recipe.yml +++ b/test/build_recipe/example-recipe.yml @@ -4,6 +4,8 @@ sources: - ecsact_build_test.cc - local_dep.cc - local_dep.hh + - codegen: test_codegen + outdir: _test_outdir exports: - ecsact_execute_systems