Skip to content

feat: refactor domain objects deserialization#40

Merged
fpelliccioni merged 2 commits intomasterfrom
feat/domain-obj-deserialization
Apr 30, 2025
Merged

feat: refactor domain objects deserialization#40
fpelliccioni merged 2 commits intomasterfrom
feat/domain-obj-deserialization

Conversation

@fpelliccioni
Copy link
Copy Markdown
Contributor

No description provided.

@fpelliccioni fpelliccioni force-pushed the feat/domain-obj-deserialization branch 5 times, most recently from 7d9edb3 to 310d047 Compare October 22, 2024 18:51
@fpelliccioni fpelliccioni force-pushed the feat/domain-obj-deserialization branch from 310d047 to 89abae5 Compare October 27, 2024 20:31
@fpelliccioni fpelliccioni force-pushed the feat/domain-obj-deserialization branch 2 times, most recently from 597efa8 to d1d3281 Compare April 30, 2025 14:23
@fpelliccioni fpelliccioni requested a review from Copilot April 30, 2025 19:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the deserialization logic for domain objects in the network_address module while updating related utility interfaces and dependencies. Key changes include the deprecation of legacy from_data and factory_from_data overloads via comment-out, the introduction of a new byte_reader‐based deserialization method, and minor updates in dependent header files and build configurations.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/message/network_address.cpp Replaces legacy deserialization with a new expect‐based approach
include/kth/infrastructure/utility/data.hpp Adjusts byte_span alias usage
include/kth/infrastructure/utility/byte_reader.hpp Introduces a new byte_reader implementation for deserialization
include/kth/infrastructure/message/network_address.hpp Updates API declarations to reflect the new deserialization method
include/kth/infrastructure/impl/utility/data.ipp Minor casting fix in starts_with function
include/kth/infrastructure/impl/utility/array_slice.ipp Constructor formatting adjustment
include/kth/infrastructure/error.hpp Adds new error codes for serialization/deserialization failures
include/kth/infrastructure/concepts.hpp Introduces a new concepts header
conanfile.py Updates catch2 version dependency

@fpelliccioni fpelliccioni force-pushed the feat/domain-obj-deserialization branch 3 times, most recently from f9b4203 to 9681a6e Compare April 30, 2025 19:09
@fpelliccioni fpelliccioni force-pushed the feat/domain-obj-deserialization branch from 9681a6e to f8ed29e Compare April 30, 2025 19:09
@fpelliccioni fpelliccioni requested a review from Copilot April 30, 2025 19:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors domain objects deserialization by replacing legacy bool‐based deserialization routines in network_address with an expected‑based API and updating supporting utility classes.

  • Refactored network_address deserialization to use expected error handling.
  • Updated byte_reader and error enums to support improved error propagation.
  • Revised span type definitions and bumped the catch2 dependency version.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/message/network_address.cpp Replaces legacy from_data methods with an expected‑based deserialization.
include/kth/infrastructure/utility/data.hpp Updates span aliases and removes dynamic extent specification redundancy.
include/kth/infrastructure/utility/byte_reader.hpp Introduces a new byte_reader with expected‑based error handling.
include/kth/infrastructure/message/network_address.hpp Adjusts network_address interface to support the expected‑based API.
include/kth/infrastructure/impl/utility/data.ipp Updates cast style in a utility function for clarity.
include/kth/infrastructure/impl/utility/array_slice.ipp Minor initializer list reordering for consistency.
include/kth/infrastructure/error.hpp Extends the error enum list to cover new deserialization error types.
include/kth/infrastructure/concepts.hpp Adds a trivially_copyable concept alias.
conanfile.py Bumps Catch2 dependency version from 3.6.0 to 3.7.1.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@fpelliccioni fpelliccioni merged commit 9647b42 into master Apr 30, 2025
5 checks passed
@fpelliccioni fpelliccioni deleted the feat/domain-obj-deserialization branch April 30, 2025 19:13
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