Skip to content

Return compound types#30

Merged
scoop1120 merged 2 commits into
mainfrom
return-compound-types
Feb 3, 2026
Merged

Return compound types#30
scoop1120 merged 2 commits into
mainfrom
return-compound-types

Conversation

@scoop1120

Copy link
Copy Markdown
Contributor

This pull request introduces a new distinction between "own" and "foreign" module field types in the subsystem model builder utilities, improving type safety and clarity when handling fields that reference types from other modules. It also updates the workspace version and skips computed fields during type relation expansion.

Module field type improvements:

  • Refactored ModuleFieldType from a struct to an enum with two variants: Own (for types defined in the current module) and Foreign (for types imported from other modules), allowing for more precise modeling of field origins.
  • Updated create_module_field and related logic to construct either an Own or Foreign ModuleFieldType based on the presence of a module_name in the field, enhancing support for cross-module references.
  • Added ForeignModuleType to the imports, supporting the new enum variant in ModuleFieldType.

Other improvements:

  • Modified the type relation expansion logic to skip fields marked as computed, preventing unnecessary processing of derived fields.
  • Bumped the workspace package version from 0.29.5 to 0.29.6.

Introduce support for foreign module field types and skip computed fields during relation expansion. Changed ModuleFieldType from a struct to an enum (Own { type_id, type_name } | Foreign(ForeignModuleType)) and updated Named::name accordingly. Updated the type builder to emit ForeignModuleType for fields that reference types in other modules, and adjusted database_builder to early-return for computed fields. Also bumps workspace version and updates Cargo.lock dependencies.
@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown

Version bump detected: 0.29.50.29.6

@scoop1120 scoop1120 merged commit 7d256cb into main Feb 3, 2026
7 checks passed
@scoop1120 scoop1120 deleted the return-compound-types branch February 3, 2026 20:43
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