Skip to content

docs: Starlark ints are not limited to 32 bits - #30689

Open
karpovantonme wants to merge 1 commit into
bazelbuild:masterfrom
karpovantonme:doc/starlark-int-magnitude
Open

docs: Starlark ints are not limited to 32 bits#30689
karpovantonme wants to merge 1 commit into
bazelbuild:masterfrom
karpovantonme:doc/starlark-int-magnitude

Conversation

@karpovantonme

Copy link
Copy Markdown
Contributor

Part of #27257

/rules/language says:

Int type is limited to 32-bit signed integers. Overflows will throw an error.

StarlarkInt says the opposite, and has for a while:

The type of integers in Starlark. Starlark integers may be of any magnitude; arithmetic is exact

That docstring is what generates /rules/lib/int, so the two pages on the same site contradict each other. This replaces the stale bullet and links to the generated page so they stay together

So one line, no other changes

The float and set half of #27257 is already gone from this page, so I left the issue open rather than closing it with this

The page says the int type is limited to 32-bit signed integers and that
overflow throws. StarlarkInt has documented the opposite since it moved to
arbitrary precision, and the generated page at /rules/lib/int says integers
may be of any magnitude and arithmetic is exact.

Part of bazelbuild#27257. The float and set part of that issue is already fixed.
@github-actions github-actions Bot added team-Documentation Documentation improvements that cannot be directly linked to other team labels awaiting-review PR is awaiting review from an assigned reviewer labels Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review PR is awaiting review from an assigned reviewer team-Documentation Documentation improvements that cannot be directly linked to other team labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant