Open
Conversation
Because code coverage reports do not necessarily understand CTFE.
Renamed Grouped to Group. Refactored code to greatly reduce redundant code. Compiled code should be the same (if not better). Added a bunch of unittests to test functionality. Code is fully backwards compatibility assuming no direct access to internal code was used.
You can now deserialize data to a given instance with classes, structs, and interfaces.
Also added unittest for such.
Codecov Report
@@ Coverage Diff @@
## master #4 +/- ##
==========================================
- Coverage 100% 98.45% -1.55%
==========================================
Files 2 2
Lines 139 259 +120
==========================================
+ Hits 139 255 +116
- Misses 0 4 +4
Continue to review full report at Codecov.
|
Contributor
Author
|
I added several unittests that you can look at to see what I have added. I added deserializing to preexisting data. Allowing interfaces to be deserialized along with other use cases that tie in nicely with Groups. Right now member instances are replaced. But I plan to add a UDA ( |
Endian handling is better. Fully allows either std.system.Endian or xserial.Endian. Endian enum is used as the UDA. Any UDA can be given to Serializer including things like Exclude to make exclude default.
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.
I totally refactored your code. I was realizing some changes that were not being carried through every repetition of similar code. Also when I was implementing more overloads to serialize and deserialize the number of overloads was growing by powers of 2 to keep every combination available.
As I was coding in this I found a ways to reduce several major repetitions in the code by using some more advanced D meta programming. D's meta programming is uniquely stupid amazing!
However though I reworked your code, the interface for it is the same, all your old unittests were unchanged and still work. I only added and changed the internals.
The I ended up changing the coding style a bit. As I was making the big change I found it easier to look at code familiar to me. If you don't like it and want to have it changed back, I can certainly do that. Though if you do not like the change as a whole, I would rather keep my fork styled my way.
Thank you for making this great library! And making it open source to allow me to expand it to my needs!