You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Walker: bind generic functions and member properties (mutableStateOf, MutableState.value) #38
Found while landing #18. pythonx-compose's declarative state (state() / .value, thisisthepy/pythonx-compose#11) needs androidx.compose.runtime.mutableStateOf and MutableState.value from Python. Today:
any declaration mentioning a type parameter is declined (resolveKotlinBoundary / renderKotlinTypeName accept only class classifiers), so mutableStateOf<T> cannot bind;
the walker emits only FUNCTION and STATIC_GETTER entries (ArtifactScanner keeps ACC_STATIC methods), so no instance member properties;
the binding layer's _attach installs methods only, never data descriptors, and looks at the exact declared type only.
Decided (coordinator), Kotlin names only:
Walker: substitute Any? for unbounded, non-reified function type parameters; decline bounded or reified ones.
Walker: bind public, non-extension, non-@composable member properties of public classes/interfaces as GETTER/SETTER entries (Owner.prop / Owner.prop=); setters only when all class type parameters are unbounded. Exclude GETTER/SETTER from the constructor-prefix collision rule and from overload disambiguation.
Binding layer: index GETTER/SETTER by owner type; _attach installs property(fget, fset) with supertype lookup.
Fixture: include SnapshotStateKt plus State/MutableState; switch PythonContentRenderTest from the KSP writeRoot stand-in to state.value = Root.
Risks to check explicitly: new generic bindings joining existing overload sets and changing mangled names tests rely on; table size growth over androidx.compose.ui (report before/after entry counts); the artifact fixture's "every table key is stubbed" invariant.
Completion: Python creates mutableStateOf(None), the host's PythonContent reads it, Python writes .value and the next frame shows the new root; all fixture modules and desktopTest green; entry-count delta reported.
Scope addition (from #37): material-icons' Icons.Default.Add is a top-level extension property (AddKt.getAdd(Icons$Filled)). ArtifactScanner.scanClassNode reads only kmPackage.functions, never properties, so no getter is bound on the Icons.Filled receiver. #38 therefore also covers extension-property getters: walker binds them with a property-read body, the binding layer serves them as a value on attribute read of the receiver proxy, stubs and the proxy layer handle the kind. Pin test MaterialIconsRenderTest.iconsDefaultAddIsUnreachableBecauseTheWalkerBindsNoExtensionProperty must flip to a render test drawing Icon(Icons.Default.Add, contentDescription=None) from Python.
Activity
b-re-w commentedon Oct 2, 2026
Scope addition (from #37): material-icons'
Icons.Default.Addis a top-level extension property (AddKt.getAdd(Icons$Filled)).ArtifactScanner.scanClassNodereads onlykmPackage.functions, never properties, so no getter is bound on theIcons.Filledreceiver. #38 therefore also covers extension-property getters: walker binds them with a property-read body, the binding layer serves them as a value on attribute read of the receiver proxy, stubs and the proxy layer handle the kind. Pin testMaterialIconsRenderTest.iconsDefaultAddIsUnreachableBecauseTheWalkerBindsNoExtensionPropertymust flip to a render test drawingIcon(Icons.Default.Add, contentDescription=None)from Python.Fix: Decline receivers with off-classpath supertypes, show reified fu…
Docs: Mark #38/#54 spec entries implemented after verification
b-re-w commentedon Oct 3, 2026
Landed in develop via #65.