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

[8.0.1] Symbolic macro Stardoc proto cherry picks #24644

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

tetromino
Copy link
Contributor

Fixes #24643

This is a cherry-pick of the following 2 commits, which collectively allow API documentation generation for symbolic macros using Stardoc:

  1. Update symbolic macro stardoc protos for visibility, finalizers, and attribute inheritance

Cherry-pick of

59e99b6
PiperOrigin-RevId: 700811908
Change-Id: I5486919b9e2af98a7d08f952f8075216c3c60bfd

  1. In stardoc proto output, mark macro visibility as non-configurable and natively defined.

Cherry-pick of

e6a44c8

PiperOrigin-RevId: 703255080
Change-Id: I1055c4c8b7e2e627199bdca9e2daab5654102831

…attribute inheritance

Symbolic macros have a mandatory visibility attribute - we need to document it.

To support attribute inheritance in documentation generation, it suffices to
extract non-Starlark-defined attributes in macros, and expose the fact that
they are non-Starlark-defined - so that a documentation renderer can provide
a link to bazel.build common attributes for the natively defined common
attributes that don't have a doc string.

Take the opportunity to refactor addDocumentableAttributes() into a better
shape (taking an explicit argument for the implicitly-added attributes), and
fix the long-standing bug that Stardoc has been inserting a non-existent
"name" attribute for aspects (which was partly obscured by the old
addDocumentableAttributes() implementation).

RELNOTES: Fix starlark_doc_extract proto output for symbolic macro visibility,
attribute inheritance, and rule finalizers; and remove non-existent "name"
attribute from starlark_doc_extract output for aspects.
PiperOrigin-RevId: 700811908
Change-Id: I5486919b9e2af98a7d08f952f8075216c3c60bfd
…d natively defined.

Follow-up fix to bazelbuild@59e99b6

PiperOrigin-RevId: 703255080
Change-Id: I1055c4c8b7e2e627199bdca9e2daab5654102831
@tetromino tetromino requested a review from a team as a code owner December 10, 2024 20:55
@github-actions github-actions bot added team-Performance Issues for Performance teams awaiting-review PR is awaiting review from an assigned reviewer labels Dec 10, 2024
@tetromino tetromino added team-Documentation Documentation improvements that cannot be directly linked to other team labels team-Loading-API BUILD file and macro processing: labels, package(), visibility, glob and removed team-Performance Issues for Performance teams labels Dec 10, 2024
@meteorcloudy meteorcloudy added this pull request to the merge queue Dec 11, 2024
Merged via the queue into bazelbuild:release-8.0.1 with commit 2a4f9c7 Dec 11, 2024
46 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Dec 11, 2024
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-Loading-API BUILD file and macro processing: labels, package(), visibility, glob
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants