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

makefile improvement - CLI #2919

Closed
asbhat opened this issue Mar 31, 2023 · 15 comments
Closed

makefile improvement - CLI #2919

asbhat opened this issue Mar 31, 2023 · 15 comments
Labels
bug Generally incorrect behavior

Comments

@asbhat
Copy link
Contributor

asbhat commented Mar 31, 2023

Summary

After upgrading to Xcode v14.3 the InstallCLI Command Plugin seems to be missing.

I created a new project and installed apollo-ios but the plugin is still missing. Am I doing something wrong?

image

Version

v1.0.7

Steps to reproduce the behavior

  1. Install Xcode v14.3
  2. Create a new project
  3. Add package apollo-ios
  4. Right click on the project in the navigator
  5. The command plugin is missing

Logs

No response

Anything else?

No response

@asbhat asbhat added bug Generally incorrect behavior needs investigation labels Mar 31, 2023
@calvincestari
Copy link
Member

Hi @asbhat - we've taken a look and don't have a clear idea on what could be causing it to be missing; our implementation of XcodeCommandPlugin hasn't changed. We're also concerned it could be a regression in Xcode 14.3 support for SPM plugins since the plugin is visible when opening a package.swift based project (vs. an Xcode project that uses SPM dependencies).

I realize it is inconvenient not having it in the menu and until we can figure out the root cause the workaround would be to grab the pre-built CLI binary we attach to each GitHub release and place that in the root of your project directory; the effect will be the same and the CLI has a version checker so if you ever update the dependency but forget to manually download the pre-built CLI it will warn you.

@asbhat
Copy link
Contributor Author

asbhat commented Apr 1, 2023

Thanks for the response Calvin!

I did end up just grabbing the pre-built CLI binary (docs here) that works just fine.

I took a quick look at the plugin too and couldn't figure it out :(
but it does seem other projects are having similar issues (e.g., nicklockwood/SwiftFormat#1404), so you're probably right that it's a regression and something for Apple to fix.

Should I close the issue?

@calvincestari
Copy link
Member

calvincestari commented Apr 1, 2023

I think leave it open for a bit longer and let's monitor if it's showing up in many other libraries too.

@PawanSinghatia
Copy link

Hi @calvincestari , @asbhat please provide the exact steps for the pre-built CLI binary solution for this issue

@PawanSinghatia
Copy link

Thanks for the response Calvin!

I did end up just grabbing the pre-built CLI binary (docs here) that works just fine.

I took a quick look at the plugin too and couldn't figure it out :( but it does seem other projects are having similar issues (e.g., nicklockwood/SwiftFormat#1404), so you're probably right that it's a regression and something for Apple to fix.

Should I close the issue?

Ho w to grab the pre-built binary ?

@calvincestari
Copy link
Member

calvincestari commented Apr 3, 2023

It's attached to each GitHub release, in a file named apollo-ios-cli.tar.gz.

@BrentMifsud
Copy link

I'm experiencing this as well. Looks like its probably an Xcode bug.

@calvincestari
Copy link
Member

I've confirmed this is happening in the Sourcery framework too. I haven't seen any sign of a new Xcode beta though, nor a quick release of 14.3.1 - I'm really not sure what's taking them so long to react to this.

@BrentMifsud
Copy link

It's happening with swiftgen as well.

Definitely a bug with Xcode

@e-001
Copy link

e-001 commented Apr 26, 2023

Perhaps this was just a change by Apple rather than a bug. The menu item is still available in our GQL package itself, just not the root context menu.

Screenshot 2023-04-26 at 1 23 47 AM

@dadouf
Copy link

dadouf commented Apr 26, 2023

Perhaps this was just a change by Apple rather than a bug. The menu item is still available in our GQL package itself, just not the root context menu.

Screenshot 2023-04-26 at 1 23 47 AM

This is an interesting workaround, and should work for most people who had generated the Apollo Swift code into a Swift package before the bug appeared. It just installs the apollo-ios-cli shortcut in the package's folder instead of the project's one, but then it can be moved. Works for me thanks!

@calvincestari
Copy link
Member

calvincestari commented Apr 26, 2023

It's an interesting workaround. I've only managed to get it to work when adding Apollo iOS as a local package though, if I add it a remote github-based package it's still missing from the menu.

Local package dependency vs. Remote package dependency.

@AnthonyMDev
Copy link
Contributor

AnthonyMDev commented May 12, 2023

TODO:

  • Add a comment to the documentation explaining the work around for using the makefile to build the CLI.
  • Have the makefile command automatically move the built CLI to the project root directory.

@calvincestari
Copy link
Member

I've confirmed that Xcode 14.3.1 RC resolves this issue. I'm going to change the title of this issue to reflect the work we still wanted to do.

@calvincestari calvincestari changed the title InstallCLI Command Plugin Missing in Xcode v14.3 makefile improvement - CLI May 19, 2023
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
Projects
None yet
Development

No branches or pull requests

7 participants