BTree supports Codable - #38
Open
bogdad wants to merge 1 commit into
Open
Conversation
bogdad
force-pushed
the
btree_codable_support
branch
3 times, most recently
from
February 16, 2020 20:34
1a87199 to
1fe6ecc
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #38 +/- ##
=========================================
Coverage ? 98.56%
=========================================
Files ? 18
Lines ? 6057
Branches ? 0
=========================================
Hits ? 5970
Misses ? 87
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bogdad
force-pushed
the
btree_codable_support
branch
from
February 16, 2020 20:36
1fe6ecc to
1827029
Compare
bogdad
force-pushed
the
btree_codable_support
branch
from
February 16, 2020 20:48
1827029 to
1913568
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.
Hey,
thank you for the BTree, I use it in my other pet project and it works flawlessly!
This is an attempt to support of Swift Codable to BTree.
The pull request might be much smaller if Swift Tuple type and Void type supported Codable out of the box. With the current Swift state, tuple support can be fixed "internally", without many changes.
But SortedSet and SortedBag being BTree<Element, Void> is a bummer, as in extension that means, that BTree<Codable, Codable> should be Codable, and BTree<Codable, Void> should be Codable and it appears that is not allowed. Hence the need for EmptyValue.
I understand it is a big code change just to support Codable, so feel free to reject.
I would be very excited if we agree on a different workaround for this, looking forward to your comments!
Also,
this works with Swift 4.2, what would be the best way to change the Swift version in podspec?
Having multiple pods for different versions? To be honest, I am not very familiar with versioning pods for different Swift versions.