-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First steps towards exclusively using MODULE.bazel, for now a subset of changes already improving the state a lot. * Add MODULE.bazel and add dependencies already provided by the Bazel Central Registry. * Remove the above from WORKSPACE and dependency_support/{load,initialize}_external.bzl. * Add some patches, as some external dependencies used @rules_cc// to get cc_proto_library and cc_library, which is not available anymore in latest rules_cc (but provided by bazel itself) * Fallout: the compilation db currently can't be built anymore due to the compdb not compatible anymore with bzlmod. I have a plan to replace that, but not in this first CL; for now, it is just disabled. Things for follow-up PRs * move the remaining load_exernal.bzl also to MODULE.bazel, but use the repo rules to fetch projects. * Upstream more tools we use to Bazel Central Registry; e.g. low hanging fruit would be to get a later version of protoc-gen-validate in there or add lineoise. * Rules python and its toolchain can probably be simplified. * fix compilation db. Issues: #931
- Loading branch information
Showing
24 changed files
with
399 additions
and
654 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ user.bazelrc | |
.vscode | ||
.cache | ||
docs/ | ||
MODULE.bazel.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
module( | ||
name = "xls", | ||
repo_name = "com_google_xls", | ||
) | ||
|
||
# Compiler toolchain | ||
bazel_dep(name = "toolchains_llvm", version = "1.3.0") | ||
|
||
# Configure and register the toolchain. | ||
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm") | ||
llvm.toolchain( | ||
llvm_version = "17.0.6", | ||
) | ||
use_repo(llvm, "llvm_toolchain") | ||
|
||
register_toolchains("@llvm_toolchain//:all") | ||
|
||
# | ||
bazel_dep(name = "abseil-cpp", version = "20240722.1", repo_name = "com_google_absl") | ||
bazel_dep(name = "abseil-py", version = "2.1.0", repo_name = "com_google_absl_py") | ||
bazel_dep(name = "bazel_features", version = "1.25.0") | ||
bazel_dep(name = "bazel_skylib", version = "1.7.1") | ||
bazel_dep(name = "boringssl", version = "0.20250114.0") | ||
bazel_dep(name = "googleapis", version = "0.0.0-20240819-fe8ba054a", repo_name = "com_google_googleapis") | ||
bazel_dep(name = "grpc", version = "1.69.0", repo_name = "com_github_grpc_grpc") | ||
bazel_dep(name = "nlohmann_json", version = "3.11.3.bcr.1") | ||
bazel_dep(name = "platforms", version = "0.0.11") | ||
bazel_dep(name = "protobuf", version = "29.3", repo_name = "com_google_protobuf") | ||
bazel_dep(name = "re2", version = "2024-07-02.bcr.1", repo_name = "com_googlesource_code_re2") | ||
bazel_dep(name = "riegeli", version = "0.0.0-20241218-3385e3c", repo_name = "com_google_riegeli") | ||
bazel_dep(name = "rules_license", version = "1.0.0") | ||
bazel_dep(name = "rules_pkg", version = "1.0.1") | ||
bazel_dep(name = "rules_proto", version = "7.1.0") | ||
bazel_dep(name = "verible", version = "0.0.3933") | ||
|
||
# Dev dependencies | ||
bazel_dep(name = "fuzztest", version = "20241028.0", dev_dependency = True, repo_name = "com_google_fuzztest") | ||
bazel_dep(name = "google_benchmark", version = "1.9.1", dev_dependency = True, repo_name = "com_google_benchmark") | ||
bazel_dep(name = "googletest", version = "1.15.2", dev_dependency = True, repo_name = "com_google_googletest") | ||
|
||
# Repositories we don't really depend on directly, but we need to provide | ||
# for other dependencies as they are using old versions that are not | ||
# compatible with current bazel. | ||
bazel_dep(name = "rules_bison", version = "0.3") | ||
bazel_dep(name = "rules_flex", version = "0.3") | ||
bazel_dep(name = "rules_java", version = "8.7.2") | ||
bazel_dep(name = "protoc-gen-validate", version = "1.0.4.bcr.2") | ||
single_version_override( | ||
module_name = "protoc-gen-validate", | ||
patch_strip = 1, | ||
patches = ["//dependency_support:protoc-gen-validate/no-rulescc.patch"], | ||
version = "1.0.4.bcr.2", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
dependency_support/com_github_grpc_grpc/0001-Add-absl-status-to-deps.patch
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
42 changes: 0 additions & 42 deletions
42
dependency_support/com_google_fuzztest/e317d5277e34948ae7048cb5e48309e0288e8df3.patch
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.