bazelbuild / bazelbuild/rules_license
rules_python is declared as a dev dependency but is an actual dependency
- Dominant language
- Starlark
- Stars
- 85
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
I tried to use the SBOM rule:
```
thomas@DESKTOP-B82ERE8:~/monorepo$ bazel build //project/zemn.me/public:sbom.txt
INFO: Invocation ID: 82643534-c719-4c97-8df4-8bd7a9caabd6
INFO: Streaming build results to: https://app.buildbuddy.io/invocation/82643534-c719-4c97-8df4-8bd7a9caabd6
ERROR: error loading package '@@rules_license~//tools': Unable to find package for @@[unknown repo 'rules_python' requested from @@rules_license~]//python:defs.bzl: The repository '@@[unknown repo 'rules_python' requested from @@rules_license~]' could not be resolved: No repository visible as '@rules_python' from repository '@@rules_license~'.
ERROR: /home/thomas/monorepo/project/zemn.me/public/BUILD.bazel:64:14: every rule of type _generate_sbom implicitly depends upon the target '@@rules_license~//tools:write_sbom', but this target could not be found because of: error loading package '@@rules_license~//tools': Unable to find package for @@[unknown repo 'rules_python' requested from @@rules_license~]//python:defs.bzl: The repository '@@[unknown repo 'rules_python' requested from @@rules_license~]' could not be resolved: No repository visible as '@rules_python' from repository '@@rules_license~'.
ERROR: Analysis of target '//project/zemn.me/public:sbom.txt' failed; build aborted: Analysis failed
INFO: Elapsed time: 1.134s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
INFO: Streaming build results to: https://app.buildbuddy.io/invocation/82643534-c719-4c97-8df4-8bd7a9caabd6
```
Contributor guide
Research direction
Start by reproducing the failure with `bazel build //project/zemn.me/public:sbom.txt` and inspect `project/zemn.me/public/BUILD.bazel` near line 64. Trace the SBOM rule's dependency declarations and verify that the target analyzes and builds successfully without the missing repository error.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100