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

[bazel.build] Problem with /reference/be/python #24014

Open
rickeylev opened this issue Oct 16, 2024 · 0 comments
Open

[bazel.build] Problem with /reference/be/python #24014

rickeylev opened this issue Oct 16, 2024 · 0 comments
Labels
team-Documentation Documentation improvements that cannot be directly linked to other team labels team-Rules-Python Native rules for Python type: documentation (cleanup) untriaged

Comments

@rickeylev
Copy link
Contributor

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 bazelbuild/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/common directory
  • We're planning to merge the *_bazel.bzl files into the other files (e.g. py_binary_rule_bazel.bzl gets merged into py_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.bzl instead of the location under python/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

rickeylev added a commit to rickeylev/rules_python that referenced this issue Oct 16, 2024
The Bazel docs link to the implementation files, which were recently
moved. To avoid users getting a 404, add stub files with some text
to direct them somewhere useful.

Work towards bazelbuild/bazel#24014
@iancha1992 iancha1992 added team-Rules-Python Native rules for Python team-Documentation Documentation improvements that cannot be directly linked to other team labels type: documentation (cleanup) untriaged labels Oct 16, 2024
github-merge-queue bot pushed a commit to bazelbuild/rules_python that referenced this issue Oct 17, 2024
The Bazel docs link to the implementation files, which were recently
moved. To avoid users getting a 404, add stub files with some text to
direct them somewhere useful.

Work towards bazelbuild/bazel#24014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Documentation Documentation improvements that cannot be directly linked to other team labels team-Rules-Python Native rules for Python type: documentation (cleanup) untriaged
Projects
None yet
Development

No branches or pull requests

2 participants