-
Notifications
You must be signed in to change notification settings - Fork 4.4k
[bazel.build] Problem with /reference/be/python #24014
Description
Page link:
https://bazel.build/reference/be/python
Problem description (include actual vs expected text, if applicable):
The "view source" link for the Python rules is going to a non-existent file.
In rules_python, we're cleaning up some cruft left over from the Bazel->rules_python transition, but it turns out that Bazel's docgen is pointing to some of the internal files being moved around and consolidated.
After bazel-contrib/rules_python#2285, the python/private/common/* files were moved to python/private, so the docs now link to non-existent files.
However, when I grepped around for where the docgen appeared to be doing this, i found:
load("@rules_python//python/private/common:py_binary_rule_bazel.bzl", "py_binary")
This looks problematic for 3 reasons:
- We've removed the
python/private/commondirectory - We're planning to merge the
*_bazel.bzlfiles into the other files (e.g.py_binary_rule_bazel.bzlgets merged intopy_binary_rule.bzl) - It appears to be loading from some version of rules_python, so what paths docgen should use are going to depend on the rules_python version it's using.
I'm not sure how the docgen works, so I'm not sure how closely coupled that "VIEW SOURCE" link is to the underlying docgen.
A few ideas:
- Link to rules_python's docs instead of the source. This is probably the best option anyways, because the doc strings aren't rendering quite right on the Bazel site.
- Link to e.g.
python/py_binary.bzlinstead of the location underpython/private - On the rules_python side, we can re-add the paths Bazel is pointing to. They'd just be a no-op file with some comments so users don't land on a 404 page and know where they can go instead.
Where do you see this issue? (include link to specific section of the page, if applicable)
Page: https://bazel.build/reference/be/python#py_binary
The "VIEW RULE SOURCE" button goes to a non-existent file.
Any other information you'd like to share?
No response