Skip to content

Commit

Permalink
fix: register tar toolchain for bzlmod users (#574)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Dec 23, 2023
1 parent d68c332 commit e2dea40
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions e2e/smoke/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = [],
)

0 comments on commit e2dea40

Please sign in to comment.