Import Foundation in codegen#1248
Import Foundation in codegen#1248designatednerd merged 2 commits intoapollographql:masterfrom dfed:dfed--import
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. |
| - <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.
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. |
designatednerd
left a comment
There was a problem hiding this comment.
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 aDateas a value or parameter.Datecomes fromFoundation, but there is no import ofFoundation. Instead, the generated code implicitly relies on theUIKitimport from an umbrella header to pull inFoundation.This PR explicitly imports
Foundationin 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.