You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran bazel sync on Linux in a workspace which depends on aspect-build/bazel-lib. It failed with an error about a dictionary not containing a key for a different platform.
Version
Development (host) and target OS/architectures:
Output of bazel --version:
$ bazel --version
bazel 6.2.0
Version of the Aspect rules, or other relevant rules from your WORKSPACE or MODULE.bazel file:
2.0.2
Language(s) and/or frameworks involved:
None
How to reproduce
1. Create a folder called `mre_bazel_sync`
2. Create an empty `BUILD` file
3. Create a `WORKSPACE` file with the following content.
workspace(name = "mre_bazel_sync")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_bazel_lib",
sha256 = "4c1de11ebabc23a3c976b73a2b2647596f545beda8a61d2c1c034e07f3f8b976",
strip_prefix = "bazel-lib-2.0.2",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.0.2/bazel-lib-v2.0.2.tar.gz",
)
load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "aspect_bazel_lib_register_toolchains")
aspect_bazel_lib_dependencies()
aspect_bazel_lib_register_toolchains()
4. Run `bazel sync`
Any other information?
INFO: Repository bsd_tar_windows_amd64 instantiated at:
/home/sloretz/projects/sdk/mre-sync-issue/WORKSPACE:14:37: in <toplevel>
/home/sloretz/.cache/bazel/_bazel_sloretz/b31e869f84d42f493eab6c61a24d6c3e/external/aspect_bazel_lib/lib/repositories.bzl:250:28: in aspect_bazel_lib_register_toolchains
/home/sloretz/.cache/bazel/_bazel_sloretz/b31e869f84d42f493eab6c61a24d6c3e/external/aspect_bazel_lib/lib/repositories.bzl:94:27: in register_tar_toolchains
Repository rule bsdtar_binary_repo defined at:
/home/sloretz/.cache/bazel/_bazel_sloretz/b31e869f84d42f493eab6c61a24d6c3e/external/aspect_bazel_lib/lib/private/tar_toolchain.bzl:165:37: in <toplevel>
ERROR: An error occurred during the fetch of repository 'bsd_tar_windows_amd64':
Traceback (most recent call last):
File "/home/sloretz/.cache/bazel/_bazel_sloretz/b31e869f84d42f493eab6c61a24d6c3e/external/aspect_bazel_lib/lib/private/tar_toolchain.bzl", line 143, column 30, in _bsdtar_binary_repo
for lib in LINUX_LIB_DEPS[rctx.attr.platform]:
Error: key "windows_amd64" not found in dictionary
ERROR: /home/sloretz/projects/sdk/mre-sync-issue/WORKSPACE:14:37: fetching bsdtar_binary_repo rule //external:bsd_tar_windows_amd64: Traceback (most recent call last):
File "/home/sloretz/.cache/bazel/_bazel_sloretz/b31e869f84d42f493eab6c61a24d6c3e/external/aspect_bazel_lib/lib/private/tar_toolchain.bzl", line 143, column 30, in _bsdtar_binary_repo
for lib in LINUX_LIB_DEPS[rctx.attr.platform]:
Error: key "windows_amd64" not found in dictionary
INFO: Repository bsd_tar_host instantiated at:
/home/sloretz/projects/sdk/mre-sync-issue/WORKSPACE:14:37: in <toplevel>
/home/sloretz/.cache/bazel/_bazel_sloretz/b31e869f84d42f493eab6c61a24d6c3e/external/aspect_bazel_lib/lib/repositories.bzl:250:28: in aspect_bazel_lib_register_toolchains
/home/sloretz/.cache/bazel/_bazel_sloretz/b31e869f84d42f493eab6c61a24d6c3e/external/aspect_bazel_lib/lib/repositories.bzl:94:27: in register_tar_toolchains
Repository rule bsdtar_binary_repo defined at:
/home/sloretz/.cache/bazel/_bazel_sloretz/b31e869f84d42f493eab6c61a24d6c3e/external/aspect_bazel_lib/lib/private/tar_toolchain.bzl:165:37: in <toplevel>
ERROR: An error occurred during the fetch of repository 'bsd_tar_host':
Traceback (most recent call last):
File "/home/sloretz/.cache/bazel/_bazel_sloretz/b31e869f84d42f493eab6c61a24d6c3e/external/aspect_bazel_lib/lib/private/tar_toolchain.bzl", line 125, column 38, in _bsdtar_binary_repo
tar = _find_usable_system_tar(rctx, tar_name)
File "/home/sloretz/.cache/bazel/_bazel_sloretz/b31e869f84d42f493eab6c61a24d6c3e/external/aspect_bazel_lib/lib/private/tar_toolchain.bzl", line 110, column 9, in _find_usable_system_tar
fail("tar isn't a BSD tar")
Error in fail: tar isn't a BSD tar
ERROR: /home/sloretz/projects/sdk/mre-sync-issue/WORKSPACE:14:37: fetching bsdtar_binary_repo rule //external:bsd_tar_host: Traceback (most recent call last):
File "/home/sloretz/.cache/bazel/_bazel_sloretz/b31e869f84d42f493eab6c61a24d6c3e/external/aspect_bazel_lib/lib/private/tar_toolchain.bzl", line 125, column 38, in _bsdtar_binary_repo
tar = _find_usable_system_tar(rctx, tar_name)
File "/home/sloretz/.cache/bazel/_bazel_sloretz/b31e869f84d42f493eab6c61a24d6c3e/external/aspect_bazel_lib/lib/private/tar_toolchain.bzl", line 110, column 9, in _find_usable_system_tar
fail("tar isn't a BSD tar")
Error in fail: tar isn't a BSD tar
ERROR: key "windows_amd64" not found in dictionary
checking cached actions
The text was updated successfully, but these errors were encountered:
What happened?
I ran
bazel sync
on Linux in a workspace which depends onaspect-build/bazel-lib
. It failed with an error about a dictionary not containing a key for a different platform.Version
Development (host) and target OS/architectures:
Output of
bazel --version
:Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:2.0.2
Language(s) and/or frameworks involved:
None
How to reproduce
Any other information?
The text was updated successfully, but these errors were encountered: