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

Dependency Automation - Swift Package Manager #2120

Merged

Conversation

calvincestari
Copy link
Member

@calvincestari calvincestari commented Jan 28, 2022

Adds support for Swift Package Manager dependency automation, generating an SPM manifest file.

The other three automation types (.cocoapods, .carthage and .manuallyLinked) intentionally throw an exception.

@calvincestari calvincestari linked an issue Jan 28, 2022 that may be closed by this pull request
4 tasks
@@ -22,4 +22,16 @@ extension ApolloCodegenConfiguration {
apqs: apqs
)
}

public static func mock(
Copy link
Contributor

Choose a reason for hiding this comment

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

I added something similar in my most recent PR, so we should look and combine these after merging everything in.

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.

Looking good!

.library(name: "\(moduleName)", targets: ["\(moduleName)"]),
],
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Uh oh, this is a problem... we need to come up with a solution here to make sure we are just pulling in the same version as your project is using. Not sure what we can do about this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh maybe not? Because it's "from: 1.0.0" it will resolve with whatever version you are pulling in from your projects package file right?

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe so. It will be tricker in the alpha release as we discussed though because 1.0.0 won't be a tag yet.

@calvincestari calvincestari merged commit 3922f8c into release/1.0-alpha-incubating Jan 29, 2022
@calvincestari calvincestari deleted the 1.0/spm-dependency-automation branch January 29, 2022 00:08
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.

Dependency automation for supported module types
2 participants