Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

Enables version tracking in SerializerService for Description struct serialization using cereal's built-in versioning mechanism (version = 1).

Changes

  • SerializerService.cpp: Added version parameter to Description::serialize() and declared CEREAL_CLASS_VERSION(Description, 1)
// Before
template <class Archive>
void serialize(Archive& ar, Description& description)
{
    ar(description._cells, description._particles, description._creatures, description._genomes);
}

// After
template <class Archive>
void serialize(Archive& ar, Description& description, std::uint32_t const version)
{
    ar(description._cells, description._particles, description._creatures, description._genomes);
}

CEREAL_CLASS_VERSION(Description, 1)

The version parameter enables future backward-compatible schema evolution by allowing conditional deserialization logic based on the stored version number.

Original prompt

Enable the versioning in SerializerService via cereal (use version int=1 for now).


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: chrxh <73127001+chrxh@users.noreply.github.com>
Copilot AI changed the title [WIP] Enable versioning in SerializerService via cereal Enable cereal versioning for Description serialization Dec 10, 2025
Copilot AI requested a review from chrxh December 10, 2025 20:24
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