aspect-build / rules_swc

Bazel rules for the swc toolchain https://swc.rs/
https://docs.aspect.build/rules/aspect_rules_swc
Apache License 2.0
41 stars 21 forks source link

[Bug]: Can't be used with bazel-lib 2.0 #225

Closed alexeagle closed 3 months ago

alexeagle commented 3 months ago

What happened?

ERROR: /platformweb/ui/dashboard/src/components/TitleBar/BUILD.bazel:3:15: in swc_transpiler rule //platformweb/ui/dashboard/src/components/TitleBar:TitleBar_transpile: 
Traceback (most recent call last):
        File "/shared/cache/bazel/user_base/35d3dfb99a7e1d1ac0ae38df0bff0ffd/external/aspect_rules_swc/swc/private/swc.bzl", line 160, column 46, in _impl
                inputs = [copy_file_to_bin_action(ctx, src)] + swcinfo.tool_files
        File "/shared/cache/bazel/user_base/35d3dfb99a7e1d1ac0ae38df0bff0ffd/external/aspect_bazel_lib/lib/private/copy_to_bin.bzl", line 84, column 21, in copy_file_to_bin_action
                copy_file_action(ctx, file, dst)
        File "/shared/cache/bazel/user_base/35d3dfb99a7e1d1ac0ae38df0bff0ffd/external/aspect_bazel_lib/lib/private/copy_file.bzl", line 84, column 31, in copy_file_action
                coreutils = ctx.toolchains[_COREUTILS_TOOLCHAIN].coreutils_info
Error: In swc_transpiler rule //platformweb/ui/dashboard/src/components/TitleBar:TitleBar_transpile, toolchain type @aspect_bazel_lib//lib:coreutils_toolchain_type was requested but only types [@aspect_rules_swc//swc:toolchain_type] are configured

Same idea as https://github.com/aspect-build/rules_webpack/pull/135

Version

HEAD

How to reproduce

No response

Any other information?

No response

alexeagle commented 3 months ago

Err, my mistake, we don't have any copy actions at HEAD so it's not needed there.