Skip to content

Commit 4d11c6b

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

File tree

10 files changed

+69
-12
lines changed

10 files changed

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

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)