Skip to content

Add docstrings to members of typing#198

Closed
sleiner-v wants to merge 1 commit into
facebook:mainfrom
sleiner-v:upstream/typing-doc
Closed

Add docstrings to members of typing#198
sleiner-v wants to merge 1 commit into
facebook:mainfrom
sleiner-v:upstream/typing-doc

Conversation

@sleiner-v

@sleiner-v sleiner-v commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Implementations of StarlarkValue::documentation() derived from actual Rust docstrings are not automatically generated by #[starlark_value], but instead by #[starlark_module]. The typing module does not use #[starlark_module], and introducing a second spot where Rust docstrings would be picked up for Starlark::documentation() seemed confusing, so this patch hand-rolls the function implementations.

Implementations of StarlarkValue::documentation() derived from
actual Rust docstrings are not automatically generated
by #[starlark_value], but instead by #[starlark_module].
The typing module does not use #[starlark_module], and
introducing a second spot where Rust docstrings would be picked
up for StarlarkDocumentation seemed confusing, so this patch
hand-rolls the function implementations.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 5, 2026
@meta-codesync

meta-codesync Bot commented Jun 5, 2026

Copy link
Copy Markdown

This pull request has been imported. If you are a Meta employee, you can view this in D107654015. (Because this pull request was imported automatically, there will not be any future comments.)

@ndmitchell ndmitchell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

meta-codesync Bot pushed a commit to facebook/buck2 that referenced this pull request Jun 8, 2026
Summary:
Implementations of StarlarkValue::documentation() derived from actual Rust docstrings are not automatically generated by #[starlark_value], but instead by #[starlark_module]. The typing module does not use #[starlark_module], and introducing a second spot where Rust docstrings would be picked up for StarlarkDocumentation seemed confusing, so this patch hand-rolls the function implementations.

X-link: facebook/starlark-rust#198

Reviewed By: ndmitchell

Differential Revision: D107654015

fbshipit-source-id: e3414e6e9f1d6d885096bb3d53c88f83745046d1
@meta-codesync meta-codesync Bot closed this in b7034f9 Jun 8, 2026
@meta-codesync

meta-codesync Bot commented Jun 8, 2026

Copy link
Copy Markdown

This pull request has been merged in b7034f9.

@facebook-github-tools

Copy link
Copy Markdown

This pull request has been reverted by aa3e5bf.

@sleiner-v sleiner-v deleted the upstream/typing-doc branch June 9, 2026 07:27
@sleiner-v

Copy link
Copy Markdown
Contributor Author

This pull request has been reverted by aa3e5bf.

Unfortunately, I cannot see why it was reverted. @ndmitchell can you share any details?

@ndmitchell

Copy link
Copy Markdown
Contributor

@sleiner-v it broke some tests - not totally sure why. Attempting to fix and reland.

@ndmitchell

Copy link
Copy Markdown
Contributor

I put it back again as b96627e. Hoping that it doesn't get reverted again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged Reverted

2 participants