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.1.0] Symbolic macro Stardoc proto cherry picks #24607

Closed
wants to merge 2 commits into from

Conversation

tetromino
Copy link
Contributor

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

…rs, and 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
…rable and natively defined.

Follow-up fix to bazelbuild@59e99b6

PiperOrigin-RevId: 703255080
Change-Id: I1055c4c8b7e2e627199bdca9e2daab5654102831
@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 soft-release-blocker Soft release blockers that are nice to have, but shouldn't block the release if it's the last one. labels Dec 7, 2024
@tetromino tetromino added this to the 8.0.0 release blockers milestone Dec 7, 2024
@tetromino tetromino requested a review from a team as a code owner December 7, 2024 21: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 7, 2024
@tetromino tetromino removed the team-Performance Issues for Performance teams label Dec 7, 2024
@brandjon
Copy link
Member

brandjon commented Dec 9, 2024

@Wyverald I hear 8.0's release is imminent and my understanding is these changes are backwards compatible so we can retarget them to 8.1. Is the process to still merge into the release-8.0.0 branch, or has the final release not been cut yet?(We can also just keep this PR in limbo until after the release.)

@fmeum
Copy link
Collaborator

fmeum commented Dec 9, 2024

@iancha1992

@tetromino
Copy link
Contributor Author

I marked this as soft-release-blocker because I wasn't sure when 8.0 was "really" going to be cut.

This PR should not by itself block the release - but if there are any other blockers, I'd like this to go in too.

@iancha1992 iancha1992 changed the title [8.0.0] Symbolic macro Stardoc proto cherry picks [8.1.0] Symbolic macro Stardoc proto cherry picks Dec 10, 2024
@tetromino
Copy link
Contributor Author

@bazel-io fork 8.0.1

@iancha1992
Copy link
Member

Closing in favor of: #24644

@iancha1992 iancha1992 closed this Dec 11, 2024
@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
soft-release-blocker Soft release blockers that are nice to have, but shouldn't block the release if it's the last one. 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.

5 participants