-
Notifications
You must be signed in to change notification settings - Fork 205
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
feat: rename deserialization protocols for clarity, improve usability of error types, and broke up into multiple files. (7.0.0) #259
Merged
Conversation
This file contains 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
Codecov Report
@@ Coverage Diff @@
## main #259 +/- ##
==========================================
- Coverage 66.70% 65.41% -1.29%
==========================================
Files 14 36 +22
Lines 1910 1995 +85
==========================================
+ Hits 1274 1305 +31
- Misses 636 690 +54
Continue to review full report at Codecov.
|
drmohundro
force-pushed
the
feat/improve-node-is-invalid-errors
branch
from
May 3, 2022 18:22
338734e
to
1e31af3
Compare
This commit also introduces a new XMLDeserialization type that hopefully will make it easier to implement deserialization for custom types.
drmohundro
force-pushed
the
feat/improve-node-is-invalid-errors
branch
from
May 3, 2022 18:25
1e31af3
to
cd81c77
Compare
drmohundro
force-pushed
the
feat/improve-node-is-invalid-errors
branch
from
May 3, 2022 18:44
7b94133
to
f9849b3
Compare
drmohundro
force-pushed
the
feat/improve-node-is-invalid-errors
branch
from
May 3, 2022 18:48
f9849b3
to
d7aba5a
Compare
drmohundro
force-pushed
the
feat/improve-node-is-invalid-errors
branch
from
May 3, 2022 21:34
2a40f32
to
9ee0729
Compare
Including fixes to docs, punctuation, naming, etc.
drmohundro
changed the title
feat: improve nodeIsInvalid error messages
feat: code reorganization, clean up, and improvements
May 4, 2022
drmohundro
changed the title
feat: code reorganization, clean up, and improvements
feat: rename deserialization protocols for clarity, improve usability of error types, and broke up into multiple files.
May 7, 2022
drmohundro
changed the title
feat: rename deserialization protocols for clarity, improve usability of error types, and broke up into multiple files.
feat: rename deserialization protocols for clarity, improve usability of error types, and broke up into multiple files. (7.0.0)
May 7, 2022
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 covers a variety of improvements.
Renaming XMLIndexerDeserializable protocol and Adding XMLValueDeserialization protocol
I renamed
XMLIndexerDeserializable
to beXMLObjectDeserialization
- its purpose is to deserialize object structures like classes or structs. So, multiple values. Then, there is a new protocol namedXMLValueDeserialization
- it serves the purpose of bothXMLElementDeserializable
andXMLAttributeDeserializable
. It is only used for custom value deserialization. I hope this will clarify the usage a lot. It makes sense to me anyway!This should cover the use case at #148.
Usability of Errors
Multiple times when helping people, I'd notice that the
nodeIsInvalid
error would get thrown, but the error message was just about impossible to determine what was wrong. The code had implementedCustomStringConvertible
but everyone was usinglocalizedDescription
. Now, errors implementLocalizedError
, too, so it is a lot more obvious to see the elements that had caused issues.Code Reorganization
The code had all been lumped into two Swift files since the beginning. It was unwieldy then, but it has just gotten worse. So I gave in and broke them all out into their own files by type. Much better.
Checklist
7.0.0
.