Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: aspect_bazel_lib's "coreutils_toolchain_type" is not configured as needed #134

Closed
seh opened this issue Nov 27, 2023 · 0 comments · Fixed by #135
Closed

[Bug]: aspect_bazel_lib's "coreutils_toolchain_type" is not configured as needed #134

seh opened this issue Nov 27, 2023 · 0 comments · Fixed by #135
Labels
bug Something isn't working good first issue Good for newcomers: GitHub surfaces these specially help wanted Aspect isn't prioritizing this, but the community could

Comments

@seh
Copy link
Contributor

seh commented Nov 27, 2023

What happened?

Per preceding discussion in the "general" channel of the "Bazel" Slack workspace, when trying to use the rules_webpack Bazel module at the released version 0.13.0, the webpack_bundle rule fails to find the coreutils toolchain that it needs, per the following error:

ERROR: /some/path/BUILD.bazel:117:15: in _webpack_bundle rule //path/app:dist: 
Traceback (most recent call last):
	File "/private/var/tmp/_bazel_seh/c8bba5caec7d941b54eb1f99ff1041dd/external/aspect_rules_webpack~0.13.0/webpack/private/webpack_bundle.bzl", line 166, column 34, in _impl
		copy_files_to_bin_actions(ctx, inputs) + no_copy_bin_inputs,
	File "/private/var/tmp/_bazel_seh/c8bba5caec7d941b54eb1f99ff1041dd/external/aspect_bazel_lib~2.0.1/lib/private/copy_to_bin.bzl", line 132, column 36, in copy_files_to_bin_actions
		return [copy_file_to_bin_action(ctx, file) for file in files]
	File "/private/var/tmp/_bazel_seh/c8bba5caec7d941b54eb1f99ff1041dd/external/aspect_bazel_lib~2.0.1/lib/private/copy_to_bin.bzl", line 84, column 21, in copy_file_to_bin_action
		copy_file_action(ctx, file, dst)
	File "/private/var/tmp/_bazel_seh/c8bba5caec7d941b54eb1f99ff1041dd/external/aspect_bazel_lib~2.0.1/lib/private/copy_file.bzl", line 84, column 31, in copy_file_action
		coreutils = ctx.toolchains[_COREUTILS_TOOLCHAIN].coreutils_info
Error: In _webpack_bundle rule //path/app:dist, toolchain type @aspect_bazel_lib~2.0.1//lib:coreutils_toolchain_type was requested but only types [] are configured

See these recent changes in other Bazel repositories that address this problem:

Version

Development (host) and target OS/architectures:

Output of bazel --version: bazel 6.4.0- (@non-git) (installed via Nix)

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:

Module Version
aspect_bazel_lib 2.0.1
aspect_rules_esbuild 0.16.0
aspect_rules_js 1.34.1
aspect_rules_ts 2.1.0
aspect_rules_webpack 0.13.0

Language(s) and/or frameworks involved:

  • JavaScript
  • TypeScript

How to reproduce

Using the Bazel modules noted above, define a target like the following in a BUILD.bazel file:

load(
    "@aspect_rules_webpack//webpack:defs.bzl",
    "webpack_bundle",
)

# ...

webpack_bundle(
    name = "dist",
    srcs = [
        ":srcs",
    ],
    node_modules = "//:node_modules",
    output_dir = True,
    webpack_config = "webpack.config.js",
)
@seh seh added the bug Something isn't working label Nov 27, 2023
@github-actions github-actions bot added the untriaged Requires traige label Nov 27, 2023
@alexeagle alexeagle added good first issue Good for newcomers: GitHub surfaces these specially help wanted Aspect isn't prioritizing this, but the community could and removed untriaged Requires traige labels Nov 27, 2023
@github-project-automation github-project-automation bot moved this to ✅ Done in Open Source Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers: GitHub surfaces these specially help wanted Aspect isn't prioritizing this, but the community could
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants