Skip to content

Add per-invocation dynamic typed results to Python Extension API v2 (#62) - #64

Merged
denikryt merged 6 commits into
mainfrom
feature/dynamic-typed-results
Nov 21, 2026
Merged

denikryt merged 6 commits into
mainfrom
feature/dynamic-typed-results

Conversation

@denikryt

Copy link
Copy Markdown
Owner

Summary

Implements #62 by allowing Python Extension API v2 functions to determine the number and types of their results separately for each invocation.

Changes

  • Add DynamicResults as an opt-in return annotation for Python extensions.
  • Introduce per-call result resolvers using the semantic.py::_result_types_<function> convention.
  • Validate resolvers during extension contract loading.
  • Resolve concrete result signatures during semantic analysis, after overload selection and argument binding.
  • Store resolved types in the existing typed Call IR.
  • Expose call-specific result types to Python backends.
  • Validate backend results against the expected arity, NF types, socket direction, physical socket types, and group ownership.
  • Preserve compatibility with existing fixed-result extensions and semantic execution modes.

Tests

  • Added unit tests covering declarations, resolver validation, overloads, typed results, owner isolation, and error handling.
  • Added Blender integration tests for dynamic result validation and compilation rollback.

@denikryt
denikryt merged commit b8471ff into main Nov 21, 2026
6 checks passed
@denikryt
denikryt deleted the feature/dynamic-typed-results branch November 21, 2026 00: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