Skip to content

Feat: Typed Kotlin-name stubs, and a CI artifact of them for Compose 1.11.1 - #43

Merged
b-re-w merged 2 commits into
developfrom
work/typed-stubs
Oct 2, 2026
Merged

b-re-w merged 2 commits into
developfrom
work/typed-stubs

Conversation

@b-re-w

@b-re-w b-re-w commented Oct 2, 2026

Copy link
Copy Markdown
Member

Closes #31
Closes #32

  • Stub classes per bound Kotlin type; extensions also on the receiver class (ClassVar Protocol); value classes as primitives; Callable for function types; @overload in binder order; keyword-only after defaults.
  • mypy consumer check (tools/stubs/check-stubs.sh) with a mutation check; StubSignatureAgreesWithRuntimeTest compares stubs to inspect.signature (fixed a default-marking defect it found).
  • .github/workflows/stubs.yml: generate over Compose 1.11.1, check, upload artifact, attach to v* tags (ubuntu, because Shadow/shadow collide on case-insensitive macOS).

Local: plugin tests 164/0 (rerun by the coordinator), artifact fixtures 35/0. Limitations listed in docs/design/pyi-generation-design.md §8.

b-re-w added 2 commits October 3, 2026 08:26
…1.11.1

Stubs annotate bound Kotlin types as stub classes instead of int: one class per
type in its own package module, extensions also as callable attributes of the
receiver's class, value classes as their primitive, function types as
Callable, overload sets @overload-ed in the binder's resolution order,
required-after-default keyword-only as inspect.signature has it. Still Kotlin
names only. A mypy consumer check (tools/stubs) and a stub-vs-runtime signature
test guard them; the comparison found and fixed defaults the binder does not
honour. .github/workflows/stubs.yml publishes the Compose 1.11.1 stubs.
@b-re-w
b-re-w merged commit 86012ca into develop Oct 2, 2026
6 checks passed
@b-re-w
b-re-w deleted the work/typed-stubs branch October 2, 2026 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant