fix: register tar toolchain for bzlmod users (#574)

This commit is contained in:
Alex Eagle 2023-10-04 10:43:09 -07:00 committed by GitHub
parent a283a8216d
commit 652773d5fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -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",

View File

@ -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 = [],
)