bazel-lib icon indicating copy to clipboard operation
bazel-lib copied to clipboard

[Bug]: key "freebsd_amd64" not found in dictionary

Open EByrdS opened this issue 2 years ago • 1 comments

What happened?

I added an http_archive that loads this repository transitively. In one of the function calls, it uses copy_directory_platform_repo, but raises the error in the title.

This happens because COPY_DIRECTORY_PLATORMS has the key freebsd_amd64, but COPY_DIRECTORY_INTEGRITY used here and declared here does not.

Version

Dev architecture: MacOS arm64

bazel --version
bazel 6.3.2-homebrew

Tool that I want to install:

http_archive(
    name = "aspect_rules_js",
    sha256 = "77c4ea46c27f96e4aadcc580cd608369208422cf774988594ae8a01df6642c82",
    strip_prefix = "rules_js-1.32.2",
    url = "https://github.com/aspect-build/rules_js/releases/download/v1.32.2/rules_js-v1.32.2.tar.gz",
)

aspect_bazel_lib loaded transitively:

http_archive(
    name = "aspect_bazel_lib",
    sha256 = "44f4f6d1ea1fc5a79ed6ca83f875038fee0a0c47db4f9c9beed097e56f8fad03",
    strip_prefix = "bazel-lib-1.34.0",
    url = "https://github.com/aspect-build/bazel-lib/releases/download/v1.34.0/bazel-lib-v1.34.0.tar.gz",
)

The error happens when bazel syncing.

The version downloaded there is different from the latest one here, but I think the code would yield the same error given that the key does not exist.

How to reproduce

WORKSPACE

http_archive(
    name = "aspect_rules_js",
    sha256 = "77c4ea46c27f96e4aadcc580cd608369208422cf774988594ae8a01df6642c82",
    strip_prefix = "rules_js-1.32.2",
    url = "https://github.com/aspect-build/rules_js/releases/download/v1.32.2/rules_js-v1.32.2.tar.gz",
)


load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")

OS: MacOS arm64 (Apple M2 Max)

EByrdS avatar Sep 22 '23 08:09 EByrdS

I don't think we have enough freebsd users to prioritize this ourselves, but we should definitely publish binaries for that platform. In the meantime you should be able to configure the toolchain registration to build those tools from sources.

alexeagle avatar Oct 05 '23 15:10 alexeagle