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
In one module, I define a js_binary rule (using markdownlint from npm). I can run this fine in this module.
I make another module, and depend on the first module using local_path_override. If any targets in the second module refer to the js_binary from the first module, I get an error saying the repository could not be resolved.
Development (host) and target OS/architectures: Ubuntu 22.04 x86_64
Output of bazel --version: 7.0.0
Version of the Aspect rules, or other relevant rules from your WORKSPACE or MODULE.bazel file: 1.34.1
$ bazel run -- @pnpm//:pnpm --dir $PWD install --lockfile-only
Then in the first module, the following works:
$ bazel run :markdownlint -- --version
0.38.0
But trying to run the target in the second module, that references the first, doesn't work:
$ cd other
$ bazel run :markdownlint -- --version
Starting local Bazel server and connecting to it...
bazel: Entering directory `/home/callie/.cache/bazel/_bazel_callie/5b831d15f550aa9c312e3eef2fd97503/execroot/_main/'
INFO: Repository rules_nodejs~5.8.2~node~nodejs_linux_amd64 instantiated at:
<builtin>: in <toplevel>
Repository rule node_repositories defined at:
/home/callie/.cache/bazel/_bazel_callie/5b831d15f550aa9c312e3eef2fd97503/external/rules_nodejs~5.8.2/nodejs/repositories.bzl:374:36: in <toplevel>
ERROR: no such package '@@[unknown repo 'md-test~override' requested from @@md-test~override]//': The repository '@@[unknown repo 'md-test~override' requested from @@md-test~override]' could not be resolved: No repository visible as '@md-test~override' from repository '@@md-test~override'
ERROR: /home/callie/.cache/bazel/_bazel_callie/5b831d15f550aa9c312e3eef2fd97503/external/md-test~override/BUILD:6:33: no such package '@@[unknown repo 'md-test~override' requested from @@md-test~override]//': The repository '@@[unknown repo 'md-test~override' requested from @@md-test~override]' could not be resolved: No repository visible as '@md-test~override' from repository '@@md-test~override' and referenced by '@@md-test~override//:markdownlint'
bazel: Leaving directory `/home/callie/.cache/bazel/_bazel_callie/5b831d15f550aa9c312e3eef2fd97503/execroot/_main/'
ERROR: Analysis of target '//:markdownlint' failed; build aborted: Analysis failed
INFO: Elapsed time: 6.153s, Critical Path: 0.05s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target
The text was updated successfully, but these errors were encountered:
I am hitting the same problem. Any way to resolve this? The rationale is that we would like to embed some tools based on rules_js for an internal tooling module that will be shared among a few other Bazel repos. Currently we have to work around the problem by setting up the executable in all consuming repos and pass a label pointing to the tools we need when registering the tooling module.
In one module, I define a js_binary rule (using markdownlint from npm). I can run this fine in this module.
I make another module, and depend on the first module using local_path_override. If any targets in the second module refer to the js_binary from the first module, I get an error saying the repository could not be resolved.
Development (host) and target OS/architectures: Ubuntu 22.04 x86_64
Output of
bazel --version
: 7.0.0Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file: 1.34.1Language(s) and/or frameworks involved: js
Minimal example:
Initialise with:
Then in the first module, the following works:
But trying to run the target in the second module, that references the first, doesn't work:
The text was updated successfully, but these errors were encountered: