From 99d37df3fa5f1b4681f674c22737b38ca2fd9d0d Mon Sep 17 00:00:00 2001 From: Matt Clarkson Date: Sun, 25 Feb 2024 21:30:20 +0000 Subject: [PATCH] refactor: use `versions` rather than `bazel_features` to avoid circular load pattern --- MODULE.bazel | 2 +- go/private/sdk.bzl | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 2d6e9e0d35..6b4a274fd2 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -7,7 +7,7 @@ module( # The custom repo_name is used to prevent our bazel_features polyfill for WORKSPACE builds from # conflicting with the real bazel_features repo. -bazel_dep(name = "bazel_features", version = "1.6.0", repo_name = "io_bazel_rules_go_bazel_features") +bazel_dep(name = "bazel_features", version = "1.1.1", repo_name = "io_bazel_rules_go_bazel_features") bazel_dep(name = "bazel_skylib", version = "1.2.0") bazel_dep(name = "platforms", version = "0.0.4") bazel_dep(name = "rules_proto", version = "4.0.0") diff --git a/go/private/sdk.bzl b/go/private/sdk.bzl index 6075d2ba66..3898251388 100644 --- a/go/private/sdk.bzl +++ b/go/private/sdk.bzl @@ -16,7 +16,6 @@ load("//go/private:common.bzl", "executable_path") load("//go/private:nogo.bzl", "go_register_nogo") load("//go/private/skylib/lib:versions.bzl", "versions") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "patch", "read_user_netrc", "use_netrc") -load("@io_bazel_rules_go_bazel_features//:features.bzl", "bazel_features") MIN_SUPPORTED_VERSION = (1, 14, 0) @@ -442,7 +441,7 @@ def _remote_sdk(ctx, urls, strip_prefix, sha256): # in Bazel 6.0.0+ (bazelbuild/bazel#16052). The only situation where # .zip files are needed seems to be a macOS host using a Windows toolchain # for remote execution. - if bazel_features.external_deps.extract_supports_unicode_filenames: + if versions.is_at_least("6.4.0", versions.get() or "6.4.0"): ctx.download_and_extract( url = urls, stripPrefix = strip_prefix,