Open joshuarobs opened 4 years ago
I agree wholeheartedly that it's annoying. This is where I wish Xcode supported plugins for more than syntax highlighting. 😭
What are the steps in particular that you're thinking should be automated? Would it work to have a "Here's the whole script for you to copy" at the bottom of of the page if people don't want to go through the individual steps?
I suppose given how the Codegen folder is generated, perhaps a completed zip file that contains all of the code and folders that people could download and add into their project? Then the only thing they'd have to do is to add the script in their Build Phases in their main project file. This isn't the 1-click perfect automatic deployment we'd hope for, but it'd erase about 90% of the effort and make it easier for users.
I'll certainly look into it, but given that all projects are structured differently and named differently, there's going to necessarily be some stuff that people will need to fill in themselves.
I saw something in one of the SPM sessions at WWDC about the possibility of including scripts in the package as resources - I'll dive a bit deeper into that and see if there's something we can do here to autogenerate.
Hi 👋🏻 - we've taken this into consideration and decided to defer it to a future 1.x release. We're not rejecting nor closing this issue but it's not on the roadmap yet. If this issue is important to you please let us know in this issue and it will help with prioritization - thank you!
Attempting to revive this issue now that SPM has proper support for build plugins. This is actually rather easy as long as we can get an executable as a binary target from somewhere on the web.
You'll be please to know then that support for SPM plugins has already been added. Take a look at the release/1.0 branch.
Oh. Thanks for the update! I missed that.
That being said looks like all the added plugins are Command plugins. Ideally for my projects I'd like to preserve the behavior to generate the files as a build script.
This is actually possible now that SPM has support for build extensions and I have a local branch on a project with such a plugin. The main issue is some conventions are needed in order for build plugins to be reusable. I can try opening a PR if that is of interest to the maintainers?
This is actually possible now that SPM has support for build extensions and I have a local branch on a project with such a plugin. The main issue is some conventions are needed in order for build plugins to be reusable. I can try opening a PR if that is of interest to the maintainers?
I'm happy to work with you on any suggestion and see whether it's a fit for the project. In the interest of not committing to work without agreement maybe you could detail a solution, including any conventions, and we can work through that first. Once we've agreed on that solution then we can move to a PR. Does that sound OK to you?
I'm curious if the steps here at https://www.apollographql.com/docs/ios/swift-scripting/ will ever be done automatically in the future, i.e. automatically either through 1 click of a script or as part of a swift package or something?
I'm just wondering since it may be a little tedious having to go through all the steps manually for every new project