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

Add support for SPM Package.resolved version 3 #3355

Closed
calvincestari opened this issue Mar 15, 2024 · 0 comments · Fixed by apollographql/apollo-ios-dev#304
Closed

Add support for SPM Package.resolved version 3 #3355

calvincestari opened this issue Mar 15, 2024 · 0 comments · Fixed by apollographql/apollo-ios-dev#304
Assignees
Labels
bug Generally incorrect behavior codegen Issues related to or arising from code generation

Comments

@calvincestari
Copy link
Member

calvincestari commented Mar 15, 2024

Bug

It looks like Xcode 15.3 and swift-tools-version: 5.10 brings with it a new version of the Package.resolved file. Below is an example from a test project:

{
  "originHash" : "438020303660f915142c6f2f9052482de7f6a2f2b84a04cffea17e3bd09b9e12",
  "pins" : [
    {
      "identity" : "apollo-ios",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/apollographql/apollo-ios",
      "state" : {
        "revision" : "72aaf039a417a2e3c98c490bb1c43a025758556e",
        "version" : "1.9.2"
      }
    },
    {
      "identity" : "sqlite.swift",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/stephencelis/SQLite.swift.git",
      "state" : {
        "revision" : "e78ae0220e17525a15ac68c697a155eb7a672a8e",
        "version" : "0.15.0"
      }
    }
  ],
  "version" : 3
}

This results in being unable to do code generation with Apollo iOS because we throw an error for unknown versions:

Error: Package.resolve file version unsupported!
Please create an issue at: https://github.com/apollographql/apollo-ios

Workaround

  1. Delete the Package.resolved file.
  2. Downgrade swift-tools-version from 5.10 to 5.9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Generally incorrect behavior codegen Issues related to or arising from code generation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant