Skip to content

Commit c7d4fa2

Browse files
committed
chore(bazel): add MODULE.bazel files for bzlmod
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
1 parent d5d1202 commit c7d4fa2

File tree

10 files changed

+68
-12
lines changed

10 files changed

+68
-12
lines changed

.bazelrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,5 @@ build:coverage --strategy=CoverageReport=local
106106
build:coverage --experimental_use_llvm_covmap
107107
build:coverage --collect_code_coverage
108108
build:coverage --test_tag_filters=-nocoverage
109+
110+
common --enable_bzlmod

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0.0
1+
6.0.0

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ coverage_report/
1515
/compile_commands.json
1616
# Ignore the directory in which `clangd` stores its local index.
1717
/.cache/
18+
19+
MODULE.bazel.lock

MODULE.bazel

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
module(
2+
name = "hessian2-codec",
3+
repo_name = "com_alibaba_hessian2_codec",
4+
)
5+
6+
bazel_dep(
7+
name = "bazel_skylib",
8+
version = "1.4.1",
9+
)
10+
bazel_dep(
11+
name = "abseil-cpp",
12+
version = "20220623.1",
13+
repo_name = "com_google_absl",
14+
)
15+
bazel_dep(
16+
name = "fmt",
17+
version = "8.1.1",
18+
repo_name = "com_github_fmtlib_fmt",
19+
)
20+
bazel_dep(
21+
name = "googletest",
22+
version = "1.11.0",
23+
repo_name = "com_google_googletest",
24+
)
25+
bazel_dep(
26+
name = "platforms",
27+
version = "0.0.8",
28+
)
29+
30+
bazel_dep(
31+
name = "hedron_compile_commands",
32+
dev_dependency = True,
33+
)
34+
# -- bazel_dep definitions -- #
35+
36+
git_override(
37+
module_name = "hedron_compile_commands",
38+
commit = "5bcb0bd8a917b2b48fb5dc55818515f4be3b63ff",
39+
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git",
40+
)

WORKSPACE.bzlmod

Whitespace-only changes.

common/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ cc_library(
3333
],
3434
copts = DEFAULT_COPTS,
3535
deps = [
36-
"@com_github_fmtlib_fmt//:fmtlib",
36+
"@com_github_fmtlib_fmt//:fmt",
3737
"@com_google_absl//absl/strings",
3838
],
3939
)

demo/BUILD

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
load(
22
"@com_google_absl//absl:copts/GENERATED_copts.bzl",
3-
"ABSL_GCC_EXCEPTIONS_FLAGS",
43
"ABSL_GCC_FLAGS",
5-
"ABSL_GCC_TEST_FLAGS",
6-
"ABSL_LLVM_EXCEPTIONS_FLAGS",
7-
"ABSL_LLVM_FLAGS",
8-
"ABSL_LLVM_TEST_FLAGS",
9-
"ABSL_MSVC_EXCEPTIONS_FLAGS",
10-
"ABSL_MSVC_FLAGS",
11-
"ABSL_MSVC_LINKOPTS",
12-
"ABSL_MSVC_TEST_FLAGS",
134
)
145

156
package(default_visibility = ["//visibility:public"])

demo/MODULE.bazel

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module(
2+
name = "com_alibaba_hessian2_codec_demo",
3+
version = "0.0.0",
4+
)
5+
6+
bazel_dep(
7+
name = "hessian2-codec",
8+
version = "0.0.0",
9+
repo_name = "com_alibaba_hessian2_codec",
10+
)
11+
bazel_dep(
12+
name = "abseil-cpp",
13+
version = "20220623.1",
14+
repo_name = "com_google_absl",
15+
)
16+
# -- bazel_dep definitions -- #
17+
18+
local_path_override(
19+
module_name = "hessian2-codec",
20+
path = "..",
21+
)

demo/WORKSPACE.bzlmod

Whitespace-only changes.

example/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("//:copts.bzl", "DEFAULT_COPTS", "TEST_COPTS")
1+
load("//:copts.bzl", "DEFAULT_COPTS")
22

33
package(default_visibility = ["//visibility:public"])
44

0 commit comments

Comments
 (0)