-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Structure #4
base: master
Are you sure you want to change the base?
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.
|
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.
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!