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

fix: Xcode integration for Swift Package Plugins #2554

Merged
merged 10 commits into from
Oct 11, 2022
Merged

Conversation

calvincestari
Copy link
Member

Fixes #2543

The Xcode integration for SwiftPM plugins was not working correctly.

This PR fixes than through the following:

  • We had to add support for XcodePluginContext to correctly route the command
  • Accept the --target command line option which was being sent by Xcode

@netlify
Copy link

netlify bot commented Oct 7, 2022

Deploy Preview for apollo-ios-docs ready!

Name Link
🔨 Latest commit 6f5c531
🔍 Latest deploy log https://app.netlify.com/sites/apollo-ios-docs/deploys/63408bca30abc60009f743e5
😎 Deploy Preview https://deploy-preview-2554--apollo-ios-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@@ -62,9 +62,6 @@ let package = Package(
exclude: [
"Info.plist",
"Frontend/JavaScript",
],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was forgotten about in #2548 resulting in a warning in Xcode.

name: SwiftPM - Build package
- run:
working_directory: Tests/CodegenCLITests/swiftpm-test/
command: swift package plugin --allow-writing-to-package-directory apollo-generate --verbose
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only test the generate command here because we needed have an existing JSON config file to prevent codegen finding all the test graphQL definition files in the .build folder. We're going to fix that behaviour in #2552.

Copy link
Contributor

@AnthonyMDev AnthonyMDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@AnthonyMDev AnthonyMDev merged commit da47009 into main Oct 11, 2022
@AnthonyMDev AnthonyMDev deleted the fix/xcode-spm-plugin branch October 11, 2022 16:32
@calvincestari calvincestari mentioned this pull request Oct 12, 2022
7 tasks
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.

Unable to run code generation
2 participants