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

Version mismatch between package and CLI #3386

Closed
Brett-Best opened this issue May 23, 2024 · 3 comments · Fixed by apollographql/apollo-ios-dev#367
Closed

Version mismatch between package and CLI #3386

Brett-Best opened this issue May 23, 2024 · 3 comments · Fixed by apollographql/apollo-ios-dev#367
Assignees
Labels
bug Generally incorrect behavior needs investigation

Comments

@Brett-Best
Copy link

Summary

Upgraded package to 1.2.1 but the CLI version wasn't increased so I get an error

Version

1.2.1

Steps to reproduce the behavior

  1. Upgrade to 1.2.1
  2. Try to run the CLI from SPM
  3. Error because the CLI version is incorrect

Logs

Installing Apollo CLI SPM plugin
x apollo-ios-cli
Running Apollo code generation
Error: Error: Apollo Version Mismatch
We've detected that the version of the Apollo Codegen CLI does not match the version of the
Apollo library used in your project. This may lead to incompatible generated objects.

Please update your version of the Codegen CLI by following the instructions at:
https://www.apollographql.com/docs/ios/code-generation/codegen-cli/#installation

CLI version: 1.12.0
Apollo version: 1.12.1

To ignore this error during code generation, use the argument: --ignore-version-mismatch.

Anything else?

No response

@calvincestari
Copy link
Member

Looks like I built the CLI binary before setting the new version numbers. That means it's using the correct codegen but failing at the number mismatch. 🤦🏻

@calvincestari calvincestari self-assigned this May 23, 2024
@calvincestari
Copy link
Member

calvincestari commented May 23, 2024

I've got a PR up to fix this including a new CI job that will catch this and the 1.12.0 error too because it requires that the CLI archive can be extracted, executed and version matched. Unfortunately it'll only get merged once the rest of the team is able to review it in the morning.

Also this version check behaviour should not be needed for too much longer as @BobaFetters is working on having cocoapods installations download the CLI archive from the release instead of needing to use the embedded archive. Once that's done it would be trivial to fix this on the GitHub release and not require a new version release.

Copy link
Contributor

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Generally incorrect behavior needs investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants