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
Clients of a vendored workspace (e.g., pip_parse_vendored) cannot use the 1-step solution documented in the readme and are instead still required to pip_parse their dependency's dependencies.
🔬 Minimal Reproduction
From slack thread (as of 66550eca4ae9d94be3a32da86e60a54cba13cf74):
Create a directory in use_pip_parse_vendored in rules_python/examples
WORKSPACE:
bazel build ...
ERROR: no such package '@@[unknown repo 'pip' requested from @@]//urllib3': The repository '@@[unknown repo 'pip' requested from @@]' could not be resolved: No repository visible as '@pip' from main repository
ERROR: /Users/davinib/code/git/nonvmware/bazel/rules_python/examples/use_pip_parse_vendored/BUILD.bazel:4:10: no such package '@@[unknown repo 'pip' requested from @@]//urllib3': The repository '@@[unknown repo 'pip' requested from @@]' could not be resolved: No repository visible as '@pip' from main repository and referenced by '//:hello_world'
ERROR: Analysis of target '//:hello_world' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.946s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
Bazel 6.4.0:
ERROR: /Users/davinib/code/git/nonvmware/bazel/rules_python/examples/use_pip_parse_vendored/BUILD.bazel:4:10: no such package '@pip//urllib3': The repository '@pip' could not be resolved: Repository '@pip' is not defined and referenced by '//:hello_world'
ERROR: Analysis of target '//:hello_world' failed; build aborted: Analysis failed
🌍 Your Environment
Mac x86 14.4.1 (23E224)
Output of bazel version:
Both 7.1.2 and 6.4.0
Rules_python version:
ToT on 0.32.2 - 66550eca4ae9d94be3a32da86e60a54cba13cf74
Anything else relevant?
From slack thread:
Yeah, it is unfortunate that it is broken right now and the reason is that we are using aliases in the requirements.bzl for accessing the packages.
I think the targets in https://github.com/bazelbuild/rules_python/blob/main/examples/pip_parse_vendored/requirements.bzl#L9 should look like @pip_certify//:pkg instead of @pip//certify:pkg. Feel free to raise an issue in rules_python and a PR to fix this would be really welcome.
In the mean time the vendoring script could use some shell substitution like: sed 's|\(@pip\)//\(.*\):|\1_\2//:|g in order to get it generate the correct requirements.bzl.
The text was updated successfully, but these errors were encountered:
aignas
added a commit
to aignas/rules_python
that referenced
this issue
Jun 7, 2024
With this change we are now again generating a working
`requirements.bzl` file which broke during our switch
to using the `hub` repo.
Fixesbazelbuild#1918.
🐞 bug report
Affected Rule
vendored pip_parse dependencies
Is this a regression?
Yes, fixed in #608 and linked issues
Description
Clients of a vendored workspace (e.g., pip_parse_vendored) cannot use the 1-step solution documented in the readme and are instead still required to
pip_parse
their dependency's dependencies.🔬 Minimal Reproduction
From slack thread (as of
66550eca4ae9d94be3a32da86e60a54cba13cf74
):Create a directory in
use_pip_parse_vendored
inrules_python/examples
WORKSPACE:
hello_world.py in same directory (that wants to use one of the pip_parse_vendored requirements):
BUILD.bazel file that uses the dependency:
🔥 Exception or Error
Bazel 7.1.2:
Bazel 6.4.0:
🌍 Your Environment
Mac x86 14.4.1 (23E224)
Output of
bazel version
:Both 7.1.2 and 6.4.0
Rules_python version:
ToT on 0.32.2 -
66550eca4ae9d94be3a32da86e60a54cba13cf74
Anything else relevant?
From slack thread:
Yeah, it is unfortunate that it is broken right now and the reason is that we are using aliases in the requirements.bzl for accessing the packages.
I think the targets in https://github.com/bazelbuild/rules_python/blob/main/examples/pip_parse_vendored/requirements.bzl#L9 should look like @pip_certify//:pkg instead of @pip//certify:pkg. Feel free to raise an issue in rules_python and a PR to fix this would be really welcome.
In the mean time the vendoring script could use some shell substitution like:
sed 's|\(@pip\)//\(.*\):|\1_\2//:|g
in order to get it generate the correct requirements.bzl.The text was updated successfully, but these errors were encountered: