-
Notifications
You must be signed in to change notification settings - Fork 470
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
Import Foundation in codegen #1248
Conversation
@dfed: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
@designatednerd, would you mind taking a look at this when you get the chance? Thanks! |
Would be great to get this forward. Thanks! |
@dfed Do you have a bit of time to rebase this, or do you mind if I take over this PR? |
Happy to have you take this PR over the finish line @designatednerd! I’m out on vacation this week. |
CHANGELOG.md
Outdated
@@ -11,7 +11,7 @@ | |||
- `apollo-codegen-scala` | |||
- <First `apollo-codegen-scala` related entry goes here> | |||
- `apollo-codegen-swift` | |||
- <First `apollo-codegen-swift` related entry goes here> | |||
- Allow generated code to be compiled without a module umbrella header 1248](https://github.com/apollographql/apollo-tooling/pull/1248) |
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.
fwiw you don't need to put the link here
OK cool - ping me when it's ready for another look |
🤦♀ Completely misread the earlier comment! Will take this over. |
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.
Works nicely in the test project - let's do this!
Hi folks! The Swift code-gen today requires that an Objective-C umbrella header be present that has an
import <UIKit/UIKit.h>
to compile. You can see this for yourself by running code-gen on any request/response that has aDate
as a value or parameter.Date
comes fromFoundation
, but there is no import ofFoundation
. Instead, the generated code implicitly relies on theUIKit
import from an umbrella header to pull inFoundation
.This PR explicitly imports
Foundation
in the generated code, which allows consumers of Swift Apollo code-gen to no longer need an umbrella header.TODO:
*Make sure changelog entries note which project(s) has been affected. See older entries for examples on what this looks like.