Skip to content

mw/com/impl: Internally use memory::DataTypeSizeInfo - #813

Merged
crimson11 merged 2 commits into
mainfrom
mf_use_datatype_size_info
Aug 4, 2026
Merged

mw/com/impl: Internally use memory::DataTypeSizeInfo#813
crimson11 merged 2 commits into
mainfrom
mf_use_datatype_size_info

Conversation

@crimson11

Copy link
Copy Markdown
Contributor

The type DataTypeMetaInfo, which we use on our
public interface is too weak! It doesn't assure
invariants on size/alignment, which C++ demands:
size has to be always a power of two and be an
integer multiple of tzhe alignment.

This commit switches to internal use of memory::DataTypeSizeInfo which forces this. On the public interface we keep the weak DataTypeMetaInfo for now to avoid a breaking change! In the public layer we transform DataTypeMetaInfo to DataTypeSizeInfo. In case this isn't possible because DataTypeMetaInfo is invalid, we return an error in the public API.

@LittleHuba LittleHuba left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to discuss different approaches to this topic.
This is not a hard no, I just want to brainstorm for ideas.

@crimson11

Copy link
Copy Markdown
Contributor Author

I'd like to discuss different approaches to this topic. This is not a hard no, I just want to brainstorm for ideas.

Sure! I'm curious for your proposals! Low level I want to "extend" a type used in the public API ... and I have no clue how to do this minimal invasive - opposed to creating a NEW type and deprecate all APIs with the old type and introduce new/overloads with the new Type! In this case that would even cascade as DataTypeMetaInfo is enclosed in other public types ... so this would be a crazy escalation!

@crimson11
crimson11 force-pushed the mf_use_datatype_size_info branch 3 times, most recently from 7802866 to a0334af Compare July 31, 2026 12:54
Comment thread score/mw/com/impl/data_type_meta_info_test.cpp Outdated
Comment thread score/mw/com/impl/data_type_meta_info_test.cpp Outdated
Comment thread score/mw/com/impl/generic_skeleton_test.cpp Outdated
Comment thread score/mw/com/impl/generic_skeleton_test.cpp Outdated
Comment thread score/mw/com/impl/generic_skeleton.cpp
Comment thread score/mw/com/impl/plumbing/skeleton_service_element_binding_factory_impl.h Outdated
Comment thread score/mw/com/impl/plumbing/generic_skeleton_event_binding_factory_impl.h Outdated
Comment thread score/mw/com/impl/bindings/lola/generic_skeleton_event.h Outdated
Comment thread score/mw/com/gateway/gateway_application/BUILD
@crimson11
crimson11 force-pushed the mf_use_datatype_size_info branch from a0334af to ee884f0 Compare August 3, 2026 12:18
Comment thread score/mw/com/impl/bindings/lola/generic_skeleton_event.cpp Fixed
@crimson11
crimson11 force-pushed the mf_use_datatype_size_info branch from ee884f0 to 25fead2 Compare August 3, 2026 15:00
The type DataTypeMetaInfo, which we use on our
public interface is too weak! It doesn't assure
invariants on size/alignment, which C++ demands:
size has to be always a power of two and be an
integer multiple of tzhe alignment.

This commit switches to internal use of memory::DataTypeSizeInfo
which forces this. On the public interface we keep the weak
DataTypeMetaInfo for now to avoid a breaking change!
In the public layer we transform DataTypeMetaInfo to
DataTypeSizeInfo. In case this isn't possible because
DataTypeMetaInfo is invalid, we return an error in the
public API.
IGenericSkeletonEventBindingFactory has been shifted
to plumbing folder.
@crimson11
crimson11 force-pushed the mf_use_datatype_size_info branch from 25fead2 to 6e9aa5c Compare August 3, 2026 15:05
const SkeletonEventProperties& event_properties,
const ElementFqId& element_fq_id,
const DataTypeMetaInfo& size_info,
const memory::DataTypeSizeInfo& size_info,
@crimson11
crimson11 enabled auto-merge August 4, 2026 08:59

@LittleHuba LittleHuba left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed with @crimson11 offline. Agreed to proceed.

@crimson11
crimson11 added this pull request to the merge queue Aug 4, 2026
Merged via the queue into main with commit 44ac910 Aug 4, 2026
23 of 28 checks passed
@crimson11
crimson11 deleted the mf_use_datatype_size_info branch August 4, 2026 11:26
@github-project-automation github-project-automation Bot moved this from Backlog to Done in COM - Communication FT Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants