Skip to content

Commit

Permalink
Upgrade to bazel 7.1.1
Browse files Browse the repository at this point in the history
Change-Id: I7207da90df84e4634cdb3661a27f5e380fe9ca5c
Signed-off-by: Austin Schuh <[email protected]>
  • Loading branch information
AustinSchuh committed May 9, 2024
1 parent de351bc commit 8f99c82
Show file tree
Hide file tree
Showing 88 changed files with 336 additions and 319 deletions.
8 changes: 7 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ build --incompatible_exclusive_test_sandboxed
build --strategy=TsProject=sandboxed
build --strategy=CopyFile=standalone
build --strategy=CopyDirectory=standalone
build --strategy=CopyToDirectory=standalone

# Honor the setting of `skipLibCheck` in the tsconfig.json file.
# https://www.typescriptlang.org/tsconfig#skipLibCheck
Expand Down Expand Up @@ -136,8 +137,13 @@ build --per_file_copt=-third_party/.*,-external/.*@-Werror,-Wextra,-Wpointer-ari
# NOTE: Explicitly disable -Werror because the `-external/.*` filter does not work
build --per_file_copt=third_party/.*,external/.*@-Wno-sign-compare,-Wno-cast-align,-Wno-error,-Wno-unused-parameter,-Wno-cast-qual,-Wno-format-nonliteral,-Wno-tautological-type-limit-compare,-Wno-missing-field-initializers,-Wno-unused-function,-Wno-cast-function-type,-Wno-comment,-Wno-typedef-redefinition,-Wno-tautological-unsigned-enum-zero-compare,-Wno-extra,-Wno-type-limits,-Wno-attributes,-Wno-deprecated

# bzlmod breaks our code base right now, deal with this later.
common --enable_bzlmod=false

# Disable warnings about using directories in Bazel.
startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1

# Load a local file that users can use to customize bazel invocations. This
# should stay the last line in this file so users can override things when they
# want.
try-import %workspace%/.bazelrc.user

6 changes: 3 additions & 3 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@aspect_rules_js//npm:defs.bzl", "npm_link_package")
load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")
load("@npm//:defs.bzl", "npm_link_all_packages")

# Link npm packages
npm_link_all_packages(name = "node_modules")
Expand Down
134 changes: 70 additions & 64 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ load("@ci_configure//:ci.bzl", "RUNNING_IN_CI")

http_archive(
name = "platforms",
sha256 = "2c8d8347427e6bb0ba7cf9f933c08fe2be2b62ff2454546ad852f7bf267aad87",
strip_prefix = "platforms-e658a6af526089406d0057160542597501ba65d7",
url = "https://github.com/bazelbuild/platforms/archive/e658a6af526089406d0057160542597501ba65d7.zip",
sha256 = "218efe8ee736d26a3572663b374a253c012b716d8af0c07e842e82f238a0a7ee",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
],
)

http_archive(
Expand All @@ -31,9 +33,9 @@ bazel_skylib_workspace()

http_archive(
name = "aspect_bazel_lib",
sha256 = "979667bb7276ee8fcf2c114c9be9932b9a3052a64a647e0dcaacfb9c0016f0a3",
strip_prefix = "bazel-lib-2.4.1",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.4.1/bazel-lib-v2.4.1.tar.gz",
sha256 = "a8a92645e7298bbf538aa880131c6adb4cf6239bbd27230f077a00414d58e4ce",
strip_prefix = "bazel-lib-2.7.2",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.7.2/bazel-lib-v2.7.2.tar.gz",
)

load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "aspect_bazel_lib_register_toolchains", "register_jq_toolchains")
Expand Down Expand Up @@ -117,82 +119,82 @@ load(
apache2_debs = "files",
)
load(
"//debian:postgresql_amd64.bzl",
postgresql_amd64_debs = "files",
"//debian:arm_frc_gnueabi_deps.bzl",
arm_frc_gnueabi_deps_debs = "files",
)
load(
"//debian:patch.bzl",
patch_debs = "files",
"//debian:clang_amd64.bzl",
clang_amd64_debs = "files",
)
load(
"//debian:rsync.bzl",
rsync_debs = "files",
"//debian:gstreamer_amd64.bzl",
gstreamer_amd64_debs = "files",
)
load(
"//debian:ssh.bzl",
ssh_debs = "files",
"//debian:gtk_runtime.bzl",
gtk_runtime_debs = "files",
)
load(
"//debian:pandoc.bzl",
pandoc_debs = "files",
"//debian:libtinfo5_amd64.bzl",
libtinfo5_amd64_debs = "files",
)
load(
"//debian:libtinfo5_arm64.bzl",
libtinfo5_arm64_debs = "files",
)
load(
"//debian:libusb.bzl",
libusb_debs = "files",
)
load(
"//debian:mingw_compiler.bzl",
mingw_compiler_debs = "files",
"//debian:lzma_amd64.bzl",
lzma_amd64_debs = "files",
)
load(
"//debian:patchelf.bzl",
patchelf_debs = "files",
"//debian:lzma_arm64.bzl",
lzma_arm64_debs = "files",
)
load(
"//debian:arm_frc_gnueabi_deps.bzl",
arm_frc_gnueabi_deps_debs = "files",
"//debian:m4.bzl",
m4_debs = "files",
)
load(
"//debian:gtk_runtime.bzl",
gtk_runtime_debs = "files",
"//debian:mingw_compiler.bzl",
mingw_compiler_debs = "files",
)
load(
"//debian:opencv_amd64.bzl",
opencv_amd64_debs = "files",
)
load("//debian:packages.bzl", "generate_repositories_for_debs")
load(
"//debian:gstreamer_amd64.bzl",
gstreamer_amd64_debs = "files",
"//debian:pandoc.bzl",
pandoc_debs = "files",
)
load(
"//debian:m4.bzl",
m4_debs = "files",
"//debian:patch.bzl",
patch_debs = "files",
)
load(
"//debian:lzma_amd64.bzl",
lzma_amd64_debs = "files",
"//debian:patchelf.bzl",
patchelf_debs = "files",
)
load(
"//debian:lzma_arm64.bzl",
lzma_arm64_debs = "files",
"//debian:postgresql_amd64.bzl",
postgresql_amd64_debs = "files",
)
load(
"//debian:libtinfo5_amd64.bzl",
libtinfo5_amd64_debs = "files",
"//debian:rsync.bzl",
rsync_debs = "files",
)
load(
"//debian:libtinfo5_arm64.bzl",
libtinfo5_arm64_debs = "files",
"//debian:ssh.bzl",
ssh_debs = "files",
)
load(
"//debian:xvfb_amd64.bzl",
xvfb_amd64_debs = "files",
)
load(
"//debian:clang_amd64.bzl",
clang_amd64_debs = "files",
)
load("//debian:packages.bzl", "generate_repositories_for_debs")

generate_repositories_for_debs(rsync_debs)

Expand Down Expand Up @@ -379,9 +381,9 @@ http_archive(
name = "com_google_absl",
patch_args = ["-p1"],
patches = ["//third_party/abseil:abseil.patch"],
sha256 = "ea1d31db00eb37e607bfda17ffac09064670ddf05da067944c4766f517876390",
strip_prefix = "abseil-cpp-c2435f8342c2d0ed8101cb43adfd605fdc52dca2",
url = "https://github.com/abseil/abseil-cpp/archive/c2435f8342c2d0ed8101cb43adfd605fdc52dca2.zip",
sha256 = "733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc",
strip_prefix = "abseil-cpp-20240116.2",
url = "https://github.com/abseil/abseil-cpp/archive/refs/tags/20240116.2.tar.gz",
)

local_repository(
Expand Down Expand Up @@ -869,9 +871,15 @@ cc_library(

http_archive(
name = "aspect_rules_js",
sha256 = "630a71aba66c4023a5b16ab3efafaeed8b1a2865ccd168a34611eb73876b3fc4",
strip_prefix = "rules_js-1.37.1",
url = "https://github.com/aspect-build/rules_js/releases/download/v1.37.1/rules_js-v1.37.1.tar.gz",
patch_args = [
"-p1",
],
patches = [
"//third_party:rules_js/0001-Fix-package-permissions.patch",
],
sha256 = "bc9b4a01ef8eb050d8a7a050eedde8ffb1e45a56b0e4094e26f06c17d5fcf1d5",
strip_prefix = "rules_js-1.41.2",
url = "https://github.com/aspect-build/rules_js/releases/download/v1.41.2/rules_js-v1.41.2.tar.gz",
)

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
Expand Down Expand Up @@ -1319,10 +1327,10 @@ http_archive(
patches = [
"@//third_party:rules_go/0001-Disable-warnings-for-external-repositories.patch",
],
sha256 = "dd926a88a564a9246713a9c00b35315f54cbd46b31a26d5d8fb264c07045f05d",
sha256 = "af47f30e9cbd70ae34e49866e201b3f77069abb111183f2c0297e7e74ba6bbc0",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.47.0/rules_go-v0.47.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.47.0/rules_go-v0.47.0.zip",
],
)

Expand All @@ -1334,10 +1342,10 @@ http_archive(
patches = [
"@//third_party:bazel-gazelle/0001-Fix-visibility-of-gazelle-runner.patch",
],
sha256 = "ecba0f04f96b4960a5b250c8e8eeec42281035970aa8852dda73098274d14a1d",
sha256 = "75df288c4b31c81eb50f51e2e14f4763cb7548daae126817247064637fd9ea62",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.36.0/bazel-gazelle-v0.36.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.36.0/bazel-gazelle-v0.36.0.tar.gz",
],
)

Expand All @@ -1360,18 +1368,18 @@ gazelle_dependencies()

http_archive(
name = "com_google_protobuf",
sha256 = "ace0abf35274ee0f08d5564635505ed55a0bc346a6534413d3c5b040fc926332",
strip_prefix = "protobuf-24.3",
url = "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v24.3.zip",
sha256 = "4fc5ff1b2c339fb86cd3a25f0b5311478ab081e65ad258c6789359cd84d421f8",
strip_prefix = "protobuf-26.1",
url = "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v26.1.tar.gz",
)

http_archive(
name = "com_github_grpc_grpc",
patch_args = ["-p1"],
patches = ["//debian:grpc.patch"],
sha256 = "a3a65f0129c4922c5d7f4c11dcd40083a12ca54076fd3a927bcd63c53b7e44a5",
strip_prefix = "grpc-1.59.2",
url = "https://github.com/grpc/grpc/archive/refs/tags/v1.59.2.tar.gz",
sha256 = "493d9905aa09124c2f44268b66205dd013f3925a7e82995f36745974e97af609",
strip_prefix = "grpc-1.63.0",
url = "https://github.com/grpc/grpc/archive/refs/tags/v1.63.0.tar.gz",
)

load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
Expand Down Expand Up @@ -1472,17 +1480,15 @@ http_archive(
)

# This one is tricky to get an archive because it has recursive submodules. These semi-automated steps do work though:
# git clone -b 1.10.34 --recurse-submodules --depth=1 https://github.com/aws/aws-sdk-cpp
# git clone -b 1.11.321 --recurse-submodules --depth=1 https://github.com/aws/aws-sdk-cpp
# cd aws-sdk-cpp
# echo bsdtar -a -cf aws_sdk-version.tar.gz --ignore-zeros @\<\(git archive HEAD\) $(git submodule foreach --recursive --quiet 'echo @\<\(cd $displaypath \&\& git archive HEAD --prefix=$displaypath/\)')
# Now run the command that printed, and the output will be at aws_sdk-version.tar.gz.
http_archive(
name = "aws_sdk",
build_file = "//debian:aws_sdk.BUILD",
patch_args = ["-p1"],
patches = ["//debian:aws_sdk.patch"],
sha256 = "de6570d10c246189fd8c02100f7f0d9af8499a3ef94a131eeb85619f3bd6c604",
url = "https://software.frc971.org/Build-Dependencies/aws_sdk-1.10.34.tar.gz",
sha256 = "08856b91139d209f7423e60dd8f74a14ab6d053ca40088fcb42fd02484003e95",
url = "https://software.frc971.org/Build-Dependencies/aws_sdk-1.11.321.tar.gz",
)

# Source code of LZ4 (files under lib/) are under BSD 2-Clause.
Expand Down
2 changes: 1 addition & 1 deletion aos/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_py_library")
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:autocxx.bzl", "autocxx_library")
load("//tools/rust:defs.bzl", "flatbuffer_rust_library", "rust_library")

Expand Down
2 changes: 1 addition & 1 deletion aos/actions/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:config.bzl", "aos_config")
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")

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

Expand Down
4 changes: 2 additions & 2 deletions aos/analysis/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:js.bzl", "ts_project")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
load("//aos:config.bzl", "aos_config")
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:js.bzl", "ts_project")

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

Expand Down
4 changes: 2 additions & 2 deletions aos/events/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
load("//aos:config.bzl", "aos_config")
load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:autocxx.bzl", "autocxx_library")
load("//tools/rust:defs.bzl", "flatbuffer_rust_library", "rust_binary", "rust_library", "rust_test")

Expand Down
4 changes: 2 additions & 2 deletions aos/events/logging/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:config.bzl", "aos_config")
load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")

static_flatbuffer(
name = "logger_fbs",
Expand Down Expand Up @@ -201,9 +201,9 @@ cc_library(
"@com_google_absl//absl/types:span",
] + select({
"//tools:cpu_k8": [
":lzma_encoder",
":s3_fetcher",
":s3_file_operations",
":lzma_encoder",
],
"//tools:cpu_arm64": [":lzma_encoder"],
"//conditions:default": [],
Expand Down
2 changes: 1 addition & 1 deletion aos/flatbuffers/generate.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@aspect_bazel_lib//lib:run_binary.bzl", "run_binary")
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")

def static_flatbuffer(name, visibility = None, deps = [], srcs = [], **kwargs):
"""Generates the code for the static C++ flatbuffer API for the specified fbs file.
Expand Down
2 changes: 1 addition & 1 deletion aos/logging/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")

# The primary client logging interface.
cc_library(
Expand Down
8 changes: 4 additions & 4 deletions aos/network/BUILD
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos/seasocks:gen_embedded.bzl", "gen_embedded")
load("//aos:config.bzl", "aos_config")
load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
load("@com_github_grpc_grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library")
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//aos:config.bzl", "aos_config")
load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos/seasocks:gen_embedded.bzl", "gen_embedded")

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

Expand Down
2 changes: 1 addition & 1 deletion aos/network/www/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//tools/build_rules:js.bzl", "rollup_bundle", "ts_project")
load("//aos:config.bzl", "aos_config")
load("//tools/build_rules:js.bzl", "rollup_bundle", "ts_project")

exports_files(["styles.css"])

Expand Down
4 changes: 2 additions & 2 deletions aos/starter/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:config.bzl", "aos_config")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
load("//aos:config.bzl", "aos_config")
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")

exports_files(["roborio_irq_config.json"])

Expand Down
4 changes: 2 additions & 2 deletions aos/util/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("config_validator_macro.bzl", "config_validator_test")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")

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

Expand Down
Loading

0 comments on commit 8f99c82

Please sign in to comment.