Skip to content

Fix: develop CI red (TypedPython CI, Kotlin-name stubs) - #331

Merged
b-re-w merged 1 commit into
developfrom
feat/ci-red-fixes
Oct 25, 2026
Merged

b-re-w merged 1 commit into
developfrom
feat/ci-red-fixes

Conversation

@b-re-w

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

Copy link
Copy Markdown
Member

Fixes the two red develop workflows. #329 already landed in #330.

  • TypedPython CI: both Linux jobs failed with 264 copies of tp_runtime.h:509 'unused variable vd' (-Werror). Since Fix: numpy floor_divide/remainder flags on Linux (#292) #296, vd was assigned only under APPLE. It is now declared inside that branch. Local macOS runs pass: test_runtime 264, test_buffer_numpy 69, test_cgen 59. The Linux result is confirmed by this PR's CI.
  • Kotlin-name stubs, two causes:
    1. Binder: a public companion object is reachable from Python as a value (Owner.Companion) #322: the 'Companion: Owner' attribute collided with the companion's own type path. mypy reported 'not valid as a type' and 'already defined'.
      • A companion typed as its own type now keeps the type path, with only a marker comment.
      • An owner-typed companion is written only when no nested class of that name is rendered, decided after all nested classes are known.
      • The same rule applies on the module path (Alignment, PathOperation).
    2. Since Binder: Button/Card shape= and colors= (walk foundation.shape, accept ButtonDefaults.buttonColors) #307, which walks foundation.shape, a subclass that overrides one overload of an inherited name hid the inherited overload set (CornerBasedShape.copy / createOutline). The subclass now renders the full set Kotlin resolution sees, in the supertype's order (mypy requires that order). The same function orders every level. Test: InheritedOverloadStubTest.
  • Local results:
    • check-stubs.sh (the workflow's mypy step) on freshly generated compose stubs: 'Success: no issues found'. CI had 186 errors.
    • Plugin tests 351/351, artifact fixture 50/50 (WalkedArtifactStubTest).

…ub collisions, inherited overload sets in stubs

TypedPython CI: vd was assigned only under __APPLE__, so GCC rejected it as unused (#296); it is
now declared in that branch. Kotlin-name stubs: a companion handle typed as its own type stays a
type path (no attribute that mypy reads as a variable), and an owner-typed one is written only when
no nested class of that name is rendered, on the class and the module path (#322). A subclass that
overrides one overload of an inherited name now renders the full set Kotlin resolution sees, in
the supertype's order (CornerBasedShape.copy / createOutline, from #307's foundation.shape walk).
@b-re-w
b-re-w merged commit 4acf7fb into develop Oct 25, 2026
@b-re-w
b-re-w deleted the feat/ci-red-fixes branch October 25, 2026 12:33
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