feat: refactor domain objects deserialization#40
Conversation
7d9edb3 to
310d047
Compare
310d047 to
89abae5
Compare
597efa8 to
d1d3281
Compare
There was a problem hiding this comment.
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 |
f9b4203 to
9681a6e
Compare
9681a6e to
f8ed29e
Compare
There was a problem hiding this comment.
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>
No description provided.