Skip to content
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

Use generated Codable implementation for TypeDescription #8

Merged
merged 3 commits into from
Jan 12, 2024

Conversation

dfed
Copy link
Owner

@dfed dfed commented Jan 10, 2024

Back when we first wrote TypeDescription a few years back, Swift was not capable of generating the Codable implementation for indirect enums with associated values. Now it is.

Instead of continuing to maintain and test a manual Codable implementation, let's rely on Apple's implementation. A nice bonus is that Apple's implementation is more compact than our implementation, which will likely improve encoding/decoding speed for folk utilizing persistence.

This is a breaking change.

@dfed dfed self-assigned this Jan 10, 2024
@dfed dfed marked this pull request as ready for review January 10, 2024 18:49
Copy link

codecov bot commented Jan 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (209f319) 97.78% compared to head (674c69f) 97.66%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main       #8      +/-   ##
==========================================
- Coverage   97.78%   97.66%   -0.12%     
==========================================
  Files          37       37              
  Lines        7804     7322     -482     
==========================================
- Hits         7631     7151     -480     
+ Misses        173      171       -2     
Files Coverage Δ
Sources/SafeDICore/Models/TypeDescription.swift 92.87% <ø> (-2.15%) ⬇️
Tests/SafeDICoreTests/TypeDescriptionTests.swift 100.00% <ø> (+0.23%) ⬆️

@dfed
Copy link
Owner Author

dfed commented Jan 12, 2024

Merging this, but will wait a bit before releasing since there are going to be a few breaking changes landing. If folk have feedback post-merge please leave a comment!

@dfed dfed merged commit 4274e6f into main Jan 12, 2024
5 checks passed
@dfed dfed deleted the dfed--generated-codable branch January 12, 2024 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant