-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Autocompletion when editing script in Xcode doesn't work #87
Comments
It did work, but seemingly has stopped working. The completion scheme is not meant to be run, but is autogenerated by Xcode. It is required to get complete, but apparently is not working currently. |
Here are more thoughts about this issue and the edit command implementation. I just learned that there was a big change in the behavior which went from the standard Xcode project generated via While going through other tools today, I stumbled upon the way Marathon handles this. After executing the edit command, the Xcode project generated via SPM gets opened but the command is waiting. After performing the change the command is terminated which apparently copies the changed file to its original location. Wouldn't this be a nicer approach? EDIT: This is the routine in the Marathon codebase I'm referring to. |
I would not like this approach no. I need my terminal to be useful, not waiting for things, not to mention there are numerous ways you could lose work because the terminal command is killed while you continue to edit. Honestly, I think it's a really terrible approach. |
Hi guys thank you so much for this project. I was trying to see if I could make this work with XCode 11, but I also never get any autocompletion out of it. Does anybody have any idea what needs to be done? Maybe I could try to hack it :) |
IIRC the trick was building a dylib or framework of the deps and providing that as a include/link path to the executable binary but not actually linking it. I was inspired by what SwiftPM was doing for completion in its |
Thank you for pointing that out @nearfri! |
Supposedly fixed in 2.1.0, please confirm. |
This is working perfectly for me in Xcode 12.2 (swift 5.3.1) under macOS 10.15.7. |
Today, I researched a way for handling helper scripts for my Mac application. I tested all three major players (swift-sh, Marathon, Beak) and I like the approach of swift-sh the most. Especially the shebang and the idea of editing out into Xcode while working on the script without having to maintain the Xcode project afterwards.
Unfortunately, there have been also two issues which bother me a bit. The first one being the management of the Homebrew formula which I described in mxcl/homebrew-made#4. The second one is the inability to get the autocompleting in Xcode working.
Here are the steps I've performed. First, I installed the tool from source (version 1.12.0):
Then I created a sample script from the README:
So far everything worked smoothly, so I tried to edit the script in Xcode 10.2 using
$ swift sh edit script
. Xcode opened but no matter which scheme I selected the autocompletion didn't work. Thescript
scheme allowed me to run the script and thescript-completion
scheme behaved very strangely showing errors complaining aboutscript
not beingmain.swift
. Below are some screenshots showing the problem.@mxcl I must be missing something. Could you please give me a hint regarding what I'm doing wrong?
The text was updated successfully, but these errors were encountered: