[Bug]: Loading error when imported alongside rules_js (v1.39.0)
ltews opened this issue · comments
What happened?
When loading both bazel-lib and rules_js in WORKSPACE.bazel, building a rules_js npm_import target fails when bazel-lib is loaded before rules_js. This issue goes away when the import order is swapped. Indicates possibly bazel-lib 1.39.0 is incompatible with rules_js 1.34.0.
$bazel build <npm_import_target>
.../external/copy_directory_toolchains/BUILD.bazel:12:15: error loading package '@aspect_bazel_lib//tools/copy_directory': Unable to find package for @io_bazel_rules_go//go:def.bzl: The repository '@io_bazel_rules_go' could not be resolved: Repository '@io_bazel_rules_go' is not defined. and referenced by '@copy_directory_toolchains//:source'
Version
Development (host) and target OS/architectures: Darwin/Linux
Output of bazel --version
: bazel 6.4.0
Version of the Aspect rules, or other relevant rules from your
WORKSPACE
or MODULE.bazel
file:
bazel-lib 1.39.0
rules_js 1.34.0
Language(s) and/or frameworks involved: JS
How to reproduce
1. load bazel-lib 1.39.0 as per release notes in WORKSPACE.bazel
2. load rules_js 1.34.0 as per release notes in WORKSPACE.bazel
3. Create npm_import target
4. $bazel build <npm_import_target>
Any other information?
This issue doesn't exist on bazel-lib versions 1.38.0, 1.38.1, or 2.01.