Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazel migrate to bzlmod,bazel version > 7 #849

Merged
merged 3 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .bazeliskrc

This file was deleted.

4 changes: 4 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

# Enable Bzlmod for every Bazel command
common --enable_bzlmod

# Must be first. Enables build:windows, build:linux, build:macos, build:freebsd, build:openbsd
build --enable_platform_specific_config
###############################################################################
Expand Down
8 changes: 8 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
###############################################################################
# Bazel now uses Bzlmod by default to manage external dependencies.
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
#
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
###############################################################################

bazel_dep(name = "rules_cc", version = "0.0.16")
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ bazel build ylt # Please make sure bazel in you bin path.
bazel build coro_http_example # Or replace in anyone you want to build and test.
# Actually you might take it in other project in prefix @com_alibaba_yalangtinglibs, like
bazel build @com_alibaba_yalangtinglibs://ylt

bazel version > 7
bazel build ylt --enable_bzlmod
```

You can see the test/example/benchmark executable file in `./build/output/`.
Expand Down
7 changes: 7 additions & 0 deletions WORKSPACE.bzlmod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This is a WORKSPACE file used by bzlmod in combination with MODULE.bazel.
# It's used for a gradual migration and it should be empty.
# Don't remove this file. If the file doesn't exist, bzlmod falls back to WORKSPACE file.

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

workspace(name = "com_alibaba_yalantinglibs")
Loading