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

rules_python is declared as a dev dependency but is an actual dependency #145

Open
Zemnmez opened this issue Jul 30, 2024 · 1 comment
Open

Comments

@Zemnmez
Copy link

Zemnmez commented Jul 30, 2024

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
@aiuto aiuto added P2 internal_cleanup question Further information is requested and removed P2 internal_cleanup question Further information is requested labels Aug 1, 2024
@aiuto aiuto changed the title rules_python is declared as a dev dependency but is not rules_python is declared as a dev dependency but is an actual dependency Aug 1, 2024
@aiuto aiuto added internal_cleanup and removed question Further information is requested labels Aug 1, 2024
@aiuto
Copy link
Collaborator

aiuto commented Aug 1, 2024

The fix we would like to make is to split rules_license into two modules in the same repo. One with just the declarations and one with the tools.
It will remain a dev dep for the license() and license_kind() rules, but a real dep for the tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants