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

Switch back to Bazel 7.4.0 #8290

Merged
merged 2 commits into from
Feb 3, 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 --remote_cache_async
common --experimental_remote_cache_async
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 @@
8.0.1
7.4.0
153 changes: 50 additions & 103 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ workspace(

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

# Load core rulesets before invoking any dependency macros to ensure that the
# versions listed below are actually honored - the last repo from the first
# block delimited by loads wins.

# Bazel platforms

http_archive(
name = "platforms",
sha256 = "218efe8ee736d26a3572663b374a253c012b716d8af0c07e842e82f238a0a7ee",
Expand All @@ -25,6 +22,10 @@ http_archive(
url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.12.0/bazel_features-v1.12.0.tar.gz",
)

load("@bazel_features//:deps.bzl", "bazel_features_deps")

bazel_features_deps()

http_archive(
name = "bazel_skylib",
sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f",
Expand All @@ -34,116 +35,25 @@ http_archive(
],
)

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("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

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",
)
bazel_skylib_workspace()

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",
name = "rules_pkg",
integrity = "sha256-0gyVGWDtd8t7NBwqWUiFNOSU1a0dMMSBjHNtV3cqn+8=",
url = "https://github.com/bazelbuild/rules_pkg/releases/download/1.0.1/rules_pkg-1.0.1.tar.gz",
)

# Proto rules

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 = "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",
)

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"],
)

# Packaging rules

http_archive(
name = "rules_pkg",
integrity = "sha256-0gyVGWDtd8t7NBwqWUiFNOSU1a0dMMSBjHNtV3cqn+8=",
url = "https://github.com/bazelbuild/rules_pkg/releases/download/1.0.1/rules_pkg-1.0.1.tar.gz",
)

load("@bazel_features//:deps.bzl", "bazel_features_deps")

bazel_features_deps()

load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

bazel_skylib_workspace()

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()

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

py_repositories()

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

rules_shell_dependencies()

rules_shell_toolchains()

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()

# Go

# keep in sync with go.mod
Expand Down Expand Up @@ -364,6 +274,43 @@ 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 @@ -588,10 +535,10 @@ swc_register_toolchains(

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

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: 1 addition & 0 deletions website/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package(default_visibility = ["//visibility:public"])
SRCS = glob([
"src/**",
"static/**",
"docs/**",
]) + [
"docusaurus.config.js",
"yarn.lock",
Expand Down