Clean up deprecated serialization API across F Prime codebase#1
Open
devin-ai-integration[bot] wants to merge 6 commits intodevelfrom
Open
Clean up deprecated serialization API across F Prime codebase#1devin-ai-integration[bot] wants to merge 6 commits intodevelfrom
devin-ai-integration[bot] wants to merge 6 commits intodevelfrom
Conversation
- Global find-and-replace of SerializeBufferBase -> LinearBufferBase in ~95 .hpp/.cpp files - Renamed SerializeBufferBaseTester class to LinearBufferBaseTester - Removed the 'using SerializeBufferBase = LinearBufferBase' type alias from Serializable.hpp Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…accessors - Removed deprecated getBuffCapacity() declarations from all buffer subclass headers - Removed deprecated getBuffCapacity() implementations from all buffer subclass .cpp files - Removed deprecated getBuffLength() and getBuffLeft() from LinearBufferBase in Serializable.hpp/cpp - Removed deprecated getBuffCapacity() from ExternalSerializeBuffer in Serializable.hpp/cpp - Removed deprecated getBuffCapacity() from ActiveComponentExitSerializableBuffer Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ferBase, Serializable, and ConstStringBase - Removed deprecated serialize()/deserialize() methods from Serializable class (lines 76-84) - Removed deprecated serialize()/deserialize() shim declarations for LinearBufferBase (lines 1082-1084, 1266-1319) - Removed deprecated serialize()/deserialize() shim implementations from Serializable.cpp - Removed deprecated serialize() methods from ConstStringBase (lines 75-83) - No callers needed migration - all existing calls are on CircularBuffer (not deprecated) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Removed deprecated getSerializeRepr() declaration from Buffer.hpp - No callers existed - all usage already migrated to getSerializer()/getDeserializer() Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- No DEPRECATED macros remain in Serializable.hpp after cleanup - Fw/Deprecate.hpp file itself is preserved for downstream projects Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…r.hpp - The class inside was renamed in Phase 1 but the file itself was not - This caused a fatal include error in Fw/Buffer/test/ut/TestBuffer.cpp Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Description
Removes all deprecated serialization API shims from the F Prime framework, completing the migration to the new method names. This was done in 5 phases:
Phase 1 –
SerializeBufferBase→LinearBufferBase(~95 files)SerializeBufferBaseto the canonical nameLinearBufferBasein all.hppand.cppfiles (class inheritance, parameter types, comments).SerializeBufferBaseTester→LinearBufferBaseTester.using SerializeBufferBase = LinearBufferBase;alias fromFw/Types/Serializable.hpp.Phase 2 – Deprecated accessor removal
getBuffCapacity(),getBuffLength(),getBuffLeft()deprecated shim declarations and implementations from all buffer subclasses (DataBuffer,CmdArgBuffer,ComBuffer,LogBuffer,PrmBuffer,TlmBuffer,SmSignalBuffer,StatementArgBuffer,SerialBuffer,HashBuffer,FileBuffer) and fromLinearBufferBase/ExternalSerializeBufferinSerializable.hpp/.cpp.Phase 3 – Deprecated
serialize()/deserialize()shim removalserialize()/deserialize()wrapper methods fromLinearBufferBase(declarations inSerializable.hpp, implementations inSerializable.cpp).serialize()/deserialize()inline methods fromSerializablebase class.serialize()inline methods fromConstStringBase..serialize()/.deserialize()calls in the codebase are onCircularBufferobjects (which have their own non-deprecated API).Phase 4 –
getSerializeRepr()removalgetSerializeRepr()declaration fromFw::Buffer. No callers existed.Phase 5 –
Fw/Deprecate.hppinclude removal#include "Fw/Deprecate.hpp"fromSerializable.hppsince noDEPRECATEDmacros remain. TheFw/Deprecate.hppfile itself is preserved for downstream use.Rationale
The deprecated API surface created maintenance burden and confusion. All callers had already been migrated to the new names (
serializeFrom/deserializeTo,getCapacity/getSize/getDeserializeSizeLeft,getSerializer/getDeserializer), making the shims dead code ready for removal.Testing/Review Recommendations
SerializeBufferBaseTester.hpp→LinearBufferBaseTester.hpp— verify CMakeLists/build references are updated.SerializeBufferBase. Generated/autocoded files may need regeneration.Fw/Deprecate.hppinclude removal fromSerializable.hpp: Any file that transitively relied on this include for its ownDEPRECATEDmacros will now fail to compile. Verify no such files exist.CircularBuffer::serialize()is intentionally not touched — it is a separate, non-deprecated API. Verify noLinearBufferBase-derived.serialize()calls were missed.m_serialize_reprmember inFw::Buffer: The deprecatedgetSerializeRepr()accessor was removed, but the underlyingm_serialize_reprmember is still used internally byBuffer.cppconstructors and setters — this is intentional and correct.Future Work
SerializeBufferBase,getBuffCapacity(), or the deprecatedserialize()/deserialize()shims will need to update their code.m_serialize_reprmember fromFw::Bufferif it is no longer needed aftergetSerializeRepr()removal (it is currently still used internally).AI Usage (see policy)
AI (Devin by Cognition) was used for the entire implementation: planning the phased approach, performing the global find-and-replace operations, analyzing call sites to distinguish
CircularBuffervsLinearBufferBaseusage, removing deprecated declarations/implementations, and drafting this PR description.Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/f4fa8fb484cd4e59ad68cb2a7b6d4c78
Requested by: @jakexcosme