Skip to content

Commit

Permalink
chore(bazel): add MODULE.bazel files for bzlmod
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <[email protected]>
  • Loading branch information
mmorel-35 committed May 17, 2024
1 parent d5d1202 commit f47fc00
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,5 @@ build:coverage --strategy=CoverageReport=local
build:coverage --experimental_use_llvm_covmap
build:coverage --collect_code_coverage
build:coverage --test_tag_filters=-nocoverage

common --enable_bzlmod
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0
6.0.0
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ coverage_report/
/compile_commands.json
# Ignore the directory in which `clangd` stores its local index.
/.cache/

MODULE.bazel.lock
39 changes: 39 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module(
name = "hessian2-codec",
repo_name = "com_alibaba_hessian2_codec",
)

bazel_dep(
name = "bazel_skylib",
version = "1.4.1",
)
bazel_dep(
name = "abseil-cpp",
version = "20220623.1",
repo_name = "com_google_absl",
)
bazel_dep(
name = "fmt",
version = "8.1.1",
repo_name = "com_github_fmtlib_fmt",
)
bazel_dep(
name = "googletest",
version = "1.11.0",
repo_name = "com_google_googletest",
)
bazel_dep(
name = "hedron_compile_commands",
version = "",
)
bazel_dep(
name = "platforms",
version = "0.0.8",
)
# -- bazel_dep definitions -- #

git_override(
module_name = "hedron_compile_commands",
commit = "5bcb0bd8a917b2b48fb5dc55818515f4be3b63ff",
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git",
)
Empty file added WORKSPACE.bzlmod
Empty file.
2 changes: 1 addition & 1 deletion common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cc_library(
],
copts = DEFAULT_COPTS,
deps = [
"@com_github_fmtlib_fmt//:fmtlib",
"@com_github_fmtlib_fmt//:fmt",
"@com_google_absl//absl/strings",
],
)
9 changes: 0 additions & 9 deletions demo/BUILD
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
load(
"@com_google_absl//absl:copts/GENERATED_copts.bzl",
"ABSL_GCC_EXCEPTIONS_FLAGS",
"ABSL_GCC_FLAGS",
"ABSL_GCC_TEST_FLAGS",
"ABSL_LLVM_EXCEPTIONS_FLAGS",
"ABSL_LLVM_FLAGS",
"ABSL_LLVM_TEST_FLAGS",
"ABSL_MSVC_EXCEPTIONS_FLAGS",
"ABSL_MSVC_FLAGS",
"ABSL_MSVC_LINKOPTS",
"ABSL_MSVC_TEST_FLAGS",
)

package(default_visibility = ["//visibility:public"])
Expand Down
21 changes: 21 additions & 0 deletions demo/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module(
name = "com_alibaba_hessian2_codec_demo",
version = "0.0.0",
)

bazel_dep(
name = "hessian2-codec",
version = "0.0.0",
repo_name = "com_alibaba_hessian2_codec",
)
bazel_dep(
name = "abseil-cpp",
version = "20220623.1",
repo_name = "com_google_absl",
)
# -- bazel_dep definitions -- #

local_path_override(
module_name = "hessian2-codec",
path = "..",
)
Empty file added demo/WORKSPACE.bzlmod
Empty file.
2 changes: 1 addition & 1 deletion example/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//:copts.bzl", "DEFAULT_COPTS", "TEST_COPTS")
load("//:copts.bzl", "DEFAULT_COPTS")

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

Expand Down

0 comments on commit f47fc00

Please sign in to comment.