diff --git a/MODULE.bazel b/MODULE.bazel index 6f9f259..2326795 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -4,7 +4,7 @@ module( compatibility_level = 1, ) -bazel_dep(name = "rules_cc", version = "0.0.9") +bazel_dep(name = "rules_cc", version = "0.0.4") bazel_dep(name = "bazel_skylib", version = "1.4.2") bazel_dep(name = "nlohmann_json", version = "3.11.2") bazel_dep(name = "boost.process", version = "1.83.0.bzl.2") @@ -13,21 +13,23 @@ bazel_dep(name = "boost.url", version = "1.83.0.bzl.2") bazel_dep(name = "libdeflate", version = "1.18") bazel_dep(name = "abseil-cpp", version = "20230802.0") bazel_dep(name = "boringssl", version = "0.0.0-20230215-5c22014") -bazel_dep(name = "toolchains_llvm", version = "1.0.0") + +bazel_dep(name = "toolchains_llvm", version = "1.0.0", dev_dependency = True) bazel_dep(name = "hedron_compile_commands", dev_dependency = True) + bazel_dep(name = "docopt.cpp") git_override( module_name = "hedron_compile_commands", - remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git", commit = "204aa593e002cbd177d30f11f54cff3559110bb9", + remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git", ) llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm") llvm.toolchain(llvm_version = "16.0.4") - use_repo(llvm, "llvm_toolchain") -register_toolchains("@llvm_toolchain//:all") + +register_toolchains("@llvm_toolchain//:all", dev_dependency = True) git_override( module_name = "docopt.cpp", diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 45a5eec..a0c5e81 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -1,6 +1,6 @@ { "lockFileVersion": 6, - "moduleFileHash": "660e308a7658f212824e100efd18e984e0ce155fadcd67c7ff6e29087d5c21d4", + "moduleFileHash": "1ac2d6633acbe2c3047d6f3276e547e82dcba96a9b8ff08440ae7310de8d8672", "flags": { "cmdRegistries": [ "https://raw.githubusercontent.com/bazelboost/registry/main", @@ -33,7 +33,7 @@ "usingModule": "", "location": { "file": "@@//:MODULE.bazel", - "line": 26, + "line": 28, "column": 21 }, "imports": { @@ -49,7 +49,7 @@ "devDependency": false, "location": { "file": "@@//:MODULE.bazel", - "line": 27, + "line": 29, "column": 15 } } @@ -60,7 +60,7 @@ ], "deps": { "rules_cc": "rules_cc@0.0.9", - "bazel_skylib": "bazel_skylib@1.4.2", + "bazel_skylib": "bazel_skylib@1.5.0", "nlohmann_json": "nlohmann_json@3.11.2", "boost.process": "boost.process@1.83.0.bzl.2", "boost.asio": "boost.asio@1.83.0.bzl.2", @@ -68,7 +68,7 @@ "libdeflate": "libdeflate@1.18", "abseil-cpp": "abseil-cpp@20230802.0", "boringssl": "boringssl@0.0.0-20230215-5c22014", - "toolchains_llvm": "toolchains_llvm@0.10.3", + "toolchains_llvm": "toolchains_llvm@1.0.0", "hedron_compile_commands": "hedron_compile_commands@_", "docopt.cpp": "docopt.cpp@_", "bazel_tools": "bazel_tools@_", @@ -104,7 +104,7 @@ } ], "deps": { - "platforms": "platforms@0.0.7", + "platforms": "platforms@0.0.8", "bazel_tools": "bazel_tools@_", "local_config_platform": "local_config_platform@_" }, @@ -124,10 +124,10 @@ } } }, - "bazel_skylib@1.4.2": { + "bazel_skylib@1.5.0": { "name": "bazel_skylib", - "version": "1.4.2", - "key": "bazel_skylib@1.4.2", + "version": "1.5.0", + "key": "bazel_skylib@1.5.0", "repoName": "bazel_skylib", "executionPlatformsToRegister": [], "toolchainsToRegister": [ @@ -136,7 +136,7 @@ ], "extensionUsages": [], "deps": { - "platforms": "platforms@0.0.7", + "platforms": "platforms@0.0.8", "bazel_tools": "bazel_tools@_", "local_config_platform": "local_config_platform@_" }, @@ -145,9 +145,9 @@ "ruleClassName": "http_archive", "attributes": { "urls": [ - "https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz" + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz" ], - "integrity": "sha256-Zv/ZMVZlv6r8lrUiePV8fi3Qn17eJ56m05sr5HHn46o=", + "integrity": "sha256-zVWgYudjuTSZIfD124w5MyiNyLpPdt2UFqrGis7jy5Q=", "strip_prefix": "", "remote_patches": {}, "remote_patch_strip": 0 @@ -193,8 +193,8 @@ "extensionUsages": [], "deps": { "rules_cc": "rules_cc@0.0.9", - "platforms": "platforms@0.0.7", - "bazel_skylib": "bazel_skylib@1.4.2", + "platforms": "platforms@0.0.8", + "bazel_skylib": "bazel_skylib@1.5.0", "boost.algorithm": "boost.algorithm@1.83.0.bzl.1", "boost.asio": "boost.asio@1.83.0.bzl.2", "boost.config": "boost.config@1.83.0.bzl.6", @@ -239,8 +239,8 @@ "extensionUsages": [], "deps": { "rules_cc": "rules_cc@0.0.9", - "platforms": "platforms@0.0.7", - "bazel_skylib": "bazel_skylib@1.4.2", + "platforms": "platforms@0.0.8", + "bazel_skylib": "bazel_skylib@1.5.0", "boringssl": "boringssl@0.0.0-20230215-5c22014", "boost.align": "boost.align@1.83.0.bzl.1", "boost.array": "boost.array@1.83.0.bzl.1", @@ -354,8 +354,8 @@ "extensionUsages": [], "deps": { "rules_cc": "rules_cc@0.0.9", - "platforms": "platforms@0.0.7", - "bazel_skylib": "bazel_skylib@1.4.2", + "platforms": "platforms@0.0.8", + "bazel_skylib": "bazel_skylib@1.5.0", "com_google_googletest": "googletest@1.14.0", "com_github_google_benchmark": "google_benchmark@1.8.2", "bazel_tools": "bazel_tools@_", @@ -387,7 +387,7 @@ "extensionUsages": [], "deps": { "rules_cc": "rules_cc@0.0.9", - "platforms": "platforms@0.0.7", + "platforms": "platforms@0.0.8", "bazel_tools": "bazel_tools@_", "local_config_platform": "local_config_platform@_" }, @@ -407,18 +407,18 @@ } } }, - "toolchains_llvm@0.10.3": { + "toolchains_llvm@1.0.0": { "name": "toolchains_llvm", - "version": "0.10.3", - "key": "toolchains_llvm@0.10.3", + "version": "1.0.0", + "key": "toolchains_llvm@1.0.0", "repoName": "toolchains_llvm", "executionPlatformsToRegister": [], "toolchainsToRegister": [], "extensionUsages": [], "deps": { - "bazel_skylib": "bazel_skylib@1.4.2", + "bazel_skylib": "bazel_skylib@1.5.0", "rules_cc": "rules_cc@0.0.9", - "platforms": "platforms@0.0.7", + "platforms": "platforms@0.0.8", "bazel_tools": "bazel_tools@_", "local_config_platform": "local_config_platform@_" }, @@ -427,10 +427,10 @@ "ruleClassName": "http_archive", "attributes": { "urls": [ - "https://github.com/grailbio/bazel-toolchain/releases/download/0.10.3/toolchains_llvm-0.10.3.tar.gz" + "https://github.com/bazel-contrib/toolchains_llvm/releases/download/1.0.0/toolchains_llvm-1.0.0.tar.gz" ], - "integrity": "sha256-t80wHvew7OKNINPneGl6XjuBgoOTFQvtBIOMDFKWOgE=", - "strip_prefix": "toolchains_llvm-0.10.3", + "integrity": "sha256-6RxDYfmQEaVIFOGvvlxDbg0ymHEUajzVjCOitK+1Bzc=", + "strip_prefix": "toolchains_llvm-1.0.0", "remote_patches": {}, "remote_patch_strip": 0 } @@ -520,7 +520,7 @@ "extensionUsages": [], "deps": { "rules_cc": "rules_cc@0.0.9", - "bazel_skylib": "bazel_skylib@1.4.2", + "bazel_skylib": "bazel_skylib@1.5.0", "boost.regex": "boost.regex@1.83.0.bzl.1", "bazel_tools": "bazel_tools@_", "local_config_platform": "local_config_platform@_" @@ -671,7 +671,7 @@ "rules_proto": "rules_proto@5.3.0-21.7", "rules_python": "rules_python@0.22.1", "buildozer": "buildozer@6.4.0.2", - "platforms": "platforms@0.0.7", + "platforms": "platforms@0.0.8", "com_google_protobuf": "protobuf@21.7", "zlib": "zlib@1.3", "build_bazel_apple_support": "apple_support@1.5.0", @@ -687,14 +687,14 @@ "toolchainsToRegister": [], "extensionUsages": [], "deps": { - "platforms": "platforms@0.0.7", + "platforms": "platforms@0.0.8", "bazel_tools": "bazel_tools@_" } }, - "platforms@0.0.7": { + "platforms@0.0.8": { "name": "platforms", - "version": "0.0.7", - "key": "platforms@0.0.7", + "version": "0.0.8", + "key": "platforms@0.0.8", "repoName": "platforms", "executionPlatformsToRegister": [], "toolchainsToRegister": [], @@ -709,9 +709,9 @@ "ruleClassName": "http_archive", "attributes": { "urls": [ - "https://github.com/bazelbuild/platforms/releases/download/0.0.7/platforms-0.0.7.tar.gz" + "https://github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz" ], - "integrity": "sha256-OlYcmee9vpFzqmU/1Xn+hJ8djWc5V4CrR3Cx84FDHVE=", + "integrity": "sha256-gVBAZgU4ns7LbaB8vLUJ1WN6OrmiS8abEQFTE2fYnXQ=", "strip_prefix": "", "remote_patches": {}, "remote_patch_strip": 0 @@ -1765,7 +1765,7 @@ "extensionUsages": [], "deps": { "com_google_absl": "abseil-cpp@20230802.0", - "platforms": "platforms@0.0.7", + "platforms": "platforms@0.0.8", "rules_cc": "rules_cc@0.0.9", "bazel_tools": "bazel_tools@_", "local_config_platform": "local_config_platform@_" @@ -1795,8 +1795,8 @@ "toolchainsToRegister": [], "extensionUsages": [], "deps": { - "bazel_skylib": "bazel_skylib@1.4.2", - "platforms": "platforms@0.0.7", + "bazel_skylib": "bazel_skylib@1.5.0", + "platforms": "platforms@0.0.8", "rules_foreign_cc": "rules_foreign_cc@0.9.0", "rules_cc": "rules_cc@0.0.9", "libpfm": "libpfm@4.11.0", @@ -1897,9 +1897,9 @@ } ], "deps": { - "platforms": "platforms@0.0.7", + "platforms": "platforms@0.0.8", "rules_cc": "rules_cc@0.0.9", - "bazel_skylib": "bazel_skylib@1.4.2", + "bazel_skylib": "bazel_skylib@1.5.0", "rules_proto": "rules_proto@5.3.0-21.7", "rules_license": "rules_license@0.0.7", "bazel_tools": "bazel_tools@_", @@ -1954,7 +1954,7 @@ "toolchainsToRegister": [], "extensionUsages": [], "deps": { - "bazel_skylib": "bazel_skylib@1.4.2", + "bazel_skylib": "bazel_skylib@1.5.0", "com_google_protobuf": "protobuf@21.7", "rules_cc": "rules_cc@0.0.9", "bazel_tools": "bazel_tools@_", @@ -2059,8 +2059,8 @@ } ], "deps": { - "platforms": "platforms@0.0.7", - "bazel_skylib": "bazel_skylib@1.4.2", + "platforms": "platforms@0.0.8", + "bazel_skylib": "bazel_skylib@1.5.0", "rules_proto": "rules_proto@5.3.0-21.7", "com_google_protobuf": "protobuf@21.7", "bazel_tools": "bazel_tools@_", @@ -2199,7 +2199,7 @@ } ], "deps": { - "bazel_skylib": "bazel_skylib@1.4.2", + "bazel_skylib": "bazel_skylib@1.5.0", "rules_python": "rules_python@0.22.1", "rules_cc": "rules_cc@0.0.9", "rules_proto": "rules_proto@5.3.0-21.7", @@ -2241,7 +2241,7 @@ "toolchainsToRegister": [], "extensionUsages": [], "deps": { - "platforms": "platforms@0.0.7", + "platforms": "platforms@0.0.8", "rules_cc": "rules_cc@0.0.9", "bazel_tools": "bazel_tools@_", "local_config_platform": "local_config_platform@_" @@ -2293,8 +2293,8 @@ } ], "deps": { - "bazel_skylib": "bazel_skylib@1.4.2", - "platforms": "platforms@0.0.7", + "bazel_skylib": "bazel_skylib@1.5.0", + "platforms": "platforms@0.0.8", "bazel_tools": "bazel_tools@_", "local_config_platform": "local_config_platform@_" }, @@ -2995,8 +2995,8 @@ } ], "deps": { - "bazel_skylib": "bazel_skylib@1.4.2", - "platforms": "platforms@0.0.7", + "bazel_skylib": "bazel_skylib@1.5.0", + "platforms": "platforms@0.0.8", "bazel_tools": "bazel_tools@_", "local_config_platform": "local_config_platform@_" }, @@ -3026,7 +3026,7 @@ "toolchainsToRegister": [], "extensionUsages": [], "deps": { - "platforms": "platforms@0.0.7", + "platforms": "platforms@0.0.8", "rules_foreign_cc": "rules_foreign_cc@0.9.0", "bazel_tools": "bazel_tools@_", "local_config_platform": "local_config_platform@_" @@ -3058,7 +3058,7 @@ "extensionUsages": [], "deps": { "rules_python": "rules_python@0.22.1", - "bazel_skylib": "bazel_skylib@1.4.2", + "bazel_skylib": "bazel_skylib@1.5.0", "rules_license": "rules_license@0.0.7", "bazel_tools": "bazel_tools@_", "local_config_platform": "local_config_platform@_" @@ -3088,11 +3088,11 @@ "toolchainsToRegister": [], "extensionUsages": [], "deps": { - "bazel_skylib": "bazel_skylib@1.4.2", + "bazel_skylib": "bazel_skylib@1.5.0", "rules_proto": "rules_proto@5.3.0-21.7", "com_google_protobuf": "protobuf@21.7", "com_google_absl": "abseil-cpp@20230802.0", - "platforms": "platforms@0.0.7", + "platforms": "platforms@0.0.8", "bazel_tools": "bazel_tools@_", "local_config_platform": "local_config_platform@_" }, @@ -3177,7 +3177,7 @@ } ], "deps": { - "bazel_skylib": "bazel_skylib@1.4.2", + "bazel_skylib": "bazel_skylib@1.5.0", "io_bazel_stardoc": "stardoc@0.5.1", "bazel_tools": "bazel_tools@_", "local_config_platform": "local_config_platform@_" @@ -3300,7 +3300,7 @@ "toolchainsToRegister": [], "extensionUsages": [], "deps": { - "bazel_skylib": "bazel_skylib@1.4.2", + "bazel_skylib": "bazel_skylib@1.5.0", "rules_java": "rules_java@7.4.0", "bazel_tools": "bazel_tools@_", "local_config_platform": "local_config_platform@_" @@ -3409,6 +3409,25 @@ ] } }, + "@@bazel_tools//tools/osx:xcode_configure.bzl%xcode_configure_extension": { + "general": { + "bzlTransitiveDigest": "Qh2bWTU6QW6wkrd87qrU4YeY+SG37Nvw3A0PR4Y0L2Y=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "local_config_xcode": { + "bzlFile": "@@bazel_tools//tools/osx:xcode_configure.bzl", + "ruleClassName": "xcode_autoconf", + "attributes": { + "xcode_locator": "@bazel_tools//tools/osx:xcode_locator.m", + "remote_xcode": "" + } + } + }, + "recordedRepoMappingEntries": [] + } + }, "@@bazel_tools//tools/sh:sh_configure.bzl%sh_configure_extension": { "general": { "bzlTransitiveDigest": "hp4NgmNjEg5+xgvzfh6L83bt9/aiiWETuNpwNuF1MSU=", @@ -4203,7 +4222,7 @@ }, "@@toolchains_llvm~//toolchain/extensions:llvm.bzl%llvm": { "general": { - "bzlTransitiveDigest": "3nNfnSeAMDHL89V+Fx0CSyRM5AVYpQ/ucZSH4JQW6no=", + "bzlTransitiveDigest": "rdQ1nlqTcj0kPoX7LxaygMQPcdnBPV85jNsRMF1M/Hw=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -4213,6 +4232,7 @@ "ruleClassName": "toolchain", "attributes": { "absolute_paths": false, + "archive_flags": {}, "compile_flags": {}, "coverage_compile_flags": {}, "coverage_link_flags": {}, @@ -4220,6 +4240,8 @@ "cxx_flags": {}, "cxx_standard": {}, "dbg_compile_flags": {}, + "exec_arch": "", + "exec_os": "", "link_flags": {}, "link_libs": {}, "llvm_versions": { @@ -4228,10 +4250,10 @@ "opt_compile_flags": {}, "opt_link_flags": {}, "stdlib": {}, - "sysroot": {}, "target_settings": {}, + "unfiltered_compile_flags": {}, "toolchain_roots": {}, - "unfiltered_compile_flags": {} + "sysroot": {} } }, "llvm_toolchain_llvm": { @@ -4241,6 +4263,8 @@ "alternative_llvm_sources": [], "auth_patterns": {}, "distribution": "auto", + "exec_arch": "", + "exec_os": "", "llvm_mirror": "", "llvm_version": "16.0.4", "llvm_versions": {}, diff --git a/test/test.sh b/test/test.sh index cc1e553..89e989b 100755 --- a/test/test.sh +++ b/test/test.sh @@ -4,18 +4,25 @@ set -e SCRIPT_DIR=$(dirname "$0") -BZLREG="$PWD/$SCRIPT_DIR/../bazel-bin/bzlreg/bzlreg" -BZLMOD="$PWD/$SCRIPT_DIR/../bazel-bin/bzlmod/bzlmod" +BAZEL_BIN=$(bazelisk info bazel-bin) + +BZLREG="$BAZEL_BIN/bzlreg/bzlreg" +BZLMOD="$BAZEL_BIN/bzlmod/bzlmod" TEST_REG_DIR="$PWD/$SCRIPT_DIR/reg" TEST_MODULE_DIR="$PWD/$SCRIPT_DIR/module" +rm -rf $TEST_REG_DIR +rm -rf $TEST_MODULE_DIR + echo initializing test registry $BZLREG init $TEST_REG_DIR - echo adding rules_cc to test registry $BZLREG add-module https://github.com/bazelbuild/rules_cc/releases/download/0.0.8/rules_cc-0.0.8.tar.gz --strip-prefix=rules_cc-0.0.8 --registry=$TEST_REG_DIR +echo adding known problem-some archive +$BZLREG add-module https://github.com/ecsact-dev/ecsact_lang_cpp/releases/download/0.3.4/ecsact_lang_cpp-0.3.4.tar.gz + echo initializing test module $BZLMOD init $TEST_MODULE_DIR