From 74f8597cf8340654e2160d408290ed5d0a372d71 Mon Sep 17 00:00:00 2001 From: Kelwan Date: Wed, 19 Jun 2024 13:50:01 -0700 Subject: [PATCH] chore: update bazel, empty workspace, ecsact and other deps --- .bazelversion | 2 +- .gitignore | 1 + MODULE.bazel | 26 ++++++++++++++++++++++---- WORKSPACE.bazel | 36 ------------------------------------ bazel/common.bazelrc | 1 - 5 files changed, 24 insertions(+), 42 deletions(-) diff --git a/.bazelversion b/.bazelversion index 91e4a9f..0ee843c 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -6.3.2 +7.2.0 diff --git a/.gitignore b/.gitignore index 793fa8b..46cbacc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # bazel /bazel-* /user.bazelrc +*.bazel.lock # https://github.com/hedronvision/bazel-compile-commands-extractor /compile_commands.json diff --git a/MODULE.bazel b/MODULE.bazel index 286a23e..de62120 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -4,8 +4,26 @@ module( compatibility_level = 1, ) -bazel_dep(name = "ecsact_runtime", version = "0.5.4") -bazel_dep(name = "ecsact_codegen", version = "0.1.3") +bazel_dep(name = "ecsact_runtime", version = "0.6.5") +bazel_dep(name = "ecsact_codegen", version = "0.2.0") bazel_dep(name = "rules_cc", version = "0.0.9") -bazel_dep(name = "ecsact_lang_cpp", version = "0.3.1") -bazel_dep(name = "bazel_skylib", version = "1.4.2") +bazel_dep(name = "ecsact_lang_cpp", version = "0.4.4") +bazel_dep(name = "bazel_skylib", version = "1.7.1") + +bazel_dep(name = "toolchains_llvm", version = "1.0.0", dev_dependency = True) +bazel_dep(name = "hedron_compile_commands", dev_dependency = True) + +git_override( + module_name = "hedron_compile_commands", + commit = "204aa593e002cbd177d30f11f54cff3559110bb9", + remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git", +) + +llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True) +llvm.toolchain(llvm_version = "17.0.6") +use_repo(llvm, "llvm_toolchain") + +register_toolchains( + "@llvm_toolchain//:all", + dev_dependency = True, +) diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index b6fa726..e69de29 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -1,36 +0,0 @@ -workspace(name = "ecsact_lang_csharp") - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -http_archive( - name = "hedron_compile_commands", - sha256 = "f01636585c3fb61c7c2dc74df511217cd5ad16427528ab33bc76bb34535f10a1", - strip_prefix = "bazel-compile-commands-extractor-a14ad3a64e7bf398ab48105aaa0348e032ac87f8", - url = "https://github.com/hedronvision/bazel-compile-commands-extractor/archive/a14ad3a64e7bf398ab48105aaa0348e032ac87f8.tar.gz", -) - -load("@hedron_compile_commands//:workspace_setup.bzl", "hedron_compile_commands_setup") - -hedron_compile_commands_setup() - -http_archive( - name = "com_grail_bazel_toolchain", - sha256 = "670caaefc77a752a8bbd701dfef2207e41efb36c381e99f851c99785651aff81", - strip_prefix = "bazel-toolchain-0d302de75f6ace071ac616fb274481eedcc20e5a", - url = "https://github.com/grailbio/bazel-toolchain/archive/0d302de75f6ace071ac616fb274481eedcc20e5a.zip", -) - -load("@com_grail_bazel_toolchain//toolchain:deps.bzl", "bazel_toolchain_dependencies") - -bazel_toolchain_dependencies() - -load("@com_grail_bazel_toolchain//toolchain:rules.bzl", "llvm_toolchain") - -llvm_toolchain( - name = "llvm_toolchain", - llvm_version = "16.0.4", -) - -load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains") - -llvm_register_toolchains() diff --git a/bazel/common.bazelrc b/bazel/common.bazelrc index ebb4c3e..50ddd64 100644 --- a/bazel/common.bazelrc +++ b/bazel/common.bazelrc @@ -4,7 +4,6 @@ common --registry=https://raw.githubusercontent.com/ecsact-dev/bazel_registry/ma common --registry=https://raw.githubusercontent.com/bazelboost/registry/main common --registry=https://bcr.bazel.build build --enable_platform_specific_config -build --incompatible_use_platforms_repo_for_constraints build --incompatible_enable_cc_toolchain_resolution build --incompatible_strict_action_env build --enable_runfiles