Skip to content

type: Allow 'omitempty' on DPC types#26

Merged
rucoder merged 1 commit intolf-edge:mainfrom
rucoder:rucoder/dpc-omit-empty
Nov 11, 2025
Merged

type: Allow 'omitempty' on DPC types#26
rucoder merged 1 commit intolf-edge:mainfrom
rucoder:rucoder/dpc-omit-empty

Conversation

@rucoder
Copy link
Contributor

@rucoder rucoder commented Nov 10, 2025

EVE now uses 'omitempty' on all fields inside DPC structure that breaks deserilization. We use

#[derive(Default)]
#[serde(default)] 
struct type {
}

on then and to allow missing fields.

We do not care about omitting fileds with default values when we serialize DPC because IPC transport has no limit on message size

EVE now uses 'omitempty' on all fields inside DPC structure that breaks
deserilization. We use #[derive(Default)] on then and #[serde(default)]
to allow missing fields.

We do not care about omitting fileds with default values when we serialize
DPC because IPC transport has no limit on message size

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
@uncleDecart
Copy link
Member

When we receive value which is omitted, we would assume default value for it, do we want to differentiate it somehow? I.e. wrapping around Optional, would this behavior be troublesome

Copy link
Member

@uncleDecart uncleDecart left a comment

Choose a reason for hiding this comment

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

LGTM

only one comment regarding the behavior

@rucoder
Copy link
Contributor Author

rucoder commented Nov 11, 2025

When we receive value which is omitted, we would assume default value for it, do we want to differentiate it somehow? I.e. wrapping around Optional, would this behavior be troublesome

@uncleDecart
it has nothing to do with Option, it is exactly Default, so value is ALWAYS there , just default . Option means : value may be absent at all - no value

@rucoder rucoder merged commit 33dbbe9 into lf-edge:main Nov 11, 2025
4 checks passed
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.

2 participants