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: Update to Bazel 8.0.1 #8076

Merged
merged 1 commit into from
Jan 29, 2025
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
4 changes: 2 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
common --noenable_bzlmod
common --enable_workspace
common --lockfile_mode=update
common --nolegacy_external_runfiles

common --enable_platform_specific_config=true

Expand Down Expand Up @@ -238,7 +238,7 @@ common:macos --workspace_status_command=$(pwd)/workspace_status.sh
common:windows --workspace_status_command="bash workspace_status.sh"

# Misc remote cache/BES optimizations
common --experimental_remote_cache_async
common --remote_cache_async
fmeum marked this conversation as resolved.
Show resolved Hide resolved
common --remote_build_event_upload=minimal
common --nolegacy_important_outputs

Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4.0
8.0.1
130 changes: 90 additions & 40 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,62 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

bazel_skylib_workspace()

http_archive(
name = "rules_cc",
sha256 = "abc605dd850f813bb37004b77db20106a19311a96b2da1c92b789da529d28fe1",
strip_prefix = "rules_cc-0.0.17",
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.17/rules_cc-0.0.17.tar.gz"],
)

http_archive(
name = "rules_java",
sha256 = "a64ab04616e76a448c2c2d8165d836f0d2fb0906200d0b7c7376f46dd62e59cc",
urls = [
"https://github.com/bazelbuild/rules_java/releases/download/8.6.2/rules_java-8.6.2.tar.gz",
],
)

load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies")

rules_java_dependencies()

# note that the following line is what is minimally required from protobuf for the java rules
# consider using the protobuf_deps() public API from @com_google_protobuf//:protobuf_deps.bzl
load("@com_google_protobuf//bazel/private:proto_bazel_features.bzl", "proto_bazel_features") # buildifier: disable=bzl-visibility

proto_bazel_features(name = "proto_bazel_features")

# register toolchains
load("@rules_java//java:repositories.bzl", "rules_java_toolchains")

rules_java_toolchains()

http_archive(
name = "rules_python",
sha256 = "4f7e2aa1eb9aa722d96498f5ef514f426c1f55161c3c9ae628c857a7128ceb07",
strip_prefix = "rules_python-1.0.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.0.0/rules_python-1.0.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

http_archive(
name = "rules_shell",
sha256 = "d8cd4a3a91fc1dc68d4c7d6b655f09def109f7186437e3f50a9b60ab436a0c53",
strip_prefix = "rules_shell-0.3.0",
url = "https://github.com/bazelbuild/rules_shell/releases/download/v0.3.0/rules_shell-v0.3.0.tar.gz",
)

load("@rules_shell//shell:repositories.bzl", "rules_shell_dependencies", "rules_shell_toolchains")

rules_shell_dependencies()

rules_shell_toolchains()

# Packaging rules

http_archive(
name = "rules_pkg",
integrity = "sha256-0gyVGWDtd8t7NBwqWUiFNOSU1a0dMMSBjHNtV3cqn+8=",
Expand All @@ -47,13 +103,44 @@ http_archive(

# Proto rules

http_archive(
name = "zlib",
# patch_args = ["-p1"],
patches = [
# from https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/zlib/1.3.1.bcr.3/patches/add_build_file.patch
"//buildpatches:zlib.patch",
],
sha256 = "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23",
strip_prefix = "zlib-1.3.1",
urls = ["https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.gz"],
)

http_archive(
name = "com_google_protobuf",
integrity = "sha256-YMGrS+/p0Kl1wjRLVRG/a0T5HsPhQmyHj1a/MKBYnEM=",
strip_prefix = "protobuf-29.2",
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v29.2/protobuf-29.2.zip"],
Comment on lines +120 to +122
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Let's not downgrade this. Use the current version or upgrade to the latest.

)

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()

http_archive(
name = "rules_proto",
sha256 = "14a225870ab4e91869652cfd69ef2028277fc1dc4910d65d353b62d6e0ae21f4",
strip_prefix = "rules_proto-7.1.0",
url = "https://github.com/bazelbuild/rules_proto/releases/download/7.1.0/rules_proto-7.1.0.tar.gz",
)

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies")

rules_proto_dependencies()

load("@rules_proto//proto:toolchains.bzl", "rules_proto_toolchains")

rules_proto_toolchains()

# Go

# keep in sync with go.mod
Expand Down Expand Up @@ -274,43 +361,6 @@ load("@com_google_googletest//:googletest_deps.bzl", "googletest_deps")

googletest_deps()

http_archive(
name = "com_google_protobuf",
integrity = "sha256-6bmsGRCxBBBlg5hQYDyvNuKdPT0jDd9SvRN3jdMbkEY=",
strip_prefix = "protobuf-29.3",
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v29.3/protobuf-29.3.zip"],
)

http_archive(
name = "zlib",
# patch_args = ["-p1"],
patches = [
# from https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/zlib/1.3.1.bcr.3/patches/add_build_file.patch
"//buildpatches:zlib.patch",
],
sha256 = "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23",
strip_prefix = "zlib-1.3.1",
urls = ["https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.gz"],
)

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies")

rules_proto_dependencies()

load("@rules_proto//proto:toolchains.bzl", "rules_proto_toolchains")

rules_proto_toolchains()

# rules_python is loaded by protobuf_deps, but the dependencies of rules_python are not
# we need to load it here to ensure com_google_protobuf could be used.
load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

# Docker

http_archive(
Expand Down Expand Up @@ -535,10 +585,10 @@ swc_register_toolchains(

http_archive(
name = "io_bazel_rules_webtesting",
sha256 = "3e25ac044ed409545214cf8b013fa7255ccf1d2fa027b0d57a3fcc7d732da667",
strip_prefix = "rules_webtesting-9e9361ba887a3b687f537c02409b690b62fecdfe",
integrity = "sha256-VlUJ/CRGCcaT+JlNBVN+mA9bZEeVDhd03gHPnRstqnE=",
strip_prefix = "rules_webtesting-ce5e6d63b23b01c2a71178ef764384f64a81ad23",
urls = [
"https://github.com/bazelbuild/rules_webtesting/archive/9e9361ba887a3b687f537c02409b690b62fecdfe.tar.gz",
"https://github.com/bazelbuild/rules_webtesting/archive/ce5e6d63b23b01c2a71178ef764384f64a81ad23.tar.gz",
],
)

Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE.bzlmod
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ esbuild_repositories(npm_repository = "npm")

http_archive(
name = "io_bazel_rules_webtesting",
sha256 = "3e25ac044ed409545214cf8b013fa7255ccf1d2fa027b0d57a3fcc7d732da667",
strip_prefix = "rules_webtesting-9e9361ba887a3b687f537c02409b690b62fecdfe",
integrity = "sha256-VlUJ/CRGCcaT+JlNBVN+mA9bZEeVDhd03gHPnRstqnE=",
strip_prefix = "rules_webtesting-ce5e6d63b23b01c2a71178ef764384f64a81ad23",
urls = [
"https://github.com/bazelbuild/rules_webtesting/archive/9e9361ba887a3b687f537c02409b690b62fecdfe.tar.gz",
"https://github.com/bazelbuild/rules_webtesting/archive/ce5e6d63b23b01c2a71178ef764384f64a81ad23.tar.gz",
],
)
fmeum marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
6 changes: 3 additions & 3 deletions buildpatches/bzlmod_com_github_awslabs_soci_snapshotter.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ index 0d10a4d..bca5dac 100644
"zinfo.go",
],
cgo = True,
- clinkopts = ["-Lztoc/compression/external/gazelle~~go_deps~com_github_awslabs_soci_snapshotter/ztoc/out -l:libz.a"],
- clinkopts = ["-Lztoc/compression/external/gazelle++go_deps+com_github_awslabs_soci_snapshotter/ztoc/out -l:libz.a"],
+ cdeps = ["@@//:zlib"],
+ clinkopts = ["-Lztoc/compression/external/gazelle~~go_deps~com_github_awslabs_soci_snapshotter/ztoc/out"],
copts = ["-Iztoc/compression/external/gazelle~~go_deps~com_github_awslabs_soci_snapshotter/ztoc/compression"],
+ clinkopts = ["-Lztoc/compression/external/gazelle++go_deps+com_github_awslabs_soci_snapshotter/ztoc/out"],
copts = ["-Iztoc/compression/external/gazelle++go_deps+com_github_awslabs_soci_snapshotter/ztoc/compression"],
importpath = "github.com/awslabs/soci-snapshotter/ztoc/compression",
visibility = ["//visibility:public"],
1 change: 0 additions & 1 deletion website/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package(default_visibility = ["//visibility:public"])
SRCS = glob([
"src/**",
"static/**",
"docs/**",
]) + [
"docusaurus.config.js",
"yarn.lock",
Expand Down
Loading