-
Notifications
You must be signed in to change notification settings - Fork 178
Replace all Foundation imports with FoundationEssentials #363
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 10000 on GitHub? Sign in to your account
Replace all Foundation imports with FoundationEssentials #363
Conversation
@@ -18,8 +18,12 @@ | |||
#if CRYPTOKIT_NO_ACCESS_TO_FOUNDATION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking: does CRYPTOKIT_NO_ACCESS_TO_FOUNDATION
imply no access to FoundationEssentials
either?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does.
#else | ||
#if canImport(FoundationEssentials) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason we shouldn't use #elseif
to avoid the extra nesting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really didn't want to think that hard about it, honestly, as we had to change a good 150 files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair
Motivation:
FoundationEssentials produces smaller binaries on most platforms.
Modifications:
Where FoundationEssentials is available, import that.
Result:
Improved binary size