From 652773d5fa8c87505a5d5e20c461286add55a192 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Wed, 4 Oct 2023 10:43:09 -0700 Subject: [PATCH] fix: register tar toolchain for bzlmod users (#574) --- MODULE.bazel | 3 ++- e2e/smoke/BUILD.bazel | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index cf3f65b..20b667c 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -14,12 +14,13 @@ bazel_dep(name = "platforms", version = "0.0.7") bazel_dep(name = "stardoc", version = "0.5.4", repo_name = "io_bazel_stardoc") ext = use_extension("@aspect_bazel_lib//lib:extensions.bzl", "ext") -use_repo(ext, "copy_directory_toolchains", "copy_to_directory_toolchains", "coreutils_toolchains", "expand_template_toolchains", "jq_toolchains", "yq_toolchains") +use_repo(ext, "copy_directory_toolchains", "copy_to_directory_toolchains", "coreutils_toolchains", "expand_template_toolchains", "jq_toolchains", "tar_toolchains", "yq_toolchains") register_toolchains( "@copy_directory_toolchains//:all", "@copy_to_directory_toolchains//:all", "@jq_toolchains//:all", + "@tar_toolchains//:all", "@yq_toolchains//:all", "@coreutils_toolchains//:all", "@expand_template_toolchains//:all", diff --git a/e2e/smoke/BUILD.bazel b/e2e/smoke/BUILD.bazel index d98e6e9..66f2b2d 100644 --- a/e2e/smoke/BUILD.bazel +++ b/e2e/smoke/BUILD.bazel @@ -3,6 +3,7 @@ load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory") load("@aspect_bazel_lib//lib:diff_test.bzl", "diff_test") load("@aspect_bazel_lib//lib:expand_make_vars.bzl", "expand_template") load("@aspect_bazel_lib//lib:jq.bzl", "jq") +load("@aspect_bazel_lib//lib:tar.bzl", "tar") load("@aspect_bazel_lib//lib:yq.bzl", "yq") # Validate that JQ works and resolves its toolchain @@ -83,3 +84,10 @@ diff_test( "//conditions:default": "a_stamp_expected", }), ) + +# Validate that tar works and resolves its toolchain +tar( + name = "tar_empty", + srcs = [], + mtree = [], +)