PAINTROID-761-2: Reconstruct Legacy Command Models from Binary Stream#167
Open
Amit-Matth wants to merge 2 commits into
Open
PAINTROID-761-2: Reconstruct Legacy Command Models from Binary Stream#167Amit-Matth wants to merge 2 commits into
Amit-Matth wants to merge 2 commits into
Conversation
c648854 to
060b61b
Compare
…lizers from binary
060b61b to
a397514
Compare
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.
This Pull Request is the second step of our 4-stage plan to add backward compatibility for legacy
.catrobatfiles. It registers sequential native class IDs and reconstructs raw command models (likeCommandManagerModelandColorHistory) from the Kryo binary stream.PAINTROID-761
Note: The comments in the code have been kept to make review of the binary format easier, and they will be removed once the PR has been reviewed.
New Features and Enhancements
KryoClassRegistry): Mapped sequential native Paintroid class IDs (from ID 9 to 55) in Dart, resolving registered classes and dynamic references on the wire with proper Kryo ID offsets.lib/core/backward_compatibility/legacy_deserializers.dartto decode standard helper structures (Paint,ColorHistory,Point,PointF,RectF,FloatArray,StringArray).SerializablePath): Implemented dynamic deserialization for legacySerializablePathand all its individual path actions (Move,Line,Quad,Cube, andRewind).LegacyCommandManagerModel): Completed raw deserialization of the rootCommandManagerModelstructure, including decoding for all 14 legacy command types (such asSetDimensionCommand,PathCommand, layer state operations, flip/rotate/crop/resize commands).test/unit/serialization/kryo_class_registry_test.dartto verify the exact reconstruction of all custom objects and command sequences. All tests are passing locally.lib/core/backward_compatibility/, ensuring zero impact on the existing codebase during review.Backward Compatibility Roadmap
To make this feature easy to review and track, the work is organized into four sequential stages:
KryoReaderto parse bytes into basic Dart datatypes (ints, strings, doubles).CommandManagerModelandColorHistory).Refactorings and Bug Fixes
Checklist
Your checklist for this pull request
Please review the contributing guidelines and wiki pages of this repository.