From d92070113a2ac78d764a21595869fb2bdae65472 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Mon, 19 Aug 2024 23:19:49 -0400 Subject: [PATCH] chore: bump to Bazel 7.3.1 --- .bazelversion | 2 +- .github/workflows/ci.bazelrc | 3 --- .github/workflows/ci.yaml | 3 --- lib/private/BUILD.bazel | 11 ++++++++++- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.bazelversion b/.bazelversion index a8a188756..643916c03 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.1.2 +7.3.1 diff --git a/.github/workflows/ci.bazelrc b/.github/workflows/ci.bazelrc index 59d4d1531..4821d32a5 100644 --- a/.github/workflows/ci.bazelrc +++ b/.github/workflows/ci.bazelrc @@ -5,9 +5,6 @@ common --repository_cache=~/.cache/bazel-repository-cache # Debug where options came from common --announce_rc -# Allows tests to run bazelisk-in-bazel, since this is the cache folder used -common --test_env=XDG_CACHE_HOME - # Remote build execution build:rbe --extra_execution_platforms=@aspect_bazel_lib//platforms:x86_64_linux_remote build:rbe --host_platform=@aspect_bazel_lib//platforms:x86_64_linux_remote diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 37d5b8d7c..e418136c4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -124,7 +124,6 @@ jobs: path: | ~/.cache/bazel-disk-cache ~/.cache/bazel-repository-cache - ~/.cache/xdg-cache key: bazel-cache-${{ matrix.bazel-version.version }}-${{ matrix.bzlmod }}-${{ matrix.os }}-${{ matrix.folder }}-${{ hashFiles('.bazelrc', '.bazelversion', '.bazeliskrc', '**/BUILD', '**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', 'WORKSPACE.bazel', 'WORKSPACE.bzlmod', 'MODULE.bazel') }} restore-keys: bazel-cache-${{ matrix.bazel-version.version }}-${{ matrix.bzlmod }}-${{ matrix.os }}-${{ matrix.folder }}- @@ -173,8 +172,6 @@ jobs: --build_tag_filters=-skip-on-bazel${{ matrix.bazel-version.major }} \ --enable_bzlmod=${{ matrix.bzlmod }} \ //... - env: - XDG_CACHE_HOME: ~/.cache/xdg-cache # bazelisk will download bazel to here - name: Integration tests # Don't run integration tests on Windows since they are bash scripts and Windows runs Powershell diff --git a/lib/private/BUILD.bazel b/lib/private/BUILD.bazel index 384aa236e..67278ccce 100644 --- a/lib/private/BUILD.bazel +++ b/lib/private/BUILD.bazel @@ -263,7 +263,16 @@ bzl_library( srcs = [ "platform_utils.bzl", "@local_config_platform//:constraints.bzl", # keep - ], + "@platforms//host:constraints.bzl", # keep + ] + (select({ + "@aspect_bazel_lib//lib:bzlmod": [ + "@@platforms~host_platform~host_platform//:constraints.bzl", # keep + ], + "//conditions:default": [ + "@host_platform//:constraints.bzl", # keep + "@internal_platforms_do_not_use//host:constraints.bzl", # keep + ], + }) if is_bazel_7_or_greater() else []), visibility = ["//lib:__subpackages__"], deps = [], # keep )